From c9ff739af17a94287186d85e05ea95bb35863d64 Mon Sep 17 00:00:00 2001 From: Arthur Date: Thu, 3 Mar 2022 19:24:07 +0000 Subject: [PATCH] Fix JacobiSVD_LAPACKE bindings --- Eigen/src/SVD/JacobiSVD_LAPACKE.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Eigen/src/SVD/JacobiSVD_LAPACKE.h b/Eigen/src/SVD/JacobiSVD_LAPACKE.h index 688df3155..c5717e9fd 100644 --- a/Eigen/src/SVD/JacobiSVD_LAPACKE.h +++ b/Eigen/src/SVD/JacobiSVD_LAPACKE.h @@ -42,12 +42,13 @@ namespace Eigen { #define EIGEN_LAPACKE_SVD(EIGTYPE, LAPACKE_TYPE, LAPACKE_RTYPE, LAPACKE_PREFIX, EIGCOLROW, LAPACKE_COLROW, OPTIONS) \ template<> inline \ JacobiSVD, OPTIONS>& \ -JacobiSVD, OPTIONS>::compute(const Matrix& matrix) \ +JacobiSVD, OPTIONS>::compute_impl(const Matrix& matrix, \ + unsigned int computationOptions) \ { \ typedef Matrix MatrixType; \ /*typedef MatrixType::Scalar Scalar;*/ \ /*typedef MatrixType::RealScalar RealScalar;*/ \ - allocate(matrix.rows(), matrix.cols()); \ + allocate(matrix.rows(), matrix.cols(), computationOptions); \ \ /*const RealScalar precision = RealScalar(2) * NumTraits::epsilon();*/ \ m_nonzeroSingularValues = m_diagSize; \ @@ -56,14 +57,14 @@ JacobiSVD, OPTION lapack_int matrix_order = LAPACKE_COLROW; \ char jobu, jobvt; \ LAPACKE_TYPE *u, *vt, dummy; \ - jobu = (ShouldComputeFullU) ? 'A' : (ShouldComputeThinU) ? 'S' : 'N'; \ - jobvt = (ShouldComputeFullV) ? 'A' : (ShouldComputeThinV) ? 'S' : 'N'; \ + jobu = (m_computeFullU) ? 'A' : (m_computeThinU) ? 'S' : 'N'; \ + jobvt = (m_computeFullV) ? 'A' : (m_computeThinV) ? 'S' : 'N'; \ if (computeU()) { \ ldu = internal::convert_index(m_matrixU.outerStride()); \ u = (LAPACKE_TYPE*)m_matrixU.data(); \ } else { ldu=1; u=&dummy; }\ MatrixType localV; \ - lapack_int vt_rows = (ShouldComputeFullV) ? internal::convert_index(m_cols) : (ShouldComputeThinV) ? internal::convert_index(m_diagSize) : 1; \ + lapack_int vt_rows = (m_computeFullV) ? internal::convert_index(m_cols) : (m_computeThinV) ? internal::convert_index(m_diagSize) : 1; \ if (computeV()) { \ localV.resize(vt_rows, m_cols); \ ldvt = internal::convert_index(localV.outerStride()); \