From 4aca06f63a5aa4fa43f13452e42bfba769d8ba7d Mon Sep 17 00:00:00 2001 From: Charles Schlosser Date: Sun, 15 Jan 2023 01:34:10 +0000 Subject: [PATCH] avoid move assignment in ColPivHouseholderQR --- Eigen/src/QR/ColPivHouseholderQR.h | 12 ++++++------ Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Eigen/src/QR/ColPivHouseholderQR.h b/Eigen/src/QR/ColPivHouseholderQR.h index 53e386574..6855893e8 100644 --- a/Eigen/src/QR/ColPivHouseholderQR.h +++ b/Eigen/src/QR/ColPivHouseholderQR.h @@ -76,12 +76,12 @@ template class ColPivHousehold private: void init(Index rows, Index cols) { Index diag = numext::mini(rows, cols); - m_hCoeffs = HCoeffsType(diag); - m_colsPermutation = PermutationType(cols); - m_colsTranspositions = IntRowVectorType(cols); - m_temp = RealRowVectorType(cols); - m_colNormsUpdated = RealRowVectorType(cols); - m_colNormsDirect = RealRowVectorType(cols); + m_hCoeffs.resize(diag); + m_colsPermutation.resize(cols); + m_colsTranspositions.resize(cols); + m_temp.resize(cols); + m_colNormsUpdated.resize(cols); + m_colNormsDirect.resize(cols); m_isInitialized = false; m_usePrescribedThreshold = false; } diff --git a/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h b/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h index 6b8fb0384..8a6ae9bb9 100644 --- a/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +++ b/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h @@ -101,8 +101,8 @@ namespace Eigen { bool& usePrescribedThreshold, bool& isInitialized) { Index diag = numext::mini(rows, cols); - hCoeffs = HCoeffsType(diag); - colsPermutation = PermutationType(cols); + hCoeffs.resize(diag); + colsPermutation.resize(cols); usePrescribedThreshold = false; isInitialized = false; }