aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2018-06-08 10:14:57 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2018-06-08 10:14:57 +0200
commitf05dea6b2326836e5e0243fbaffbece84b833d64 (patch)
tree000de5f16b650b8a7571bdaaf0d670e688431ddf /Eigen
parent7933267c671c4166ca0f537a522168e398b94238 (diff)
bug #1550: prevent avoidable memory allocation in RealSchur
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Eigenvalues/RealSchur.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Eigenvalues/RealSchur.h b/Eigen/src/Eigenvalues/RealSchur.h
index b72799e5b..4c53344bb 100644
--- a/Eigen/src/Eigenvalues/RealSchur.h
+++ b/Eigen/src/Eigenvalues/RealSchur.h
@@ -284,13 +284,13 @@ RealSchur<MatrixType>& RealSchur<MatrixType>::computeFromHessenberg(const HessMa
using std::abs;
m_matT = matrixH;
+ m_workspaceVector.resize(m_matT.cols());
if(computeU)
- m_matU = matrixQ;
+ matrixQ.evalTo(m_matU, m_workspaceVector);
Index maxIters = m_maxIters;
if (maxIters == -1)
maxIters = m_maxIterationsPerRow * matrixH.rows();
- m_workspaceVector.resize(m_matT.cols());
Scalar* workspace = &m_workspaceVector.coeffRef(0);
// The matrix m_matT is divided in three parts.