github.com/gopherd/gonum@v0.0.4/blas/conversions.bash (about)

     1  #!/usr/bin/env bash
     2  
     3  # Copyright ©2017 The Gonum Authors. All rights reserved.
     4  # Use of this source code is governed by a BSD-style
     5  # license that can be found in the LICENSE file.
     6  
     7  # Generate code for blas32.
     8  echo Generating blas32/conv.go
     9  echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > blas32/conv.go
    10  cat blas64/conv.go \
    11  | gofmt -r 'float64 -> float32' \
    12  \
    13  | sed -e 's/blas64/blas32/' \
    14  \
    15  >> blas32/conv.go
    16  
    17  echo Generating blas32/conv_test.go
    18  echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > blas32/conv_test.go
    19  cat blas64/conv_test.go \
    20  | gofmt -r 'float64 -> float32' \
    21  \
    22  | sed -e 's/blas64/blas32/' \
    23        -e 's_"math"_math "gonum.org/v1/gonum/internal/math32"_' \
    24  \
    25  >> blas32/conv_test.go
    26  
    27  echo Generating blas32/conv_symmetric.go
    28  echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > blas32/conv_symmetric.go
    29  cat blas64/conv_symmetric.go \
    30  | gofmt -r 'float64 -> float32' \
    31  \
    32  | sed -e 's/blas64/blas32/' \
    33  \
    34  >> blas32/conv_symmetric.go
    35  
    36  echo Generating blas32/conv_symmetric_test.go
    37  echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > blas32/conv_symmetric_test.go
    38  cat blas64/conv_symmetric_test.go \
    39  | gofmt -r 'float64 -> float32' \
    40  \
    41  | sed -e 's/blas64/blas32/' \
    42        -e 's_"math"_math "gonum.org/v1/gonum/internal/math32"_' \
    43  \
    44  >> blas32/conv_symmetric_test.go
    45  
    46  
    47  # Generate code for cblas128.
    48  echo Generating cblas128/conv.go
    49  echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv.go
    50  cat blas64/conv.go \
    51  | gofmt -r 'float64 -> complex128' \
    52  \
    53  | sed -e 's/blas64/cblas128/' \
    54  \
    55  >> cblas128/conv.go
    56  
    57  echo Generating cblas128/conv_test.go
    58  echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv_test.go
    59  cat blas64/conv_test.go \
    60  | gofmt -r 'float64 -> complex128' \
    61  \
    62  | sed -e 's/blas64/cblas128/' \
    63        -e 's_"math"_math "math/cmplx"_' \
    64  \
    65  >> cblas128/conv_test.go
    66  
    67  echo Generating cblas128/conv_symmetric.go
    68  echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv_symmetric.go
    69  cat blas64/conv_symmetric.go \
    70  | gofmt -r 'float64 -> complex128' \
    71  \
    72  | sed -e 's/blas64/cblas128/' \
    73  \
    74  >> cblas128/conv_symmetric.go
    75  
    76  echo Generating cblas128/conv_symmetric_test.go
    77  echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv_symmetric_test.go
    78  cat blas64/conv_symmetric_test.go \
    79  | gofmt -r 'float64 -> complex128' \
    80  \
    81  | sed -e 's/blas64/cblas128/' \
    82        -e 's_"math"_math "math/cmplx"_' \
    83  \
    84  >> cblas128/conv_symmetric_test.go
    85  
    86  echo Generating cblas128/conv_hermitian.go
    87  echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv_hermitian.go
    88  cat blas64/conv_symmetric.go \
    89  | gofmt -r 'float64 -> complex128' \
    90  \
    91  | sed -e 's/blas64/cblas128/' \
    92        -e 's/Symmetric/Hermitian/g' \
    93        -e 's/a symmetric/an Hermitian/g' \
    94        -e 's/symmetric/hermitian/g' \
    95        -e 's/Sym/Herm/g' \
    96  \
    97  >> cblas128/conv_hermitian.go
    98  
    99  echo Generating cblas128/conv_hermitian_test.go
   100  echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv_hermitian_test.go
   101  cat blas64/conv_symmetric_test.go \
   102  | gofmt -r 'float64 -> complex128' \
   103  \
   104  | sed -e 's/blas64/cblas128/' \
   105        -e 's/Symmetric/Hermitian/g' \
   106        -e 's/a symmetric/an Hermitian/g' \
   107        -e 's/symmetric/hermitian/g' \
   108        -e 's/Sym/Herm/g' \
   109        -e 's_"math"_math "math/cmplx"_' \
   110  \
   111  >> cblas128/conv_hermitian_test.go
   112  
   113  
   114  # Generate code for cblas64.
   115  echo Generating cblas64/conv.go
   116  echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas64/conv.go
   117  cat blas64/conv.go \
   118  | gofmt -r 'float64 -> complex64' \
   119  \
   120  | sed -e 's/blas64/cblas64/' \
   121  \
   122  >> cblas64/conv.go
   123  
   124  echo Generating cblas64/conv_test.go
   125  echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas64/conv_test.go
   126  cat blas64/conv_test.go \
   127  | gofmt -r 'float64 -> complex64' \
   128  \
   129  | sed -e 's/blas64/cblas64/' \
   130        -e 's_"math"_math "gonum.org/v1/gonum/internal/cmplx64"_' \
   131  \
   132  >> cblas64/conv_test.go
   133  
   134  echo Generating cblas64/conv_hermitian.go
   135  echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas64/conv_hermitian.go
   136  cat blas64/conv_symmetric.go \
   137  | gofmt -r 'float64 -> complex64' \
   138  \
   139  | sed -e 's/blas64/cblas64/' \
   140        -e 's/Symmetric/Hermitian/g' \
   141        -e 's/a symmetric/an Hermitian/g' \
   142        -e 's/symmetric/hermitian/g' \
   143        -e 's/Sym/Herm/g' \
   144  \
   145  >> cblas64/conv_hermitian.go
   146  
   147  echo Generating cblas64/conv_hermitian_test.go
   148  echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas64/conv_hermitian_test.go
   149  cat blas64/conv_symmetric_test.go \
   150  | gofmt -r 'float64 -> complex64' \
   151  \
   152  | sed -e 's/blas64/cblas64/' \
   153        -e 's/Symmetric/Hermitian/g' \
   154        -e 's/a symmetric/an Hermitian/g' \
   155        -e 's/symmetric/hermitian/g' \
   156        -e 's/Sym/Herm/g' \
   157        -e 's_"math"_math "gonum.org/v1/gonum/internal/cmplx64"_' \
   158  \
   159  >> cblas64/conv_hermitian_test.go