mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Reduce compiler memory consumption for SVD unit tests
This commit is contained in:
@@ -104,8 +104,8 @@ void test_bdcsvd()
|
|||||||
CALL_SUBTEST_7( BDCSVD<MatrixXf>(10,10) );
|
CALL_SUBTEST_7( BDCSVD<MatrixXf>(10,10) );
|
||||||
|
|
||||||
// Check that preallocation avoids subsequent mallocs
|
// Check that preallocation avoids subsequent mallocs
|
||||||
CALL_SUBTEST_9( svd_preallocate() );
|
CALL_SUBTEST_9( svd_preallocate<void>() );
|
||||||
|
|
||||||
CALL_SUBTEST_2( svd_underoverflow() );
|
CALL_SUBTEST_2( svd_underoverflow<void>() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ void test_jacobisvd()
|
|||||||
CALL_SUBTEST_7( JacobiSVD<MatrixXf>(10,10) );
|
CALL_SUBTEST_7( JacobiSVD<MatrixXf>(10,10) );
|
||||||
|
|
||||||
// Check that preallocation avoids subsequent mallocs
|
// Check that preallocation avoids subsequent mallocs
|
||||||
CALL_SUBTEST_9( svd_preallocate() );
|
CALL_SUBTEST_9( svd_preallocate<void>() );
|
||||||
|
|
||||||
CALL_SUBTEST_2( svd_underoverflow() );
|
CALL_SUBTEST_2( svd_underoverflow<void>() );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -307,6 +307,7 @@ void svd_inf_nan()
|
|||||||
|
|
||||||
// Regression test for bug 286: JacobiSVD loops indefinitely with some
|
// Regression test for bug 286: JacobiSVD loops indefinitely with some
|
||||||
// matrices containing denormal numbers.
|
// matrices containing denormal numbers.
|
||||||
|
template<typename>
|
||||||
void svd_underoverflow()
|
void svd_underoverflow()
|
||||||
{
|
{
|
||||||
#if defined __INTEL_COMPILER
|
#if defined __INTEL_COMPILER
|
||||||
@@ -384,6 +385,7 @@ void svd_all_trivial_2x2( void (*cb)(const MatrixType&,bool) )
|
|||||||
} while((id<int(value_set.size())).all());
|
} while((id<int(value_set.size())).all());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename>
|
||||||
void svd_preallocate()
|
void svd_preallocate()
|
||||||
{
|
{
|
||||||
Vector3f v(3.f, 2.f, 1.f);
|
Vector3f v(3.f, 2.f, 1.f);
|
||||||
|
|||||||
Reference in New Issue
Block a user