33 #ifndef EIGEN_COMPLEX_SCHUR_LAPACKE_H 34 #define EIGEN_COMPLEX_SCHUR_LAPACKE_H 40 #define EIGEN_LAPACKE_SCHUR_COMPLEX(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX, LAPACKE_PREFIX_U, EIGCOLROW, LAPACKE_COLROW) \ 41 template<> template<typename InputType> inline \ 42 ComplexSchur<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >& \ 43 ComplexSchur<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >::compute(const EigenBase<InputType>& matrix, bool computeU) \ 45 typedef Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> MatrixType; \ 46 typedef MatrixType::RealScalar RealScalar; \ 47 typedef std::complex<RealScalar> ComplexScalar; \ 49 eigen_assert(matrix.cols() == matrix.rows()); \ 51 m_matUisUptodate = false; \ 52 if(matrix.cols() == 1) \ 54 m_matT = matrix.derived().template cast<ComplexScalar>(); \ 55 if(computeU) m_matU = ComplexMatrixType::Identity(1,1); \ 57 m_isInitialized = true; \ 58 m_matUisUptodate = computeU; \ 61 lapack_int n = internal::convert_index<lapack_int>(matrix.cols()), sdim, info; \ 62 lapack_int matrix_order = LAPACKE_COLROW; \ 63 char jobvs, sort='N'; \ 64 LAPACK_##LAPACKE_PREFIX_U##_SELECT1 select = 0; \ 65 jobvs = (computeU) ? 'V' : 'N'; \ 66 m_matU.resize(n, n); \ 67 lapack_int ldvs = internal::convert_index<lapack_int>(m_matU.outerStride()); \ 69 lapack_int lda = internal::convert_index<lapack_int>(m_matT.outerStride()); \ 70 Matrix<EIGTYPE, Dynamic, Dynamic> w; \ 72 info = LAPACKE_##LAPACKE_PREFIX##gees( matrix_order, jobvs, sort, select, n, (LAPACKE_TYPE*)m_matT.data(), lda, &sdim, (LAPACKE_TYPE*)w.data(), (LAPACKE_TYPE*)m_matU.data(), ldvs ); \ 76 m_info = NoConvergence; \ 78 m_isInitialized = true; \ 79 m_matUisUptodate = computeU; \ 91 #endif // EIGEN_COMPLEX_SCHUR_LAPACKE_H #define lapack_complex_float
std::complex< float > scomplex
std::complex< double > dcomplex
#define lapack_complex_double
#define EIGEN_LAPACKE_SCHUR_COMPLEX(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX, LAPACKE_PREFIX_U, EIGCOLROW, LAPACKE_COLROW)