Go to the documentation of this file.
33 #ifndef EIGEN_SAEIGENSOLVER_LAPACKE_H
34 #define EIGEN_SAEIGENSOLVER_LAPACKE_H
40 #define EIGEN_LAPACKE_EIG_SELFADJ_2(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME, EIGCOLROW ) \
41 template<> template<typename InputType> inline \
42 SelfAdjointEigenSolver<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >& \
43 SelfAdjointEigenSolver<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >::compute(const EigenBase<InputType>& matrix, int options) \
45 eigen_assert(matrix.cols() == matrix.rows()); \
46 eigen_assert((options&~(EigVecMask|GenEigMask))==0 \
47 && (options&EigVecMask)!=EigVecMask \
48 && "invalid option parameter"); \
49 bool computeEigenvectors = (options&ComputeEigenvectors)==ComputeEigenvectors; \
50 lapack_int n = internal::convert_index<lapack_int>(matrix.cols()), lda, info; \
51 m_eivalues.resize(n,1); \
52 m_subdiag.resize(n-1); \
57 m_eivalues.coeffRef(0,0) = numext::real(m_eivec.coeff(0,0)); \
58 if(computeEigenvectors) m_eivec.setOnes(n,n); \
60 m_isInitialized = true; \
61 m_eigenvectorsOk = computeEigenvectors; \
65 lda = internal::convert_index<lapack_int>(m_eivec.outerStride()); \
66 char jobz, uplo='L'; \
67 jobz = computeEigenvectors ? 'V' : 'N'; \
69 info = LAPACKE_##LAPACKE_NAME( LAPACK_COL_MAJOR, jobz, uplo, n, (LAPACKE_TYPE*)m_eivec.data(), lda, (LAPACKE_RTYPE*)m_eivalues.data() ); \
70 m_info = (info==0) ? Success : NoConvergence; \
71 m_isInitialized = true; \
72 m_eigenvectorsOk = computeEigenvectors; \
76 #define EIGEN_LAPACKE_EIG_SELFADJ(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME ) \
77 EIGEN_LAPACKE_EIG_SELFADJ_2(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME, ColMajor ) \
78 EIGEN_LAPACKE_EIG_SELFADJ_2(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME, RowMajor )
87 #endif // EIGEN_SAEIGENSOLVER_H
Namespace containing all symbols from the Eigen library.
#define lapack_complex_float
std::complex< float > scomplex
std::complex< double > dcomplex
#define lapack_complex_double
#define EIGEN_LAPACKE_EIG_SELFADJ(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_NAME)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:04:03