33 #ifndef EIGEN_COMPLEX_SCHUR_LAPACKE_H
34 #define EIGEN_COMPLEX_SCHUR_LAPACKE_H
42 #define EIGEN_LAPACKE_SCHUR_COMPLEX(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX, LAPACKE_PREFIX_U, EIGCOLROW, LAPACKE_COLROW) \
43 template<> template<typename InputType> inline \
44 ComplexSchur<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >& \
45 ComplexSchur<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >::compute(const EigenBase<InputType>& matrix, bool computeU) \
47 typedef Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> MatrixType; \
48 typedef MatrixType::RealScalar RealScalar; \
49 typedef std::complex<RealScalar> ComplexScalar; \
51 eigen_assert(matrix.cols() == matrix.rows()); \
53 m_matUisUptodate = false; \
54 if(matrix.cols() == 1) \
56 m_matT = matrix.derived().template cast<ComplexScalar>(); \
57 if(computeU) m_matU = ComplexMatrixType::Identity(1,1); \
59 m_isInitialized = true; \
60 m_matUisUptodate = computeU; \
63 lapack_int n = internal::convert_index<lapack_int>(matrix.cols()), sdim, info; \
64 lapack_int matrix_order = LAPACKE_COLROW; \
65 char jobvs, sort='N'; \
66 LAPACK_##LAPACKE_PREFIX_U##_SELECT1 select = 0; \
67 jobvs = (computeU) ? 'V' : 'N'; \
68 m_matU.resize(n, n); \
69 lapack_int ldvs = internal::convert_index<lapack_int>(m_matU.outerStride()); \
71 lapack_int lda = internal::convert_index<lapack_int>(m_matT.outerStride()); \
72 Matrix<EIGTYPE, Dynamic, Dynamic> w; \
74 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 ); \
78 m_info = NoConvergence; \
80 m_isInitialized = true; \
81 m_matUisUptodate = computeU; \
#define EIGEN_LAPACKE_SCHUR_COMPLEX(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX, LAPACKE_PREFIX_U, EIGCOLROW, LAPACKE_COLROW)
#define lapack_complex_double
#define lapack_complex_float
std::complex< double > dcomplex
std::complex< float > scomplex