diff --git a/test/bdcsvd.cpp b/test/bdcsvd.cpp index 434bd4eb8..291210c81 100644 --- a/test/bdcsvd.cpp +++ b/test/bdcsvd.cpp @@ -101,14 +101,14 @@ void bdcsvd_verify_assert(const MatrixType& input = MatrixType()) { EIGEN_DECLARE_TEST(bdcsvd) { - CALL_SUBTEST_3((bdcsvd_verify_assert())); - CALL_SUBTEST_4((bdcsvd_verify_assert())); - CALL_SUBTEST_7((bdcsvd_verify_assert>())); - CALL_SUBTEST_7((bdcsvd_verify_assert>())); - CALL_SUBTEST_9((bdcsvd_verify_assert, 20, 27>>())); + CALL_SUBTEST_1((bdcsvd_verify_assert())); + CALL_SUBTEST_1((bdcsvd_verify_assert())); + CALL_SUBTEST_2((bdcsvd_verify_assert>())); + CALL_SUBTEST_2((bdcsvd_verify_assert>())); + CALL_SUBTEST_3((bdcsvd_verify_assert, 6, 9>>())); - CALL_SUBTEST_101((svd_all_trivial_2x2(bdcsvd_all_options))); - CALL_SUBTEST_102((svd_all_trivial_2x2(bdcsvd_all_options))); + CALL_SUBTEST_4((svd_all_trivial_2x2(bdcsvd_all_options))); + CALL_SUBTEST_5((svd_all_trivial_2x2(bdcsvd_all_options))); for (int i = 0; i < g_repeat; i++) { int r = internal::random(1, EIGEN_TEST_MAX_SIZE/2), @@ -117,58 +117,58 @@ EIGEN_DECLARE_TEST(bdcsvd) TEST_SET_BUT_UNUSED_VARIABLE(r) TEST_SET_BUT_UNUSED_VARIABLE(c) - CALL_SUBTEST_7((compare_bdc_jacobi(MatrixXf(r, c)))); - CALL_SUBTEST_10((compare_bdc_jacobi(MatrixXd(r, c)))); + CALL_SUBTEST_6((compare_bdc_jacobi(MatrixXf(r, c)))); + CALL_SUBTEST_7((compare_bdc_jacobi(MatrixXd(r, c)))); CALL_SUBTEST_8((compare_bdc_jacobi(MatrixXcd(r, c)))); // Test on inf/nan matrix - CALL_SUBTEST_7((svd_inf_nan())); + CALL_SUBTEST_9((svd_inf_nan())); CALL_SUBTEST_10((svd_inf_nan())); // Verify some computations using all combinations of the Options template parameter. - CALL_SUBTEST_3((bdcsvd_all_options())); - CALL_SUBTEST_3((bdcsvd_all_options>())); - CALL_SUBTEST_4((bdcsvd_all_options>())); - CALL_SUBTEST_4((bdcsvd_all_options>())); - CALL_SUBTEST_5((bdcsvd_all_options>(Matrix(r, 30)))); - CALL_SUBTEST_5((bdcsvd_all_options>(Matrix(20, c)))); - CALL_SUBTEST_7((bdcsvd_all_options(MatrixXf(r, c)))); - CALL_SUBTEST_8((bdcsvd_all_options(MatrixXcd(r, c)))); - CALL_SUBTEST_10((bdcsvd_all_options(MatrixXd(r, c)))); - CALL_SUBTEST_14((bdcsvd_all_options>())); - CALL_SUBTEST_14((bdcsvd_all_options>())); + CALL_SUBTEST_11((bdcsvd_all_options())); + CALL_SUBTEST_12((bdcsvd_all_options>())); + CALL_SUBTEST_13((bdcsvd_all_options(MatrixXd(20, 17)))); + CALL_SUBTEST_14((bdcsvd_all_options(MatrixXd(17, 20)))); + CALL_SUBTEST_15((bdcsvd_all_options>(Matrix(r, 15)))); + CALL_SUBTEST_16((bdcsvd_all_options>(Matrix(13, c)))); + CALL_SUBTEST_17((bdcsvd_all_options(MatrixXf(r, c)))); + CALL_SUBTEST_18((bdcsvd_all_options(MatrixXcd(r, c)))); + CALL_SUBTEST_19((bdcsvd_all_options(MatrixXd(r, c)))); + CALL_SUBTEST_20((bdcsvd_all_options>(Matrix(20, 27)))); + CALL_SUBTEST_21((bdcsvd_all_options>(Matrix(27, 20)))); - CALL_SUBTEST_15(( + CALL_SUBTEST_22(( svd_check_max_size_matrix, ColPivHouseholderQRPreconditioner>( r, c))); - CALL_SUBTEST_15( + CALL_SUBTEST_22( (svd_check_max_size_matrix, HouseholderQRPreconditioner>(r, c))); - CALL_SUBTEST_15(( + CALL_SUBTEST_22(( svd_check_max_size_matrix, ColPivHouseholderQRPreconditioner>( r, c))); - CALL_SUBTEST_15( + CALL_SUBTEST_22( (svd_check_max_size_matrix, HouseholderQRPreconditioner>(r, c))); } // test matrixbase method - CALL_SUBTEST_1(( bdcsvd_method() )); - CALL_SUBTEST_3(( bdcsvd_method() )); + CALL_SUBTEST_23(( bdcsvd_method() )); + CALL_SUBTEST_23(( bdcsvd_method() )); // Test problem size constructors - CALL_SUBTEST_7( BDCSVD(10,10) ); + CALL_SUBTEST_24( BDCSVD(10,10) ); // Check that preallocation avoids subsequent mallocs // Disabled because not supported by BDCSVD // CALL_SUBTEST_9( svd_preallocate() ); - CALL_SUBTEST_2( svd_underoverflow() ); + CALL_SUBTEST_25( svd_underoverflow() ); // Without total deflation issues. - CALL_SUBTEST_11(( compare_bdc_jacobi_instance(true) )); - CALL_SUBTEST_12(( compare_bdc_jacobi_instance(false) )); + CALL_SUBTEST_26(( compare_bdc_jacobi_instance(true) )); + CALL_SUBTEST_26(( compare_bdc_jacobi_instance(false) )); // With total deflation issues before, when it shouldn't be triggered. - CALL_SUBTEST_13(( compare_bdc_jacobi_instance(true, 3) )); - CALL_SUBTEST_14(( compare_bdc_jacobi_instance(false, 3) )); + CALL_SUBTEST_27(( compare_bdc_jacobi_instance(true, 3) )); + CALL_SUBTEST_27(( compare_bdc_jacobi_instance(false, 3) )); } diff --git a/test/jacobisvd.cpp b/test/jacobisvd.cpp index 724e29f58..76194f70b 100644 --- a/test/jacobisvd.cpp +++ b/test/jacobisvd.cpp @@ -112,19 +112,19 @@ void msvc_workaround() EIGEN_DECLARE_TEST(jacobisvd) { - CALL_SUBTEST_4((jacobisvd_verify_inputs())); - CALL_SUBTEST_7((jacobisvd_verify_inputs(Matrix(10, 12)))); - CALL_SUBTEST_8((jacobisvd_verify_inputs, 7, 5>>())); + CALL_SUBTEST_1((jacobisvd_verify_inputs())); + CALL_SUBTEST_1((jacobisvd_verify_inputs(Matrix(5, 6)))); + CALL_SUBTEST_1((jacobisvd_verify_inputs, 7, 5>>())); - CALL_SUBTEST_3((jacobisvd_verify_assert())); - CALL_SUBTEST_4((jacobisvd_verify_assert())); - CALL_SUBTEST_7((jacobisvd_verify_assert>())); - CALL_SUBTEST_7((jacobisvd_verify_assert>())); - CALL_SUBTEST_7((jacobisvd_verify_assert(MatrixXf(10, 12)))); - CALL_SUBTEST_8((jacobisvd_verify_assert(MatrixXcd(7, 5)))); + CALL_SUBTEST_2((jacobisvd_verify_assert())); + CALL_SUBTEST_2((jacobisvd_verify_assert())); + CALL_SUBTEST_2((jacobisvd_verify_assert>())); + CALL_SUBTEST_2((jacobisvd_verify_assert>())); + CALL_SUBTEST_2((jacobisvd_verify_assert(MatrixXf(10, 12)))); + CALL_SUBTEST_2((jacobisvd_verify_assert(MatrixXcd(7, 5)))); - CALL_SUBTEST_11(svd_all_trivial_2x2(jacobisvd_all_options)); - CALL_SUBTEST_12(svd_all_trivial_2x2(jacobisvd_all_options)); + CALL_SUBTEST_3(svd_all_trivial_2x2(jacobisvd_all_options)); + CALL_SUBTEST_4(svd_all_trivial_2x2(jacobisvd_all_options)); for (int i = 0; i < g_repeat; i++) { int r = internal::random(1, 30), @@ -132,65 +132,65 @@ EIGEN_DECLARE_TEST(jacobisvd) TEST_SET_BUT_UNUSED_VARIABLE(r) TEST_SET_BUT_UNUSED_VARIABLE(c) - - CALL_SUBTEST_3((jacobisvd_all_options())); - CALL_SUBTEST_3((jacobisvd_all_options>())); - CALL_SUBTEST_4((jacobisvd_all_options())); - CALL_SUBTEST_4((jacobisvd_all_options>())); - CALL_SUBTEST_4((jacobisvd_all_options>())); - CALL_SUBTEST_5((jacobisvd_all_options>(Matrix(r, 16)))); - CALL_SUBTEST_5((jacobisvd_all_options>(Matrix(10, c)))); - CALL_SUBTEST_7((jacobisvd_all_options(MatrixXf(r, c)))); - CALL_SUBTEST_8((jacobisvd_all_options(MatrixXcd(r, c)))); - CALL_SUBTEST_10((jacobisvd_all_options(MatrixXd(r, c)))); - CALL_SUBTEST_14((jacobisvd_all_options>())); - CALL_SUBTEST_14((jacobisvd_all_options>())); + + CALL_SUBTEST_5((jacobisvd_all_options())); + CALL_SUBTEST_6((jacobisvd_all_options())); + CALL_SUBTEST_7((jacobisvd_all_options>())); + CALL_SUBTEST_8((jacobisvd_all_options>())); + CALL_SUBTEST_9((jacobisvd_all_options>())); + CALL_SUBTEST_10((jacobisvd_all_options>(Matrix(r, 5)))); + CALL_SUBTEST_11((jacobisvd_all_options>(Matrix(5, c)))); + CALL_SUBTEST_12((jacobisvd_all_options(MatrixXf(r, c)))); + CALL_SUBTEST_13((jacobisvd_all_options(MatrixXcd(r, c)))); + CALL_SUBTEST_14((jacobisvd_all_options(MatrixXd(r, c)))); + CALL_SUBTEST_15((jacobisvd_all_options>())); + CALL_SUBTEST_16((jacobisvd_all_options>())); MatrixXcd noQRTest = MatrixXcd(r, r); svd_fill_random(noQRTest); - CALL_SUBTEST_16((svd_option_checks(noQRTest))); + CALL_SUBTEST_17((svd_option_checks(noQRTest))); - CALL_SUBTEST_15(( + CALL_SUBTEST_18(( svd_check_max_size_matrix, ColPivHouseholderQRPreconditioner>( r, c))); - CALL_SUBTEST_15( + CALL_SUBTEST_18( (svd_check_max_size_matrix, HouseholderQRPreconditioner>(r, c))); - CALL_SUBTEST_15(( + CALL_SUBTEST_18(( svd_check_max_size_matrix, ColPivHouseholderQRPreconditioner>( r, c))); - CALL_SUBTEST_15( + CALL_SUBTEST_18( (svd_check_max_size_matrix, HouseholderQRPreconditioner>(r, c))); // Test on inf/nan matrix - CALL_SUBTEST_7((svd_inf_nan())); - CALL_SUBTEST_10((svd_inf_nan())); + CALL_SUBTEST_19((svd_inf_nan())); + CALL_SUBTEST_19((svd_inf_nan())); - CALL_SUBTEST_13((jacobisvd_verify_assert>())); - CALL_SUBTEST_13((jacobisvd_verify_assert>())); - CALL_SUBTEST_13((jacobisvd_verify_assert>(Matrix(r)))); - CALL_SUBTEST_13((jacobisvd_verify_assert>(Matrix(c)))); + CALL_SUBTEST_20((jacobisvd_verify_assert>())); + CALL_SUBTEST_20((jacobisvd_verify_assert>())); + CALL_SUBTEST_20((jacobisvd_verify_assert>(Matrix(r)))); + CALL_SUBTEST_20((jacobisvd_verify_assert>(Matrix(c)))); } - CALL_SUBTEST_7((jacobisvd_all_options( + CALL_SUBTEST_21((jacobisvd_all_options( MatrixXd(internal::random(EIGEN_TEST_MAX_SIZE / 4, EIGEN_TEST_MAX_SIZE / 2), internal::random(EIGEN_TEST_MAX_SIZE / 4, EIGEN_TEST_MAX_SIZE / 2))))); - CALL_SUBTEST_8((jacobisvd_all_options( + CALL_SUBTEST_22((jacobisvd_all_options( MatrixXcd(internal::random(EIGEN_TEST_MAX_SIZE / 4, EIGEN_TEST_MAX_SIZE / 3), internal::random(EIGEN_TEST_MAX_SIZE / 4, EIGEN_TEST_MAX_SIZE / 3))))); // test matrixbase method - CALL_SUBTEST_1(( jacobisvd_method() )); - CALL_SUBTEST_3(( jacobisvd_method() )); + CALL_SUBTEST_23(( jacobisvd_method() )); + CALL_SUBTEST_23(( jacobisvd_method() )); // Test problem size constructors - CALL_SUBTEST_7( JacobiSVD(10,10) ); + CALL_SUBTEST_24( JacobiSVD(10,10) ); // Check that preallocation avoids subsequent mallocs - CALL_SUBTEST_9( svd_preallocate() ); + CALL_SUBTEST_25( svd_preallocate() ); - CALL_SUBTEST_2( svd_underoverflow() ); + CALL_SUBTEST_26( svd_underoverflow() ); msvc_workaround(); }