33 #ifndef EIGEN_MKL_SUPPORT_H 34 #define EIGEN_MKL_SUPPORT_H 36 #ifdef EIGEN_USE_MKL_ALL 37 #ifndef EIGEN_USE_BLAS 38 #define EIGEN_USE_BLAS 40 #ifndef EIGEN_USE_LAPACKE 41 #define EIGEN_USE_LAPACKE 43 #ifndef EIGEN_USE_MKL_VML 44 #define EIGEN_USE_MKL_VML 48 #ifdef EIGEN_USE_LAPACKE_STRICT 49 #define EIGEN_USE_LAPACKE 52 #if defined(EIGEN_USE_BLAS) || defined(EIGEN_USE_LAPACKE) || defined(EIGEN_USE_MKL_VML) 56 #if defined EIGEN_USE_MKL 59 #include <mkl_lapacke.h> 60 #define EIGEN_MKL_VML_THRESHOLD 128 64 typedef std::complex<double> dcomplex;
65 typedef std::complex<float> scomplex;
69 template<
typename MKLType,
typename EigenType>
70 static inline void assign_scalar_eig2mkl(MKLType& mklScalar,
const EigenType& eigenScalar) {
71 mklScalar=eigenScalar;
74 template<
typename MKLType,
typename EigenType>
75 static inline void assign_conj_scalar_eig2mkl(MKLType& mklScalar,
const EigenType& eigenScalar) {
76 mklScalar=eigenScalar;
80 inline void assign_scalar_eig2mkl<MKL_Complex16,dcomplex>(MKL_Complex16& mklScalar,
const dcomplex& eigenScalar) {
81 mklScalar.real=eigenScalar.real();
82 mklScalar.imag=eigenScalar.imag();
86 inline void assign_scalar_eig2mkl<MKL_Complex8,scomplex>(MKL_Complex8& mklScalar,
const scomplex& eigenScalar) {
87 mklScalar.real=eigenScalar.real();
88 mklScalar.imag=eigenScalar.imag();
92 inline void assign_conj_scalar_eig2mkl<MKL_Complex16,dcomplex>(MKL_Complex16& mklScalar,
const dcomplex& eigenScalar) {
93 mklScalar.real=eigenScalar.real();
94 mklScalar.imag=-eigenScalar.imag();
98 inline void assign_conj_scalar_eig2mkl<MKL_Complex8,scomplex>(MKL_Complex8& mklScalar,
const scomplex& eigenScalar) {
99 mklScalar.real=eigenScalar.real();
100 mklScalar.imag=-eigenScalar.imag();
109 #endif // EIGEN_MKL_SUPPORT_H