Limit test size for sparse Cholesky solvers to EIGEN_TEST_MAX_SIZE

This commit is contained in:
Christoph Hertzberg 2018-04-13 20:36:58 +02:00
parent 2cbb00b18e
commit c8b19702bc
2 changed files with 3 additions and 3 deletions

View File

@ -35,8 +35,8 @@ template<typename T, typename I> void test_simplicial_cholesky_T()
check_sparse_spd_determinant(ldlt_colmajor_lower_amd);
check_sparse_spd_determinant(ldlt_colmajor_upper_amd);
check_sparse_spd_solving(ldlt_colmajor_lower_nat, 300, 1000);
check_sparse_spd_solving(ldlt_colmajor_upper_nat, 300, 1000);
check_sparse_spd_solving(ldlt_colmajor_lower_nat, (std::min)(300,EIGEN_TEST_MAX_SIZE), 1000);
check_sparse_spd_solving(ldlt_colmajor_upper_nat, (std::min)(300,EIGEN_TEST_MAX_SIZE), 1000);
}
void test_simplicial_cholesky()

View File

@ -266,7 +266,7 @@ std::string solver_stats(const SparseSolverBase<Derived> &/*solver*/)
}
#endif
template<typename Solver> void check_sparse_spd_solving(Solver& solver, int maxSize = 300, int maxRealWorldSize = 100000)
template<typename Solver> void check_sparse_spd_solving(Solver& solver, int maxSize = (std::min)(300,EIGEN_TEST_MAX_SIZE), int maxRealWorldSize = 100000)
{
typedef typename Solver::MatrixType Mat;
typedef typename Mat::Scalar Scalar;