diff options
author | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2021-01-01 20:54:45 +0100 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2021-01-05 18:15:30 +0000 |
commit | 12dda34b15fe2ea4d994fafdba8c4666963e1a55 (patch) | |
tree | fc1d5f1c879b229b9421af3d0a8fe76302551eb8 /test | |
parent | 070d303d56d46d2e018a58214da24ca629ea454f (diff) |
Eliminate boolean product warnings by factoring out a
`combine_scalar_factors` helper function.
Diffstat (limited to 'test')
-rw-r--r-- | test/product_small.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/product_small.cpp b/test/product_small.cpp index 93876dba4..1d6df6e58 100644 --- a/test/product_small.cpp +++ b/test/product_small.cpp @@ -56,18 +56,17 @@ test_lazy_single(int rows, int cols, int depth) VERIFY_IS_APPROX(C+=A.lazyProduct(B), ref_prod(D,A,B)); } -template<typename T> -void test_dynamic_exact() +void test_dynamic_bool() { int rows = internal::random<int>(1,64); int cols = internal::random<int>(1,64); int depth = internal::random<int>(1,65); - typedef Matrix<T,Dynamic,Dynamic> MatrixX; + typedef Matrix<bool,Dynamic,Dynamic> MatrixX; MatrixX A(rows,depth); A.setRandom(); MatrixX B(depth,cols); B.setRandom(); - MatrixX C(rows,cols); C.setRandom(); - MatrixX D(C); + MatrixX C(rows,cols); C.setRandom(); + MatrixX D(C); for(Index i=0;i<C.rows();++i) for(Index j=0;j<C.cols();++j) for(Index k=0;k<A.cols();++k) @@ -317,7 +316,7 @@ EIGEN_DECLARE_TEST(product_small) CALL_SUBTEST_6( bug_1311<3>() ); CALL_SUBTEST_6( bug_1311<5>() ); - CALL_SUBTEST_9( test_dynamic_exact<bool>() ); + CALL_SUBTEST_9( test_dynamic_bool() ); } CALL_SUBTEST_6( product_small_regressions<0>() ); |