add a "using MKL" documentation page, add a minimal documentation of PARDISO wrapper classes, refine a bit the EIGEN_USE_* logic

This commit is contained in:
Gael Guennebaud
2011-12-09 16:52:37 +01:00
parent fff25a4b46
commit 37f304a2e6
10 changed files with 219 additions and 25 deletions

View File

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

View File

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