33 #ifndef EIGEN_JACOBISVD_LAPACKE_H 34 #define EIGEN_JACOBISVD_LAPACKE_H 40 #define EIGEN_LAPACKE_SVD(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_PREFIX, EIGCOLROW, LAPACKE_COLROW) \ 42 JacobiSVD<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW, Dynamic, Dynamic>, ColPivHouseholderQRPreconditioner>& \ 43 JacobiSVD<Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW, Dynamic, Dynamic>, ColPivHouseholderQRPreconditioner>::compute(const Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW, Dynamic, Dynamic>& matrix, unsigned int computationOptions) \ 45 typedef Matrix<EIGTYPE, Dynamic, Dynamic, EIGCOLROW, Dynamic, Dynamic> MatrixType; \ 48 allocate(matrix.rows(), matrix.cols(), computationOptions); \ 51 m_nonzeroSingularValues = m_diagSize; \ 53 lapack_int lda = internal::convert_index<lapack_int>(matrix.outerStride()), ldu, ldvt; \ 54 lapack_int matrix_order = LAPACKE_COLROW; \ 56 LAPACKE_TYPE *u, *vt, dummy; \ 57 jobu = (m_computeFullU) ? 'A' : (m_computeThinU) ? 'S' : 'N'; \ 58 jobvt = (m_computeFullV) ? 'A' : (m_computeThinV) ? 'S' : 'N'; \ 60 ldu = internal::convert_index<lapack_int>(m_matrixU.outerStride()); \ 61 u = (LAPACKE_TYPE*)m_matrixU.data(); \ 62 } else { ldu=1; u=&dummy; }\ 64 lapack_int vt_rows = (m_computeFullV) ? internal::convert_index<lapack_int>(m_cols) : (m_computeThinV) ? internal::convert_index<lapack_int>(m_diagSize) : 1; \ 66 localV.resize(vt_rows, m_cols); \ 67 ldvt = internal::convert_index<lapack_int>(localV.outerStride()); \ 68 vt = (LAPACKE_TYPE*)localV.data(); \ 69 } else { ldvt=1; vt=&dummy; }\ 70 Matrix<LAPACKE_RTYPE, Dynamic, Dynamic> superb; superb.resize(m_diagSize, 1); \ 71 MatrixType m_temp; m_temp = matrix; \ 72 LAPACKE_##LAPACKE_PREFIX##gesvd( matrix_order, jobu, jobvt, internal::convert_index<lapack_int>(m_rows), internal::convert_index<lapack_int>(m_cols), (LAPACKE_TYPE*)m_temp.data(), lda, (LAPACKE_RTYPE*)m_singularValues.data(), u, ldu, vt, ldvt, superb.data()); \ 73 if (computeV()) m_matrixV = localV.adjoint(); \ 75 m_isInitialized = true; \ 91 #endif // EIGEN_JACOBISVD_LAPACKE_H
#define lapack_complex_float
Namespace containing all symbols from the Eigen library.
std::complex< float > scomplex
std::complex< double > dcomplex
#define EIGEN_LAPACKE_SVD(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_PREFIX, EIGCOLROW, LAPACKE_COLROW)
#define lapack_complex_double