From fc92fe31252f19c632468a311270c1d449987097 Mon Sep 17 00:00:00 2001 From: Martin Heistermann Date: Mon, 22 Jan 2024 17:37:36 +0000 Subject: [PATCH] SPQR: Fix build error, Index/StorageIndex mismatch. --- Eigen/src/SPQRSupport/SuiteSparseQRSupport.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h b/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h index 1eb07f7c6..313279488 100644 --- a/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +++ b/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h @@ -142,8 +142,8 @@ class SPQR : public SparseSolverBase > { cholmod_sparse A; A = viewAsCholmod(mat); m_rows = matrix.rows(); - Index col = matrix.cols(); - m_rank = SuiteSparseQR(m_ordering, pivotThreshold, col, &A, &m_cR, &m_E, &m_H, &m_HPinv, &m_HTau, &m_cc); + m_rank = SuiteSparseQR(m_ordering, pivotThreshold, internal::convert_index(matrix.cols()), &A, + &m_cR, &m_E, &m_H, &m_HPinv, &m_HTau, &m_cc); if (!m_cR) { m_info = NumericalIssue; @@ -196,7 +196,7 @@ class SPQR : public SparseSolverBase > { const MatrixType matrixR() const { eigen_assert(m_isInitialized && " The QR factorization should be computed first, call compute()"); if (!m_isRUpToDate) { - m_R = viewAsEigen(*m_cR); + m_R = viewAsEigen(*m_cR); m_isRUpToDate = true; } return m_R;