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 # ifndef INTEL_MKL_VERSION
61 # elif INTEL_MKL_VERSION < 100305
64 # ifndef EIGEN_USE_MKL
66 # undef EIGEN_USE_MKL_ALL
67 # undef EIGEN_USE_BLAS
68 # undef EIGEN_USE_LAPACKE
69 # undef EIGEN_USE_MKL_VML
70 # undef EIGEN_USE_LAPACKE_STRICT
71 # undef EIGEN_USE_LAPACKE
75 #if defined EIGEN_USE_MKL
76 #include <mkl_lapacke.h>
77 #define EIGEN_MKL_VML_THRESHOLD 128
82 #define EIGEN_MKL_DOMAIN_ALL MKL_DOMAIN_ALL
84 #define EIGEN_MKL_DOMAIN_ALL MKL_ALL
87 #ifdef MKL_DOMAIN_BLAS
88 #define EIGEN_MKL_DOMAIN_BLAS MKL_DOMAIN_BLAS
90 #define EIGEN_MKL_DOMAIN_BLAS MKL_BLAS
94 #define EIGEN_MKL_DOMAIN_FFT MKL_DOMAIN_FFT
96 #define EIGEN_MKL_DOMAIN_FFT MKL_FFT
100 #define EIGEN_MKL_DOMAIN_VML MKL_DOMAIN_VML
102 #define EIGEN_MKL_DOMAIN_VML MKL_VML
105 #ifdef MKL_DOMAIN_PARDISO
106 #define EIGEN_MKL_DOMAIN_PARDISO MKL_DOMAIN_PARDISO
108 #define EIGEN_MKL_DOMAIN_PARDISO MKL_PARDISO
113 typedef std::complex<double> dcomplex;
114 typedef std::complex<float> scomplex;
118 template<
typename MKLType,
typename EigenType>
119 static inline void assign_scalar_eig2mkl(MKLType& mklScalar,
const EigenType& eigenScalar) {
120 mklScalar=eigenScalar;
123 template<
typename MKLType,
typename EigenType>
124 static inline void assign_conj_scalar_eig2mkl(MKLType& mklScalar,
const EigenType& eigenScalar) {
125 mklScalar=eigenScalar;
129 inline void assign_scalar_eig2mkl<MKL_Complex16,dcomplex>(MKL_Complex16& mklScalar,
const dcomplex& eigenScalar) {
130 mklScalar.real=eigenScalar.real();
131 mklScalar.imag=eigenScalar.imag();
135 inline void assign_scalar_eig2mkl<MKL_Complex8,scomplex>(MKL_Complex8& mklScalar,
const scomplex& eigenScalar) {
136 mklScalar.real=eigenScalar.real();
137 mklScalar.imag=eigenScalar.imag();
141 inline void assign_conj_scalar_eig2mkl<MKL_Complex16,dcomplex>(MKL_Complex16& mklScalar,
const dcomplex& eigenScalar) {
142 mklScalar.real=eigenScalar.real();
143 mklScalar.imag=-eigenScalar.imag();
147 inline void assign_conj_scalar_eig2mkl<MKL_Complex8,scomplex>(MKL_Complex8& mklScalar,
const scomplex& eigenScalar) {
148 mklScalar.real=eigenScalar.real();
149 mklScalar.imag=-eigenScalar.imag();
158 #endif // EIGEN_MKL_SUPPORT_H