mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-20 08:39:37 +08:00
Limit matrix size when testing for NaN: they can become prohibitively expensive when running on x87 fp unit
This commit is contained in:
parent
ddaaa2d381
commit
9285647dfe
@ -149,7 +149,7 @@ template<typename MatrixType> void selfadjointeigensolver(const MatrixType& m)
|
||||
VERIFY_IS_APPROX(tridiag.matrixT(), eiSymmTridiag.eigenvectors().real() * eiSymmTridiag.eigenvalues().asDiagonal() * eiSymmTridiag.eigenvectors().real().transpose());
|
||||
}
|
||||
|
||||
if (rows > 1)
|
||||
if (rows > 1 && rows < 20)
|
||||
{
|
||||
// Test matrix with NaN
|
||||
symmC(0,0) = std::numeric_limits<typename MatrixType::RealScalar>::quiet_NaN();
|
||||
|
@ -25,7 +25,7 @@ template<typename MatrixType> void schur(int size = MatrixType::ColsAtCompileTim
|
||||
ComplexMatrixType T = schurOfA.matrixT();
|
||||
for(int row = 1; row < size; ++row) {
|
||||
for(int col = 0; col < row; ++col) {
|
||||
VERIFY(T(row,col) == (typename MatrixType::Scalar)0);
|
||||
VERIFY(T(row,col) == (typename MatrixType::Scalar)0);
|
||||
}
|
||||
}
|
||||
VERIFY_IS_APPROX(A.template cast<ComplexScalar>(), U * T * U.adjoint());
|
||||
@ -70,7 +70,7 @@ template<typename MatrixType> void schur(int size = MatrixType::ColsAtCompileTim
|
||||
VERIFY_IS_EQUAL(cs1.matrixT(), csOnlyT.matrixT());
|
||||
VERIFY_RAISES_ASSERT(csOnlyT.matrixU());
|
||||
|
||||
if (size > 1)
|
||||
if (size > 1 && size < 20)
|
||||
{
|
||||
// Test matrix with NaN
|
||||
A(0,0) = std::numeric_limits<typename MatrixType::RealScalar>::quiet_NaN();
|
||||
|
Loading…
x
Reference in New Issue
Block a user