33 #ifndef EIGEN_SAEIGENSOLVER_LAPACKE_H 34 #define EIGEN_SAEIGENSOLVER_LAPACKE_H 37 #include "./InternalHeaderCheck.h" 43 #define EIGEN_LAPACKE_EIG_SELFADJ_2(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME, EIGCOLROW) \ 45 template <typename InputType> \ 46 inline SelfAdjointEigenSolver<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >& \ 47 SelfAdjointEigenSolver<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >::compute(const EigenBase<InputType>& matrix, \ 49 eigen_assert(matrix.cols() == matrix.rows()); \ 50 eigen_assert((options & ~(EigVecMask | GenEigMask)) == 0 && (options & EigVecMask) != EigVecMask && \ 51 "invalid option parameter"); \ 52 bool computeEigenvectors = (options & ComputeEigenvectors) == ComputeEigenvectors; \ 53 lapack_int n = internal::convert_index<lapack_int>(matrix.cols()), lda, info; \ 54 m_eivalues.resize(n, 1); \ 55 m_subdiag.resize(n - 1); \ 59 m_eivalues.coeffRef(0, 0) = numext::real(m_eivec.coeff(0, 0)); \ 60 if (computeEigenvectors) m_eivec.setOnes(n, n); \ 62 m_isInitialized = true; \ 63 m_eigenvectorsOk = computeEigenvectors; \ 67 lda = internal::convert_index<lapack_int>(m_eivec.outerStride()); \ 68 char jobz, uplo = 'L' ; \ 69 jobz = computeEigenvectors ? 'V' : 'N'; \ 71 info = LAPACKE_##LAPACKE_NAME(LAPACK_COL_MAJOR, jobz, uplo, n, (LAPACKE_TYPE*)m_eivec.data(), lda, \ 72 (LAPACKE_RTYPE*)m_eivalues.data()); \ 73 m_info = (info == 0) ? Success : NoConvergence; \ 74 m_isInitialized = true; \ 75 m_eigenvectorsOk = computeEigenvectors; \ 79 #define EIGEN_LAPACKE_EIG_SELFADJ(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME) \ 80 EIGEN_LAPACKE_EIG_SELFADJ_2(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME, ColMajor) \ 81 EIGEN_LAPACKE_EIG_SELFADJ_2(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME, RowMajor) 83 EIGEN_LAPACKE_EIG_SELFADJ(
double,
double,
double, dsyev)
84 EIGEN_LAPACKE_EIG_SELFADJ(
float,
float,
float, ssyev)
85 EIGEN_LAPACKE_EIG_SELFADJ(dcomplex, lapack_complex_double,
double, zheev)
86 EIGEN_LAPACKE_EIG_SELFADJ(scomplex, lapack_complex_float,
float, cheev)
90 #endif // EIGEN_SAEIGENSOLVER_H Namespace containing all symbols from the Eigen library.
Definition: B01_Experimental.dox:1