diff --git a/Eigen/Core b/Eigen/Core index af7189162..631d3dffb 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -155,6 +155,14 @@ using std::ptrdiff_t; * \endcode */ +#ifdef EIGEN_USE_LAPACKE + #ifdef EIGEN_USE_MKL + #include "mkl_lapacke.h" + #else + #include "src/misc/lapacke.h" + #endif +#endif + #include "src/Core/util/Constants.h" #include "src/Core/util/Meta.h" #include "src/Core/util/Assert.h" diff --git a/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h b/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h index 8a6ae9bb9..70df6dbf6 100644 --- a/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +++ b/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h @@ -119,33 +119,30 @@ namespace Eigen { ColPivHouseholderQR_LAPACKE_impl::init(rows, cols, m_hCoeffs, m_colsPermutation, m_isInitialized, \ m_usePrescribedThreshold); } \ - #define COLPIVQR_LAPACKE(EIGTYPE) \ - COLPIVQR_LAPACKE_COMPUTEINPLACE(EIGTYPE) \ - COLPIVQR_LAPACKE_INIT(EIGTYPE) \ + #define COLPIVQR_LAPACKE(EIGTYPE) \ + COLPIVQR_LAPACKE_COMPUTEINPLACE(EIGTYPE) \ + COLPIVQR_LAPACKE_INIT(EIGTYPE) \ + COLPIVQR_LAPACKE_COMPUTEINPLACE(Ref) \ + COLPIVQR_LAPACKE_INIT(Ref) \ - typedef Matrix MatrixXfR; - typedef Matrix MatrixXdR; - typedef Matrix MatrixXcfR; - typedef Matrix MatrixXcdR; + typedef Matrix MatrixXfC; + typedef Matrix MatrixXdC; + typedef Matrix MatrixXcfC; + typedef Matrix MatrixXcdC; + typedef Matrix MatrixXfR; + typedef Matrix MatrixXdR; + typedef Matrix MatrixXcfR; + typedef Matrix MatrixXcdR; - COLPIVQR_LAPACKE(MatrixXf) - COLPIVQR_LAPACKE(MatrixXd) - COLPIVQR_LAPACKE(MatrixXcf) - COLPIVQR_LAPACKE(MatrixXcd) + COLPIVQR_LAPACKE(MatrixXfC) + COLPIVQR_LAPACKE(MatrixXdC) + COLPIVQR_LAPACKE(MatrixXcfC) + COLPIVQR_LAPACKE(MatrixXcdC) COLPIVQR_LAPACKE(MatrixXfR) COLPIVQR_LAPACKE(MatrixXdR) COLPIVQR_LAPACKE(MatrixXcfR) COLPIVQR_LAPACKE(MatrixXcdR) - COLPIVQR_LAPACKE(Ref) - COLPIVQR_LAPACKE(Ref) - COLPIVQR_LAPACKE(Ref) - COLPIVQR_LAPACKE(Ref) - COLPIVQR_LAPACKE(Ref) - COLPIVQR_LAPACKE(Ref) - COLPIVQR_LAPACKE(Ref) - COLPIVQR_LAPACKE(Ref) - #endif } // end namespace Eigen diff --git a/Eigen/src/misc/lapacke.h b/Eigen/src/misc/lapacke.h index 3d8e24f5a..c20204cb6 100644 --- a/Eigen/src/misc/lapacke.h +++ b/Eigen/src/misc/lapacke.h @@ -46,7 +46,11 @@ #include #ifndef lapack_int -#define lapack_int int + #ifdef LAPACK_ILP64 + #define lapack_int int64_t + #else + #define lapack_int int + #endif #endif #ifndef lapack_logical @@ -72,8 +76,7 @@ /* Complex type (single precision) */ #ifndef lapack_complex_float -#include -#define lapack_complex_float float _Complex +#define lapack_complex_float std::complex #endif #ifndef lapack_complex_float_real @@ -88,8 +91,7 @@ lapack_complex_float lapack_make_complex_float( float re, float im ); /* Complex type (double precision) */ #ifndef lapack_complex_double -#include -#define lapack_complex_double double _Complex +#define lapack_complex_double std::complex #endif #ifndef lapack_complex_double_real