33 #ifndef EIGEN_COMPLEX_SCHUR_MKL_H 34 #define EIGEN_COMPLEX_SCHUR_MKL_H 42 #define EIGEN_MKL_SCHUR_COMPLEX(EIGTYPE, MKLTYPE, MKLPREFIX, MKLPREFIX_U, EIGCOLROW, MKLCOLROW) \ 44 ComplexSchur<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >& \ 45 ComplexSchur<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> >::compute(const Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW>& matrix, bool computeU) \ 47 typedef Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW> MatrixType; \ 48 typedef MatrixType::Scalar Scalar; \ 49 typedef MatrixType::RealScalar RealScalar; \ 50 typedef std::complex<RealScalar> ComplexScalar; \ 52 eigen_assert(matrix.cols() == matrix.rows()); \ 54 m_matUisUptodate = false; \ 55 if(matrix.cols() == 1) \ 57 m_matT = matrix.cast<ComplexScalar>(); \ 58 if(computeU) m_matU = ComplexMatrixType::Identity(1,1); \ 60 m_isInitialized = true; \ 61 m_matUisUptodate = computeU; \ 64 lapack_int n = matrix.cols(), sdim, info; \ 65 lapack_int lda = matrix.outerStride(); \ 66 lapack_int matrix_order = MKLCOLROW; \ 67 char jobvs, sort='N'; \ 68 LAPACK_##MKLPREFIX_U##_SELECT1 select = 0; \ 69 jobvs = (computeU) ? 'V' : 'N'; \ 70 m_matU.resize(n, n); \ 71 lapack_int ldvs = m_matU.outerStride(); \ 73 Matrix<EIGTYPE, Dynamic, Dynamic> w; \ 75 info = LAPACKE_##MKLPREFIX##gees( matrix_order, jobvs, sort, select, n, (MKLTYPE*)m_matT.data(), lda, &sdim, (MKLTYPE*)w.data(), (MKLTYPE*)m_matU.data(), ldvs ); \ 79 m_info = NoConvergence; \ 81 m_isInitialized = true; \ 82 m_matUisUptodate = computeU; \ 94 #endif // EIGEN_COMPLEX_SCHUR_MKL_H
#define EIGEN_MKL_SCHUR_COMPLEX(EIGTYPE, MKLTYPE, MKLPREFIX, MKLPREFIX_U, EIGCOLROW, MKLCOLROW)