mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
- split and rename defined tokens to enable the use of BLAS/Lapack/VML/etc
- include MKL headers outside the Eigen namespace.
This commit is contained in:
@@ -33,12 +33,31 @@
|
||||
#ifndef EIGEN_MKL_SUPPORT_H
|
||||
#define EIGEN_MKL_SUPPORT_H
|
||||
|
||||
#ifdef EIGEN_USE_MKL_ALL
|
||||
#ifndef EIGEN_USE_BLAS
|
||||
#define EIGEN_USE_BLAS
|
||||
#endif
|
||||
#ifndef EIGEN_USE_MKL_CLAPACK
|
||||
#define EIGEN_USE_MKL_CLAPACK
|
||||
#endif
|
||||
#ifndef EIGEN_USE_MKL_VML
|
||||
#define EIGEN_USE_MKL_VML
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(EIGEN_USE_MKL_CLAPACK) || defined(EIGEN_USE_MKL_VML)
|
||||
#define EIGEN_USE_MKL
|
||||
#endif
|
||||
|
||||
#if defined EIGEN_USE_MKL
|
||||
|
||||
#include <mkl.h>
|
||||
#include <mkl_lapacke.h>
|
||||
#include <iostream>
|
||||
|
||||
#define EIGEN_MKL_VML_THRESHOLD 128
|
||||
|
||||
namespace Eigen {
|
||||
|
||||
typedef std::complex<double> dcomplex;
|
||||
typedef std::complex<float> scomplex;
|
||||
|
||||
@@ -80,5 +99,12 @@ inline void assign_conj_scalar_eig2mkl<MKL_Complex8,scomplex>(MKL_Complex8& mklS
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
} // end namespace Eigen
|
||||
|
||||
#endif
|
||||
#elif defined EIGEN_USE_BLAS
|
||||
|
||||
#include "../../misc/blas.h"
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user