From 3c9289129b49d1f0c83f5f0468200cc7692ce380 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 15 Jun 2012 23:22:34 +0200 Subject: [PATCH] prevent the allocation of the two preconditioner, only one is needed --- Eigen/src/SVD/JacobiSVD.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/SVD/JacobiSVD.h b/Eigen/src/SVD/JacobiSVD.h index 745119522..9eadaa9fc 100644 --- a/Eigen/src/SVD/JacobiSVD.h +++ b/Eigen/src/SVD/JacobiSVD.h @@ -732,8 +732,8 @@ void JacobiSVD::allocate(Index rows, Index cols, u : 0); m_workMatrix.resize(m_diagSize, m_diagSize); - m_qr_precond_morecols.allocate(*this); - m_qr_precond_morerows.allocate(*this); + if(m_cols>m_rows) m_qr_precond_morecols.allocate(*this); + if(m_rows>m_cols) m_qr_precond_morerows.allocate(*this); } template