mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
fix performance regression due to check_rows_cols_for_overflow and add appropriate assertions in the PlainObjectBase::resize() functions.
The fix consists in disabling this useless test for statically allocated objects.
This commit is contained in:
@@ -724,12 +724,14 @@ void JacobiSVD<MatrixType, QRPreconditioner>::allocate(Index rows, Index cols, u
|
||||
}
|
||||
m_diagSize = (std::min)(m_rows, m_cols);
|
||||
m_singularValues.resize(m_diagSize);
|
||||
m_matrixU.resize(m_rows, m_computeFullU ? m_rows
|
||||
: m_computeThinU ? m_diagSize
|
||||
: 0);
|
||||
m_matrixV.resize(m_cols, m_computeFullV ? m_cols
|
||||
: m_computeThinV ? m_diagSize
|
||||
: 0);
|
||||
if(RowsAtCompileTime==Dynamic)
|
||||
m_matrixU.resize(m_rows, m_computeFullU ? m_rows
|
||||
: m_computeThinU ? m_diagSize
|
||||
: 0);
|
||||
if(ColsAtCompileTime==Dynamic)
|
||||
m_matrixV.resize(m_cols, m_computeFullV ? m_cols
|
||||
: m_computeThinV ? m_diagSize
|
||||
: 0);
|
||||
m_workMatrix.resize(m_diagSize, m_diagSize);
|
||||
|
||||
if(m_cols>m_rows) m_qr_precond_morecols.allocate(*this);
|
||||
|
||||
Reference in New Issue
Block a user