00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef MTL_BLAS_INCLUDE
00014 #define MTL_BLAS_INCLUDE
00015
00016
00017 #ifdef MTL_HAS_BLAS
00018
00019
00020
00021 #if 0
00022 #include "mtl/mtl_complex.h"
00023 using std::complex;
00024 #endif
00025
00026
00027
00028
00029
00030
00031
00032
00033 #define MTL_BLAS_NAME(name) name##_
00034
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038
00039
00040
00041
00042
00043
00044
00045
00046 float MTL_BLAS_NAME(sdot)(int*, float*, int*, float*, int*);
00047 double MTL_BLAS_NAME(dsdot)(int*, float*, int*, float*, int*);
00048 float MTL_BLAS_NAME(sdsdot)(int*, float*, float*, int*, float*, int*);
00049 double MTL_BLAS_NAME(ddot)(int*, double*, int*, double*, int*);
00050
00051
00052
00053
00054 void MTL_BLAS_NAME(saxpy)(int*, float*, float*, int*, float*, int*);
00055 void MTL_BLAS_NAME(daxpy)(int*, double*, double*, int*, double*, int*);
00056
00057
00058
00059
00060 void MTL_BLAS_NAME(scopy)(int*, float*, int*, float*, int*);
00061 void MTL_BLAS_NAME(dcopy)(int*, double*, int*, double*, int*);
00062
00063
00064
00065
00066 void MTL_BLAS_NAME(sswap)(int*, float*, int*, float*, int*);
00067 void MTL_BLAS_NAME(dswap)(int*, double*, int*, double*, int*);
00068
00069
00070
00071
00072 float MTL_BLAS_NAME(snrm2)(int *, float*, int*);
00073 double MTL_BLAS_NAME(dnrm2)(int *, double*, int*);
00074
00075
00076
00077
00078 float MTL_BLAS_NAME(sasum)(int *, float*, int*);
00079 double MTL_BLAS_NAME(dasum)(int *, double*, int*);
00080
00081
00082
00083
00084 void MTL_BLAS_NAME(sscal)(int*, float*, float*, int*);
00085 void MTL_BLAS_NAME(dscal)(int*, double*, double*, int*);
00086
00087
00088
00089
00090 int MTL_BLAS_NAME(isamax)(int *, float*, int*);
00091 int MTL_BLAS_NAME(idamax)(int *, double*, int*);
00092
00093
00094
00095
00096
00097 void MTL_BLAS_NAME(srotg)(float*, float*, float*, float*);
00098 void MTL_BLAS_NAME(drotg)(double*, double*, double*, double*);
00099 #if 0
00100 void MTL_BLAS_NAME(crotg)(complex<float>*,complex<float>*,float*,complex<float>*);
00101 void MTL_BLAS_NAME(zrotg)(complex<double>*,complex<double>*,double*,complex<double>*);
00102 #endif
00103 void MTL_BLAS_NAME(srot)(int*, float*, int*, float*, int*, float*, float*);
00104 void MTL_BLAS_NAME(drot)(int*, double*, int*, double*, int*, double*, double*);
00105 #if 0
00106
00107 void MTL_BLAS_NAME(csrot)(int*, complex<float>*, int*, complex<float>*, int*,
00108 complex<float>*, complex<float>*);
00109 void MTL_BLAS_NAME(zdrot)(int*, complex<double>*, int*, complex<double>*, int*,
00110 double*, double*);
00111 #endif
00112
00113
00114
00115
00116
00117 void MTL_BLAS_NAME(dgemv)(char*, int*, int*, double*, double*, int*,
00118 double*, int*, double*, double*, int*);
00119
00120 void MTL_BLAS_NAME(dger)(int*, int*, double*, double*, int*, double*,
00121 int*, double*, int*);
00122
00123 void MTL_BLAS_NAME(dgbmv)(char*, int*, int*, int*, int*, double*, double*, int*,
00124 double*, int*, double*, double*, int*);
00125
00126
00127 void MTL_BLAS_NAME(dtrsv)(char* uplo, char* trans, char* diag, int* n, double *da,
00128 int* lda, double *dx, int* incx);
00129
00130
00131
00132
00133
00134 void MTL_BLAS_NAME(sgemm)(const char* transa, const char* transb,
00135 const int* m, const int* n, const int* k,
00136 const float* alpha, const float *da, const int* lda,
00137 const float *db, const int* ldb, const float* dbeta,
00138 float *dc, const int* ldc);
00139
00140 void MTL_BLAS_NAME(dgemm)(const char* transa, const char* transb,
00141 const int* m, const int* n, const int* k,
00142 const double* alpha, const double *da, const int* lda,
00143 const double *db, const int* ldb, const double* dbeta,
00144 double *dc, const int* ldc);
00145
00146 void MTL_BLAS_NAME(cgemm)(const char* transa, const char* transb,
00147 const int* m, const int* n, const int* k,
00148 const std::complex<float>* alpha, const std::complex<float> *da, const int* lda,
00149 const std::complex<float> *db, const int* ldb, const std::complex<float>* dbeta,
00150 std::complex<float> *dc, const int* ldc);
00151
00152 void MTL_BLAS_NAME(zgemm)(const char* transa, const char* transb,
00153 const int* m, const int* n, const int* k,
00154 const std::complex<double>* alpha, const std::complex<double> *da, const int* lda,
00155 const std::complex<double> *db, const int* ldb, const std::complex<double>* dbeta,
00156 std::complex<double> *dc, const int* ldc);
00157
00158 #ifdef __cplusplus
00159 }
00160 #endif
00161
00162 #endif // MTL_HAS_BLAS
00163
00164 #endif // MTL_BLAS_INCLUDE