Force early evaluation of boost expressions.

libeigen/eigen!2094
This commit is contained in:
Nicholas Vinson
2025-12-16 14:55:59 -05:00
committed by Rasmus Munk Larsen
parent 976f15ebca
commit fe973ab0c5
2 changed files with 3 additions and 2 deletions

View File

@@ -277,7 +277,8 @@ typename ComplexSchur<MatrixType>::ComplexScalar ComplexSchur<MatrixType>::compu
using std::abs;
if ((iter == 10 || iter == 20) && iu > 1) {
// exceptional shift, taken from http://www.netlib.org/eispack/comqr.f
return abs(numext::real(m_matT.coeff(iu, iu - 1))) + abs(numext::real(m_matT.coeff(iu - 1, iu - 2)));
return ComplexSchur<MatrixType>::ComplexScalar(
abs(numext::real(m_matT.coeff(iu, iu - 1))) + abs(numext::real(m_matT.coeff(iu - 1, iu - 2))));
}
// compute the shift as one of the eigenvalues of t, the 2x2