25 #ifndef HAVE_LIBMKL_INTEL_LP64
26 #ifndef CBLAS_ENUM_DEFINED_H
27 #define CBLAS_ENUM_DEFINED_H
28 enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102 };
29 enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113,
31 enum CBLAS_UPLO {CblasUpper=121, CblasLower=122};
32 enum CBLAS_DIAG {CblasNonUnit=131, CblasUnit=132};
33 enum CBLAS_SIDE {CblasLeft=141, CblasRight=142};
35 #define CBLAS_INDEX int
39 #define ATLAS_ORDER CBLAS_ORDER
40 #define AtlasRowMajor CblasRowMajor
41 #define AtlasColMajor CblasColMajor
42 #define ATLAS_TRANS CBLAS_TRANSPOSE
43 #define AtlasNoTrans CblasNoTrans
44 #define AtlasTrans CblasTrans
45 #define AtlasConjTrans CblasConjTrans
46 #define ATLAS_UPLO CBLAS_UPLO
47 #define AtlasUpper CblasUpper
48 #define AtlasLower CblasLower
49 #define ATLAS_DIAG CBLAS_DIAG
50 #define AtlasNonUnit CblasNonUnit
51 #define AtlasUnit CblasUnit
52 #define ATLAS_SIDE CBLAS_SIDE
53 #define AtlasLeft CblasLeft
54 #define AtlasRight CblasRight
57 #include "mkl_cblas.h"
62 typedef std::complex<double> doublecomplex;
64 #if defined(HAVE_LIBBLAS)
66 void dscal(
const int N,
const double alpha,
double *X,
const int incX) ;
67 void dgemm(
const CBLAS_ORDER Order,
const CBLAS_TRANSPOSE TransA,
68 const CBLAS_TRANSPOSE TransB,
const int M,
const int N,
69 const int K,
const double alpha,
const double *A,
70 const int lda,
const double *B,
const int ldb,
71 const double beta,
double *C,
const int ldc);
72 void dsymm(
const CBLAS_ORDER Order,
const CBLAS_SIDE Side,
73 const CBLAS_UPLO Uplo,
const int M,
const int N,
74 const double alpha,
const double *A,
const int lda,
75 const double *B,
const int ldb,
const double beta,
76 double *C,
const int ldc);
77 void daxpy(
const int N,
const double alpha,
const double *X,
78 const int incX,
double *Y,
const int incY);
79 void dcopy(
const int N,
const double *X,
const int incX,
80 double *Y,
const int incY);
81 void dgemv(
const CBLAS_ORDER Order,
82 const CBLAS_TRANSPOSE TransA,
const int M,
const int N,
83 const double alpha,
const double *A,
const int lda,
84 const double *X,
const int incX,
const double beta,
85 double *Y,
const int incY);
86 void dsymv(
const CBLAS_ORDER Order,
const CBLAS_UPLO Uplo,
87 const int N,
const double alpha,
const double *A,
88 const int lda,
const double *X,
const int incX,
89 const double beta,
double *Y,
const int incY);
90 double ddot(
const int N,
const double *X,
const int incX,
91 const double *Y,
const int incY);
92 double dasum(
const int N,
const double *X,
const int incX);
93 CBLAS_INDEX idamax(
const int N,
const double *X,
const int incX);
94 double dnrm2(
const int N,
const double *X,
const int incX);
95 int dgesv(
const CBLAS_ORDER Order,
const int N,
const int NRHS,
96 double *A,
const int lda,
int *ipiv,
97 double *B,
const int ldb);
98 int zgesv(
const CBLAS_ORDER Order,
const int N,
const int NRHS,
99 doublecomplex *A,
const int lda,
int *ipiv,
100 doublecomplex *B,
const int ldb);
101 int dgetrs(
const CBLAS_ORDER Order,
const CBLAS_TRANSPOSE Trans,
102 const int N,
const int NRHS,
const double *A,
const int lda,
103 const int *ipiv,
double *B,
const int ldb);
104 int dgetrf(
const CBLAS_ORDER Order,
const int M,
const int N,
105 double *A,
const int lda,
int *ipiv);
106 int dgetri(
const CBLAS_ORDER Order,
const int N,
double *A,
107 const int lda,
const int *ipiv);
108 int dpotrf(
const ATLAS_ORDER Order,
const ATLAS_UPLO Uplo,
const int N,
double *A,
const int lda);
109 int dpotri(
const ATLAS_ORDER Order,
const ATLAS_UPLO Uplo,
110 const int N,
double *A,
const int lda);
111 int dposv(
const ATLAS_ORDER Order,
const ATLAS_UPLO Uplo,
112 const int N,
const int NRHS,
double *A,
const int lda,
113 double *B,
const int ldb);
114 int dpotrs(
const CBLAS_ORDER Order,
const CBLAS_UPLO Uplo,
115 const int N,
const int NRHS,
const double *A,
const int lda,
116 double *B,
const int ldb);
120 #if defined(HAVE_LIBATLAS)
128 #define dscal cblas_dscal
129 #define dcopy cblas_dcopy
130 #define ddot cblas_ddot
131 #define dnrm2 cblas_dnrm2
132 #define dasum cblas_dasum
133 #define idamax cblas_idamax
134 #define daxpy cblas_daxpy
135 #define dgemv cblas_dgemv
136 #define dsymv cblas_dsymv
137 #define dgemm cblas_dgemm
138 #define dsymm cblas_dsymm
140 #define dgesv clapack_dgesv
141 #define zgesv clapack_zgesv
142 #define dgetrs clapack_dgetrs
143 #define dgetrf clapack_dgetrf
144 #define dgetri clapack_dgetri
145 #define dpotrf clapack_dpotrf
146 #define dpotri clapack_dpotri
147 #define dpotrs clapack_dpotrs
148 #define dposv clapack_dposv
153 #if defined(HAVE_LIBMKL_INTEL_LP64)
155 #include "mkl_cblas.h"
156 #include "mkl_lapacke.h"
157 #include "mkl_lapack.h"
160 #define dscal cblas_dscal
161 #define dcopy cblas_dcopy
162 #define ddot cblas_ddot
163 #define dnrm2 cblas_dnrm2
164 #define dasum cblas_dasum
165 #define idamax cblas_idamax
166 #define daxpy cblas_daxpy
167 #define dgemv cblas_dgemv
168 #define dsymv cblas_dsymv
169 #define dgemm cblas_dgemm
170 #define dsymm cblas_dsymm
172 #define dgesv LAPACKE_dgesv
173 #define zgesv LAPACKE_zgesv
174 #define dgetrs LAPACKE_dgetrs
175 #define dgetrf LAPACKE_dgetrf
176 #define dgetri LAPACKE_dgetri
177 #define dpotrf LAPACKE_dpotrf
178 #define dpotri LAPACKE_dpotri
179 #define dpotrs LAPACKE_dpotrs
180 #define dposv LAPACKE_dposv
186 #ifndef HAVE_LIBMKL_INTEL_LP64
187 int dsyevx(
const char jobz,
const char range,
const CBLAS_UPLO cuplo,
const int n,
double *a,
const int lda,
const double vl,
const double vu,
const int il,
const int iu,
const double abstol,
const int *m,
double *w,
double *z,
const int ldz);
189 int dsyevx(
const char jobz,
const char range,
const CBLAS_UPLO cuplo,
const int n,
double *a,
const int lda,
const double vl,
const double vu,
const int il,
const int iu,
const double abstol,
int *m,
double *w,
double *z,
const int ldz);
192 int dgels(
const CBLAS_TRANSPOSE ctr,
const int m,
const int n,
const int nhrs,
double* a,
const int lda,
double* b,
const int ldb);
194 int dgelss(
const int m,
const int n,
const int nrhs,
double *a,
const int lda,
double *b,
const int ldb,
const double rcond);
196 int dgeev(
const char jobvl,
const char jobvr,
const int n,
double *a,
const int lda,
double *wr,
double *wi,
double *vl,
const int ldvl,
double *vr,
const int ldvr);
198 int dsygv(
const int itype,
const char jobz,
const char uplo,
const int n,
double *a,
const int lda,
double *b,
const int ldb,
double *w);
200 int dgesvd(
const char jobu,
const char jobvt,
const int m,
const int n,
double *a,
const int lda,
double *s,
double *u,
const int ldu,
double *vt,
const int ldvt);
202 int dsyev(
const char jobz,
const char ul,
const int n,
double *a,
const int lda,
double *w);
204 double dlange(
const char norm,
const int m,
const int n,
const double* a,
const int lda);
206 double dlansy(
const char norm,
const char uplo,
const int n,
const double* a,
const int lda);