mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
sparse_solve_retval_base::defaultEvalTo created extremely oversized temporary matrices in some cases
This commit is contained in:
parent
aa0db35185
commit
66f1c56aab
@ -54,8 +54,10 @@ template<typename _DecompositionType, typename Rhs> struct sparse_solve_retval_b
|
||||
static const int NbColsAtOnce = 4;
|
||||
int rhsCols = m_rhs.cols();
|
||||
int size = m_rhs.rows();
|
||||
Eigen::Matrix<DestScalar,Dynamic,Dynamic> tmp(size,rhsCols);
|
||||
Eigen::Matrix<DestScalar,Dynamic,Dynamic> tmpX(size,rhsCols);
|
||||
// the temporary matrices do not need more columns than NbColsAtOnce:
|
||||
int tmpCols = (std::min)(rhsCols, NbColsAtOnce);
|
||||
Eigen::Matrix<DestScalar,Dynamic,Dynamic> tmp(size,tmpCols);
|
||||
Eigen::Matrix<DestScalar,Dynamic,Dynamic> tmpX(size,tmpCols);
|
||||
for(int k=0; k<rhsCols; k+=NbColsAtOnce)
|
||||
{
|
||||
int actualCols = std::min<int>(rhsCols-k, NbColsAtOnce);
|
||||
|
Loading…
Reference in New Issue
Block a user