diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-12-09 16:52:37 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-12-09 16:52:37 +0100 |
commit | 37f304a2e651ccd1121cf48fa2b830f62c4d1420 (patch) | |
tree | 7dfd4ca354f8ff87389a63c90bda148fb69163e2 /Eigen | |
parent | fff25a4b4629ef440945d9157a0ed7a93403e1f9 (diff) |
add a "using MKL" documentation page, add a minimal documentation of PARDISO wrapper classes, refine a bit the EIGEN_USE_* logic
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/Cholesky | 2 | ||||
-rw-r--r-- | Eigen/Eigenvalues | 2 | ||||
-rw-r--r-- | Eigen/LU | 2 | ||||
-rw-r--r-- | Eigen/PARDISOSupport | 6 | ||||
-rw-r--r-- | Eigen/QR | 2 | ||||
-rw-r--r-- | Eigen/SVD | 2 | ||||
-rw-r--r-- | Eigen/src/Core/util/MKL_support.h | 24 | ||||
-rw-r--r-- | Eigen/src/PARDISOSupport/PARDISOSupport.h | 36 |
8 files changed, 51 insertions, 25 deletions
diff --git a/Eigen/Cholesky b/Eigen/Cholesky index d5ac5348f..b3091d7bb 100644 --- a/Eigen/Cholesky +++ b/Eigen/Cholesky @@ -24,7 +24,7 @@ namespace Eigen { #include "src/misc/Solve.h" #include "src/Cholesky/LLT.h" #include "src/Cholesky/LDLT.h" -#ifdef EIGEN_USE_MKL_CLAPACK +#ifdef EIGEN_USE_LAPACKE #include "src/Cholesky/LLT_MKL.h" #endif diff --git a/Eigen/Eigenvalues b/Eigen/Eigenvalues index 588ee9a82..bf352fd74 100644 --- a/Eigen/Eigenvalues +++ b/Eigen/Eigenvalues @@ -36,7 +36,7 @@ namespace Eigen { #include "src/Eigenvalues/ComplexSchur.h" #include "src/Eigenvalues/ComplexEigenSolver.h" #include "src/Eigenvalues/MatrixBaseEigenvalues.h" -#ifdef EIGEN_USE_MKL_CLAPACK +#ifdef EIGEN_USE_LAPACKE #include "src/Eigenvalues/RealSchur_MKL.h" #include "src/Eigenvalues/ComplexSchur_MKL.h" #include "src/Eigenvalues/SelfAdjointEigenSolver_MKL.h" @@ -23,7 +23,7 @@ namespace Eigen { #include "src/misc/Image.h" #include "src/LU/FullPivLU.h" #include "src/LU/PartialPivLU.h" -#ifdef EIGEN_USE_MKL_CLAPACK +#ifdef EIGEN_USE_LAPACKE #include "src/LU/PartialPivLU_MKL.h" #endif #include "src/LU/Determinant.h" diff --git a/Eigen/PARDISOSupport b/Eigen/PARDISOSupport index a8a07d76d..3d079b18b 100644 --- a/Eigen/PARDISOSupport +++ b/Eigen/PARDISOSupport @@ -11,10 +11,10 @@ namespace Eigen { -/** \ingroup Sparse_modules - * \defgroup PARDISOSupport_Module Intel(R) MKL PARDISO support - * +/** \ingroup Support_modules + * \defgroup PARDISOSupport_Module PARDISOSupport module * + * This module brings support for the Intel(R) MKL PARDISO direct sparse solvers * * \code * #include <Eigen/PARDISOSupport> @@ -28,7 +28,7 @@ namespace Eigen { #include "src/QR/HouseholderQR.h" #include "src/QR/FullPivHouseholderQR.h" #include "src/QR/ColPivHouseholderQR.h" -#ifdef EIGEN_USE_MKL_CLAPACK +#ifdef EIGEN_USE_LAPACKE #include "src/QR/HouseholderQR_MKL.h" #include "src/QR/ColPivHouseholderQR_MKL.h" #endif @@ -24,7 +24,7 @@ namespace Eigen { #include "src/misc/Solve.h" #include "src/SVD/JacobiSVD.h" -#if defined(EIGEN_ALLOW_JACOBISVD_USE_LAPACKSVD) && defined(EIGEN_USE_MKL_CLAPACK) +#if defined(EIGEN_USE_LAPACKE) && !defined(EIGEN_USE_LAPACKE_STRICT) #include "src/SVD/JacobiSVD_MKL.h" #endif #include "src/SVD/UpperBidiagonalization.h" diff --git a/Eigen/src/Core/util/MKL_support.h b/Eigen/src/Core/util/MKL_support.h index d605fc844..1e6e355d6 100644 --- a/Eigen/src/Core/util/MKL_support.h +++ b/Eigen/src/Core/util/MKL_support.h @@ -37,15 +37,19 @@ #ifndef EIGEN_USE_BLAS #define EIGEN_USE_BLAS #endif - #ifndef EIGEN_USE_MKL_CLAPACK - #define EIGEN_USE_MKL_CLAPACK + #ifndef EIGEN_USE_LAPACKE + #define EIGEN_USE_LAPACKE #endif #ifndef EIGEN_USE_MKL_VML #define EIGEN_USE_MKL_VML #endif #endif -#if defined(EIGEN_USE_MKL_CLAPACK) || defined(EIGEN_USE_MKL_VML) +#ifdef EIGEN_USE_LAPACKE_STRICT + #define EIGEN_USE_LAPACKE +#endif + +#if defined(EIGEN_USE_BLAS) || defined(EIGEN_USE_LAPACKE) || defined(EIGEN_USE_MKL_VML) #define EIGEN_USE_MKL #endif @@ -55,17 +59,6 @@ #include <mkl_lapacke.h> #define EIGEN_MKL_VML_THRESHOLD 128 -#elif defined EIGEN_USE_BLAS - -#error Currently EIGEN_USE_BLAS requires Intel MKL. If you want to use MKL's BLAS and only it, then define EIGEN_USE_MKL too. - -#include "../../misc/blas.h" -#define MKL_INT int - -#endif - -#if defined(EIGEN_USE_MKL) || defined(EIGEN_USE_BLAS) - namespace Eigen { typedef std::complex<double> dcomplex; @@ -83,7 +76,6 @@ static inline void assign_conj_scalar_eig2mkl(MKLType& mklScalar, const EigenTyp mklScalar=eigenScalar; } -#ifdef EIGEN_USE_MKL template <> inline void assign_scalar_eig2mkl<MKL_Complex16,dcomplex>(MKL_Complex16& mklScalar, const dcomplex& eigenScalar) { mklScalar.real=eigenScalar.real(); @@ -108,8 +100,6 @@ inline void assign_conj_scalar_eig2mkl<MKL_Complex8,scomplex>(MKL_Complex8& mklS mklScalar.imag=-eigenScalar.imag(); } -#endif - } // end namespace internal } // end namespace Eigen diff --git a/Eigen/src/PARDISOSupport/PARDISOSupport.h b/Eigen/src/PARDISOSupport/PARDISOSupport.h index d0d50c8f8..4a231f432 100644 --- a/Eigen/src/PARDISOSupport/PARDISOSupport.h +++ b/Eigen/src/PARDISOSupport/PARDISOSupport.h @@ -312,6 +312,18 @@ bool PardisoImpl<Base>::_solve(const MatrixBase<BDerived> &b, } +/** \ingroup PARDISOSupport_Module + * \class PardisoLU + * \brief A sparse direct LU factorization and solver based on the PARDISO library + * + * This class allows to solve for A.X = B sparse linear problems via a direct LU factorization + * using the Intel MKL PARDISO library. The sparse matrix A must be squared and invertible. + * The vectors or matrices X and B can be either dense or sparse. + * + * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> + * + * \sa \ref TutorialSparseDirectSolvers + */ template<typename MatrixType> class PardisoLU : public PardisoImpl< PardisoLU<MatrixType> > { @@ -340,6 +352,18 @@ class PardisoLU : public PardisoImpl< PardisoLU<MatrixType> > } }; +/** \ingroup PARDISOSupport_Module + * \class PardisoLLT + * \brief A sparse direct Cholesky (LLT) factorization and solver based on the PARDISO library + * + * This class allows to solve for A.X = B sparse linear problems via a LL^T Cholesky factorization + * using the Intel MKL PARDISO library. The sparse matrix A must be selfajoint and positive definite. + * The vectors or matrices X and B can be either dense or sparse. + * + * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> + * + * \sa \ref TutorialSparseDirectSolvers + */ template<typename MatrixType> class PardisoLLT : public PardisoImpl< PardisoLLT<MatrixType> > { @@ -368,6 +392,18 @@ class PardisoLLT : public PardisoImpl< PardisoLLT<MatrixType> > } }; +/** \ingroup PARDISOSupport_Module + * \class PardisoLDLT + * \brief A sparse direct Cholesky (LLT) factorization and solver based on the PARDISO library + * + * This class allows to solve for A.X = B sparse linear problems via a LDL^T Cholesky factorization + * using the Intel MKL PARDISO library. The sparse matrix A must be selfajoint and positive definite. + * The vectors or matrices X and B can be either dense or sparse. + * + * \tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<> + * + * \sa \ref TutorialSparseDirectSolvers + */ template<typename MatrixType> class PardisoLDLT : public PardisoImpl< PardisoLDLT<MatrixType> > { |