fix lapacke config

This commit is contained in:
Charles Schlosser 2023-02-03 16:40:08 +00:00 committed by Antonio Sánchez
parent 3460f3558e
commit 2a90653395
3 changed files with 32 additions and 25 deletions

View File

@ -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"

View File

@ -122,30 +122,27 @@ namespace Eigen {
#define COLPIVQR_LAPACKE(EIGTYPE) \
COLPIVQR_LAPACKE_COMPUTEINPLACE(EIGTYPE) \
COLPIVQR_LAPACKE_INIT(EIGTYPE) \
COLPIVQR_LAPACKE_COMPUTEINPLACE(Ref<EIGTYPE>) \
COLPIVQR_LAPACKE_INIT(Ref<EIGTYPE>) \
typedef Matrix<float, Dynamic, Dynamic, ColMajor> MatrixXfC;
typedef Matrix<double, Dynamic, Dynamic, ColMajor> MatrixXdC;
typedef Matrix<lapack_complex_float, Dynamic, Dynamic, ColMajor> MatrixXcfC;
typedef Matrix<lapack_complex_double, Dynamic, Dynamic, ColMajor> MatrixXcdC;
typedef Matrix<float, Dynamic, Dynamic, RowMajor> MatrixXfR;
typedef Matrix<double, Dynamic, Dynamic, RowMajor> MatrixXdR;
typedef Matrix<scomplex, Dynamic, Dynamic, RowMajor> MatrixXcfR;
typedef Matrix<dcomplex, Dynamic, Dynamic, RowMajor> MatrixXcdR;
typedef Matrix<lapack_complex_float, Dynamic, Dynamic, RowMajor> MatrixXcfR;
typedef Matrix<lapack_complex_double, Dynamic, Dynamic, RowMajor> 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<MatrixXf>)
COLPIVQR_LAPACKE(Ref<MatrixXd>)
COLPIVQR_LAPACKE(Ref<MatrixXcf>)
COLPIVQR_LAPACKE(Ref<MatrixXcd>)
COLPIVQR_LAPACKE(Ref<MatrixXfR>)
COLPIVQR_LAPACKE(Ref<MatrixXdR>)
COLPIVQR_LAPACKE(Ref<MatrixXcfR>)
COLPIVQR_LAPACKE(Ref<MatrixXcdR>)
#endif
} // end namespace Eigen

View File

@ -46,8 +46,12 @@
#include <stdlib.h>
#ifndef lapack_int
#ifdef LAPACK_ILP64
#define lapack_int int64_t
#else
#define lapack_int int
#endif
#endif
#ifndef lapack_logical
#define lapack_logical lapack_int
@ -72,8 +76,7 @@
/* Complex type (single precision) */
#ifndef lapack_complex_float
#include <complex.h>
#define lapack_complex_float float _Complex
#define lapack_complex_float std::complex<float>
#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 <complex.h>
#define lapack_complex_double double _Complex
#define lapack_complex_double std::complex<double>
#endif
#ifndef lapack_complex_double_real