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; \
#define EIGEN_LAPACKE_SCHUR_COMPLEX(EIGTYPE, LAPACKE_TYPE, LAPACKE_PREFIX, LAPACKE_PREFIX_U, EIGCOLROW, LAPACKE_COLROW)
Definition: ComplexSchur_LAPACKE.h:40
@ ColMajor
Definition: Constants.h:319
@ RowMajor
Definition: Constants.h:321
#define LAPACK_COL_MAJOR
Definition: lapacke.h:123
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:122
#define lapack_complex_double
Definition: lapacke.h:92
#define lapack_complex_float
Definition: lapacke.h:76
Namespace containing all symbols from the Eigen library.
Definition: LDLT.h:16
std::complex< double > dcomplex
Definition: MKL_support.h:125
std::complex< float > scomplex
Definition: MKL_support.h:126