Warning, file /include/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 #ifndef EIGEN_SAEIGENSOLVER_LAPACKE_H
0034 #define EIGEN_SAEIGENSOLVER_LAPACKE_H
0035
0036 namespace Eigen {
0037
0038
0039
0040 #define EIGEN_LAPACKE_EIG_SELFADJ_2(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME, EIGCOLROW ) \
0041 template<> template<typename InputType> inline \
0042 SelfAdjointEigenSolver<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >& \
0043 SelfAdjointEigenSolver<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >::compute(const EigenBase<InputType>& matrix, int options) \
0044 { \
0045 eigen_assert(matrix.cols() == matrix.rows()); \
0046 eigen_assert((options&~(EigVecMask|GenEigMask))==0 \
0047 && (options&EigVecMask)!=EigVecMask \
0048 && "invalid option parameter"); \
0049 bool computeEigenvectors = (options&ComputeEigenvectors)==ComputeEigenvectors; \
0050 lapack_int n = internal::convert_index<lapack_int>(matrix.cols()), lda, info; \
0051 m_eivalues.resize(n,1); \
0052 m_subdiag.resize(n-1); \
0053 m_eivec = matrix; \
0054 \
0055 if(n==1) \
0056 { \
0057 m_eivalues.coeffRef(0,0) = numext::real(m_eivec.coeff(0,0)); \
0058 if(computeEigenvectors) m_eivec.setOnes(n,n); \
0059 m_info = Success; \
0060 m_isInitialized = true; \
0061 m_eigenvectorsOk = computeEigenvectors; \
0062 return *this; \
0063 } \
0064 \
0065 lda = internal::convert_index<lapack_int>(m_eivec.outerStride()); \
0066 char jobz, uplo='L'; \
0067 jobz = computeEigenvectors ? 'V' : 'N'; \
0068 \
0069 info = LAPACKE_##LAPACKE_NAME( LAPACK_COL_MAJOR, jobz, uplo, n, (LAPACKE_TYPE*)m_eivec.data(), lda, (LAPACKE_RTYPE*)m_eivalues.data() ); \
0070 m_info = (info==0) ? Success : NoConvergence; \
0071 m_isInitialized = true; \
0072 m_eigenvectorsOk = computeEigenvectors; \
0073 return *this; \
0074 }
0075
0076 #define EIGEN_LAPACKE_EIG_SELFADJ(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME ) \
0077 EIGEN_LAPACKE_EIG_SELFADJ_2(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME, ColMajor ) \
0078 EIGEN_LAPACKE_EIG_SELFADJ_2(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME, RowMajor )
0079
0080 EIGEN_LAPACKE_EIG_SELFADJ(double, double, double, dsyev)
0081 EIGEN_LAPACKE_EIG_SELFADJ(float, float, float, ssyev)
0082 EIGEN_LAPACKE_EIG_SELFADJ(dcomplex, lapack_complex_double, double, zheev)
0083 EIGEN_LAPACKE_EIG_SELFADJ(scomplex, lapack_complex_float, float, cheev)
0084
0085 }
0086
0087 #endif