From 1ef7fb428aa0ff9ae6b46d98b49d7090c38f693d Mon Sep 17 00:00:00 2001 From: Edward Smyth Date: Thu, 4 Apr 2024 08:56:33 -0400 Subject: [PATCH] GTestSuite: print name of variable in error messages Add name of variable being tested in error output from computediff functions. First step to adding (optional) tests on input arguments. AMD-Internal: [CPUPL-4379] Change-Id: I9553b660bcf5ecf1dd675cb837655078933455ac --- .../extension/imatcopy/imatcopy_IIT_ERS.cpp | 16 +-- .../extension/imatcopy/test_imatcopy.h | 4 +- .../extension/omatcopy/omatcopy_IIT_ERS.cpp | 16 +-- .../extension/omatcopy/test_omatcopy.h | 4 +- .../extension/omatcopy2/omatcopy2_IIT_ERS.cpp | 20 +-- .../extension/omatcopy2/test_omatcopy2.h | 4 +- gtestsuite/testsuite/inc/check_error.h | 117 +++++++++++++----- gtestsuite/testsuite/level1/addv/test_addv.h | 2 +- .../testsuite/level1/amaxv/amaxv_IIT_ERS.cpp | 14 +-- .../testsuite/level1/amaxv/test_amaxv.h | 4 +- .../testsuite/level1/axpbyv/IIT_ERS_test.cpp | 10 +- .../testsuite/level1/axpbyv/test_axpbyv.h | 4 +- .../testsuite/level1/axpyf/test_axpyf.h | 2 +- .../testsuite/level1/axpyv/IIT_ERS_test.cpp | 12 +- .../testsuite/level1/axpyv/test_axpyv.h | 4 +- .../testsuite/level1/copyv/IIT_ERS_test.cpp | 10 +- .../testsuite/level1/copyv/test_copyv.h | 2 +- .../testsuite/level1/dotv/dotv_IIT_ERS.cpp | 10 +- gtestsuite/testsuite/level1/dotv/test_dotv.h | 4 +- .../testsuite/level1/dotxf/test_dotxf.h | 2 +- .../testsuite/level1/dotxv/test_dotxv.h | 2 +- .../testsuite/level1/scal2v/test_scal2v.h | 2 +- .../testsuite/level1/scalv/scalv_IIT_ERS.cpp | 16 +-- .../level1/scalv/scalv_extreme_cases.cpp | 4 +- .../testsuite/level1/scalv/test_scalv.h | 4 +- .../testsuite/level1/subv/subv_IIT_ERS.cpp | 8 +- gtestsuite/testsuite/level1/subv/test_subv.h | 4 +- .../testsuite/level1/swapv/swapv_IIT_ERS.cpp | 8 +- .../testsuite/level1/xpbyv/test_xpbyv.h | 2 +- .../testsuite/level2/gemv/gemv_IIT_ERS.cpp | 13 +- gtestsuite/testsuite/level2/gemv/test_gemv.h | 2 +- .../testsuite/level2/ger/ger_IIT_ERS.cpp | 32 ++--- gtestsuite/testsuite/level2/ger/test_ger.h | 4 +- gtestsuite/testsuite/level2/hemv/test_hemv.h | 2 +- gtestsuite/testsuite/level2/her/test_her.h | 2 +- gtestsuite/testsuite/level2/her2/test_her2.h | 2 +- gtestsuite/testsuite/level2/symv/test_symv.h | 2 +- gtestsuite/testsuite/level2/syr/test_syr.h | 2 +- gtestsuite/testsuite/level2/syr2/test_syr2.h | 2 +- gtestsuite/testsuite/level2/trmv/test_trmv.h | 2 +- .../testsuite/level2/trsv/IIT_ERS_test.cpp | 16 +-- gtestsuite/testsuite/level2/trsv/test_trsv.h | 2 +- .../testsuite/level3/gemm/IIT_ERS_test.cpp | 28 ++--- gtestsuite/testsuite/level3/gemm/test_gemm.h | 6 +- .../gemm_compute/gemm_compute_IIT_ERS.cpp | 22 ++-- .../level3/gemm_compute/test_gemm_compute.h | 2 +- .../testsuite/level3/gemmt/IIT_ERS_test.cpp | 22 ++-- .../testsuite/level3/gemmt/test_gemmt.h | 2 +- gtestsuite/testsuite/level3/hemm/test_hemm.h | 2 +- .../testsuite/level3/her2k/test_her2k.h | 2 +- gtestsuite/testsuite/level3/herk/test_herk.h | 3 +- gtestsuite/testsuite/level3/symm/test_symm.h | 2 +- .../testsuite/level3/syr2k/test_syr2k.h | 2 +- gtestsuite/testsuite/level3/syrk/test_syrk.h | 5 +- gtestsuite/testsuite/level3/trmm/test_trmm.h | 2 +- .../testsuite/level3/trmm3/test_trmm3.h | 2 +- .../testsuite/level3/trsm/IIT_ERS_test.cpp | 22 ++-- gtestsuite/testsuite/level3/trsm/test_trsm.h | 2 +- .../testsuite/ukr/amaxv/test_amaxv_ukr.h | 2 +- .../testsuite/ukr/axpbyv/test_axpbyv_ukr.h | 2 +- .../testsuite/ukr/axpyv/test_axpyv_ukr.h | 2 +- .../testsuite/ukr/copyv/test_copyv_ukr.h | 2 +- gtestsuite/testsuite/ukr/dotv/test_dotv_ukr.h | 2 +- .../testsuite/ukr/gemm/dgemm_ukernel.cpp | 4 +- .../testsuite/ukr/gemm/sgemm_ukernel.cpp | 2 +- .../ukr/gemm/test_complex_gemm_ukr.h | 4 +- gtestsuite/testsuite/ukr/gemm/test_gemm_ukr.h | 6 +- gtestsuite/testsuite/ukr/nrm2/test_nrm2_ukr.h | 2 +- .../testsuite/ukr/scalv/test_scalv_ukr.h | 2 +- gtestsuite/testsuite/ukr/trsm/test_trsm_ukr.h | 6 +- .../testsuite/util/asumv/asumv_IIT_ERS.cpp | 14 +-- gtestsuite/testsuite/util/asumv/test_asumv.h | 6 +- .../testsuite/util/nrm2/nrm2_corner_cases.cpp | 8 +- .../util/nrm2/nrm2_invalid_inputs.cpp | 2 +- .../util/nrm2/nrm2_underflow_overflow.cpp | 22 ++-- gtestsuite/testsuite/util/nrm2/test_nrm2.h | 4 +- 76 files changed, 333 insertions(+), 279 deletions(-) diff --git a/gtestsuite/testsuite/extension/imatcopy/imatcopy_IIT_ERS.cpp b/gtestsuite/testsuite/extension/imatcopy/imatcopy_IIT_ERS.cpp index 3777231a5..745a5dd39 100644 --- a/gtestsuite/testsuite/extension/imatcopy/imatcopy_IIT_ERS.cpp +++ b/gtestsuite/testsuite/extension/imatcopy/imatcopy_IIT_ERS.cpp @@ -73,7 +73,7 @@ TYPED_TEST(imatcopy_IIT_ERS, invalid_transa) // Call imatcopy with a invalid value for TRANS value for the operation. imatcopy( 'Q', M, N, alpha, A.data(), LDA, LDA ); // Use bitwise comparison (no threshold). - computediff( 'c', M, N, A.data(), A_ref.data(), LDA ); + computediff( "A", 'c', M, N, A.data(), A_ref.data(), LDA ); } // When m < 0 @@ -91,7 +91,7 @@ TYPED_TEST(imatcopy_IIT_ERS, m_lt_zero) // Call imatcopy with a invalid m for the operation. imatcopy( TRANS, -1, N, alpha, A.data(), LDA, LDA ); // Use bitwise comparison (no threshold). - computediff( 'c', M, N, A.data(), A_ref.data(), LDA ); + computediff( "A", 'c', M, N, A.data(), A_ref.data(), LDA ); } // When n < 0 @@ -109,7 +109,7 @@ TYPED_TEST(imatcopy_IIT_ERS, n_lt_zero) // Call imatcopy with a invalid n for the operation. imatcopy( TRANS, M, -1, alpha, A.data(), LDA, LDA ); // Use bitwise comparison (no threshold). - computediff( 'c', M, N, A.data(), A_ref.data(), LDA ); + computediff( "A", 'c', M, N, A.data(), A_ref.data(), LDA ); } // When lda < m @@ -131,7 +131,7 @@ TYPED_TEST(imatcopy_IIT_ERS, invalid_lda_in) // Call imatcopy with a invalid lda for the operation. imatcopy( 'n', m, n, alpha, A.data(), m - 1, m ); // Use bitwise comparison (no threshold). - computediff( 'c', m, n, A.data(), A_ref.data(), m ); + computediff( "A", 'c', m, n, A.data(), A_ref.data(), m ); } // When lda_out < m, with trans == 'n' @@ -153,7 +153,7 @@ TYPED_TEST(imatcopy_IIT_ERS, invalid_lda_out_no_transpose) // Call imatcopy with a invalid lda for the operation. imatcopy( 'n', m, n, alpha, A.data(), m, m-1 ); // Use bitwise comparison (no threshold). - computediff( 'c', m, n, A.data(), A_ref.data(), m ); + computediff( "A", 'c', m, n, A.data(), A_ref.data(), m ); } // When lda_out < m, with trans == 'r' @@ -175,7 +175,7 @@ TYPED_TEST(imatcopy_IIT_ERS, invalid_lda_out_conjugate) // Call imatcopy with a invalid lda for the operation. imatcopy( 'r', m, n, alpha, A.data(), m, m-1 ); // Use bitwise comparison (no threshold). - computediff( 'c', m, n, A.data(), A_ref.data(), m ); + computediff( "A", 'c', m, n, A.data(), A_ref.data(), m ); } // When lda_out < m, with trans == 't' @@ -197,7 +197,7 @@ TYPED_TEST(imatcopy_IIT_ERS, invalid_lda_out_transpose) // Call imatcopy with a invalid lda for the operation. imatcopy( 'n', m, n, alpha, A.data(), m, n-1 ); // Use bitwise comparison (no threshold). - computediff( 'c', m, n, A.data(), A_ref.data(), m ); + computediff( "A", 'c', m, n, A.data(), A_ref.data(), m ); } // When lda_out < m, with trans == 'c' @@ -219,6 +219,6 @@ TYPED_TEST(imatcopy_IIT_ERS, invalid_lda_out_conjugate_transpose) // Call imatcopy with a invalid lda for the operation. imatcopy( 'n', m, n, alpha, A.data(), m, n-1 ); // Use bitwise comparison (no threshold). - computediff( 'c', m, n, A.data(), A_ref.data(), m ); + computediff( "A", 'c', m, n, A.data(), A_ref.data(), m ); } #endif diff --git a/gtestsuite/testsuite/extension/imatcopy/test_imatcopy.h b/gtestsuite/testsuite/extension/imatcopy/test_imatcopy.h index bcd316d49..2fe9dea6a 100644 --- a/gtestsuite/testsuite/extension/imatcopy/test_imatcopy.h +++ b/gtestsuite/testsuite/extension/imatcopy/test_imatcopy.h @@ -134,8 +134,8 @@ static void test_imatcopy( char storage, char trans, gtint_t m, gtint_t n, T alp //---------------------------------------------------------- if( A_out_trans == 'n' ) - computediff( storage, m, n, A, A_ref, lda_out, thresh, is_nan_inf_test ); + computediff( "A", storage, m, n, A, A_ref, lda_out, thresh, is_nan_inf_test ); else - computediff( storage, n, m, A, A_ref, lda_out, thresh, is_nan_inf_test ); + computediff( "A", storage, n, m, A, A_ref, lda_out, thresh, is_nan_inf_test ); } diff --git a/gtestsuite/testsuite/extension/omatcopy/omatcopy_IIT_ERS.cpp b/gtestsuite/testsuite/extension/omatcopy/omatcopy_IIT_ERS.cpp index a18300a96..fabf1d875 100644 --- a/gtestsuite/testsuite/extension/omatcopy/omatcopy_IIT_ERS.cpp +++ b/gtestsuite/testsuite/extension/omatcopy/omatcopy_IIT_ERS.cpp @@ -74,7 +74,7 @@ TYPED_TEST(omatcopy_IIT_ERS, invalid_transa) // Call OMATCOPY with a invalid value for TRANS value for the operation. omatcopy( 'Q', M, N, alpha, A.data(), LDA, B.data(), LDB); // Use bitwise comparison (no threshold). - computediff( 'c', M, N, B.data(), B_ref.data(), LDB ); + computediff( "B", 'c', M, N, B.data(), B_ref.data(), LDB ); } // When m < 0 @@ -93,7 +93,7 @@ TYPED_TEST(omatcopy_IIT_ERS, m_lt_zero) // Call OMATCOPY with a invalid m for the operation. omatcopy( TRANS, -1, N, alpha, A.data(), LDA, B.data(), LDB); // Use bitwise comparison (no threshold). - computediff( 'c', M, N, B.data(), B_ref.data(), LDB ); + computediff( "B", 'c', M, N, B.data(), B_ref.data(), LDB ); } // When n < 0 @@ -112,7 +112,7 @@ TYPED_TEST(omatcopy_IIT_ERS, n_lt_zero) // Call OMATCOPY with a invalid n for the operation. omatcopy( TRANS, M, -1, alpha, A.data(), LDA, B.data(), LDB); // Use bitwise comparison (no threshold). - computediff( 'c', M, N, B.data(), B_ref.data(), LDB ); + computediff( "B", 'c', M, N, B.data(), B_ref.data(), LDB ); } // When lda < m @@ -136,7 +136,7 @@ TYPED_TEST(omatcopy_IIT_ERS, invalid_lda) // Call OMATCOPY with a invalid lda for the operation. omatcopy( 'n', m, n, alpha, A.data(), m - 1, B.data(), m); // Use bitwise comparison (no threshold). - computediff( 'c', m, n, B.data(), B_ref.data(), m ); + computediff( "B", 'c', m, n, B.data(), B_ref.data(), m ); } // When ldb < m, with trans == 'n' @@ -161,7 +161,7 @@ TYPED_TEST(omatcopy_IIT_ERS, invalid_ldb_no_transpose) // Call OMATCOPY with a invalid ldb for the operation. omatcopy( trans, m, n, alpha, A.data(), m, B.data(), m - 1 ); // Use bitwise comparison (no threshold). - computediff( 'c', m, n, B.data(), B_ref.data(), m ); + computediff( "B", 'c', m, n, B.data(), B_ref.data(), m ); } // When ldb < m, with trans == 'r' @@ -186,7 +186,7 @@ TYPED_TEST(omatcopy_IIT_ERS, invalid_ldb_conjugate) // Call OMATCOPY with a invalid ldb for the operation. omatcopy( trans, m, n, alpha, A.data(), m, B.data(), m - 1 ); // Use bitwise comparison (no threshold). - computediff( 'c', m, n, B.data(), B_ref.data(), m ); + computediff( "B", 'c', m, n, B.data(), B_ref.data(), m ); } // When ldb < m, with trans == 't' @@ -211,7 +211,7 @@ TYPED_TEST(omatcopy_IIT_ERS, invalid_ldb_transpose) // Call OMATCOPY with a invalid ldb for the operation. omatcopy( trans, m, n, alpha, A.data(), m, B.data(), n - 1 ); // Use bitwise comparison (no threshold). - computediff( 'c', n, m, B.data(), B_ref.data(), n ); + computediff( "B", 'c', n, m, B.data(), B_ref.data(), n ); } // When ldb < m, with trans == 'c' @@ -236,6 +236,6 @@ TYPED_TEST(omatcopy_IIT_ERS, invalid_ldb_conjugate_transpose) // Call OMATCOPY with a invalid ldb for the operation. omatcopy( trans, m, n, alpha, A.data(), m, B.data(), n - 1 ); // Use bitwise comparison (no threshold). - computediff( 'c', n, m, B.data(), B_ref.data(), n ); + computediff( "B", 'c', n, m, B.data(), B_ref.data(), n ); } #endif diff --git a/gtestsuite/testsuite/extension/omatcopy/test_omatcopy.h b/gtestsuite/testsuite/extension/omatcopy/test_omatcopy.h index 6949c1516..12b1835f3 100644 --- a/gtestsuite/testsuite/extension/omatcopy/test_omatcopy.h +++ b/gtestsuite/testsuite/extension/omatcopy/test_omatcopy.h @@ -136,9 +136,9 @@ static void test_omatcopy( char storage, char trans, gtint_t m, gtint_t n, T alp //---------------------------------------------------------- if( B_trans == 'n' ) - computediff( storage, m, n, B, B_ref, ldb, thresh, is_nan_inf_test ); + computediff( "B", storage, m, n, B, B_ref, ldb, thresh, is_nan_inf_test ); else - computediff( storage, n, m, B, B_ref, ldb, thresh, is_nan_inf_test ); + computediff( "B", storage, n, m, B, B_ref, ldb, thresh, is_nan_inf_test ); } diff --git a/gtestsuite/testsuite/extension/omatcopy2/omatcopy2_IIT_ERS.cpp b/gtestsuite/testsuite/extension/omatcopy2/omatcopy2_IIT_ERS.cpp index e2edc9f60..0c834c0bb 100644 --- a/gtestsuite/testsuite/extension/omatcopy2/omatcopy2_IIT_ERS.cpp +++ b/gtestsuite/testsuite/extension/omatcopy2/omatcopy2_IIT_ERS.cpp @@ -76,7 +76,7 @@ TYPED_TEST(omatcopy2_IIT_ERS, invalid_transa) // Call OMATCOPY2 with a invalid value for TRANS value for the operation. omatcopy2( 'Q', M, N, alpha, A.data(), LDA, 1, B.data(), LDB, 1 ); // Use bitwise comparison (no threshold). - computediff( 'c', M, N, B.data(), B_ref.data(), LDB ); + computediff( "B", 'c', M, N, B.data(), B_ref.data(), LDB ); } // When m < 0 @@ -95,7 +95,7 @@ TYPED_TEST(omatcopy2_IIT_ERS, m_lt_zero) // Call OMATCOPY2 with a invalid m for the operation. omatcopy2( TRANS, -1, N, alpha, A.data(), LDA, 1, B.data(), LDB, 1 ); // Use bitwise comparison (no threshold). - computediff( 'c', M, N, B.data(), B_ref.data(), LDB ); + computediff( "B", 'c', M, N, B.data(), B_ref.data(), LDB ); } // When n < 0 @@ -114,7 +114,7 @@ TYPED_TEST(omatcopy2_IIT_ERS, n_lt_zero) // Call OMATCOPY2 with a invalid n for the operation. omatcopy2( TRANS, M, -1, alpha, A.data(), LDA, 1, B.data(), LDB, 1 ); // Use bitwise comparison (no threshold). - computediff( 'c', M, N, B.data(), B_ref.data(), LDB ); + computediff( "B", 'c', M, N, B.data(), B_ref.data(), LDB ); } // When lda < m @@ -138,7 +138,7 @@ TYPED_TEST(omatcopy2_IIT_ERS, invalid_lda) // Call OMATCOPY2 with a invalid lda for the operation. omatcopy2( 'n', m, n, alpha, A.data(), m - 1, 1, B.data(), m, 1 ); // Use bitwise comparison (no threshold). - computediff( 'c', m, n, B.data(), B_ref.data(), m ); + computediff( "B", 'c', m, n, B.data(), B_ref.data(), m ); } // When stridea < 1 @@ -157,7 +157,7 @@ TYPED_TEST(omatcopy2_IIT_ERS, invalid_stridea) // Call OMATCOPY2 with a invalid n for the operation. omatcopy2( TRANS, M, N, alpha, A.data(), LDA, 0, B.data(), LDB, 1 ); // Use bitwise comparison (no threshold). - computediff( 'c', M, N, B.data(), B_ref.data(), LDB ); + computediff( "B", 'c', M, N, B.data(), B_ref.data(), LDB ); } // When ldb < m, with trans == 'n' @@ -182,7 +182,7 @@ TYPED_TEST(omatcopy2_IIT_ERS, invalid_ldb_no_transpose) // Call OMATCOPY2 with a invalid ldb for the operation. omatcopy2( trans, m, n, alpha, A.data(), m, 1, B.data(), m - 1, 1 ); // Use bitwise comparison (no threshold). - computediff( 'c', m, n, B.data(), B_ref.data(), m ); + computediff( "B", 'c', m, n, B.data(), B_ref.data(), m ); } // When ldb < m, with trans == 'r' @@ -207,7 +207,7 @@ TYPED_TEST(omatcopy2_IIT_ERS, invalid_ldb_conjugate) // Call OMATCOPY2 with a invalid ldb for the operation. omatcopy2( trans, m, n, alpha, A.data(), m, 1, B.data(), m - 1, 1 ); // Use bitwise comparison (no threshold). - computediff( 'c', m, n, B.data(), B_ref.data(), m ); + computediff( "B", 'c', m, n, B.data(), B_ref.data(), m ); } // When ldb < m, with trans == 't' @@ -232,7 +232,7 @@ TYPED_TEST(omatcopy2_IIT_ERS, invalid_ldb_transpose) // Call OMATCOPY2 with a invalid ldb for the operation. omatcopy2( trans, m, n, alpha, A.data(), m, 1, B.data(), n - 1, 1 ); // Use bitwise comparison (no threshold). - computediff( 'c', n, m, B.data(), B_ref.data(), n ); + computediff( "B", 'c', n, m, B.data(), B_ref.data(), n ); } // When ldb < m, with trans == 'c' @@ -257,7 +257,7 @@ TYPED_TEST(omatcopy2_IIT_ERS, invalid_ldb_conjugate_transpose) // Call OMATCOPY2 with a invalid ldb for the operation. omatcopy2( trans, m, n, alpha, A.data(), m, 1, B.data(), n - 1, 1 ); // Use bitwise comparison (no threshold). - computediff( 'c', n, m, B.data(), B_ref.data(), n ); + computediff( "B", 'c', n, m, B.data(), B_ref.data(), n ); } // When strideb < 1 @@ -276,6 +276,6 @@ TYPED_TEST(omatcopy2_IIT_ERS, invalid_strideb) // Call OMATCOPY2 with a invalid n for the operation. omatcopy2( TRANS, M, N, alpha, A.data(), LDA, 1, B.data(), LDB, 0 ); // Use bitwise comparison (no threshold). - computediff( 'c', M, N, B.data(), B_ref.data(), LDB ); + computediff( "B", 'c', M, N, B.data(), B_ref.data(), LDB ); } #endif diff --git a/gtestsuite/testsuite/extension/omatcopy2/test_omatcopy2.h b/gtestsuite/testsuite/extension/omatcopy2/test_omatcopy2.h index d6b8df4a3..8bd682ed9 100644 --- a/gtestsuite/testsuite/extension/omatcopy2/test_omatcopy2.h +++ b/gtestsuite/testsuite/extension/omatcopy2/test_omatcopy2.h @@ -136,9 +136,9 @@ static void test_omatcopy2( char storage, char trans, gtint_t m, gtint_t n, T al //---------------------------------------------------------- if( B_trans == 'n' ) - computediff( storage, m, n, B, B_ref, ldb, thresh, is_nan_inf_test ); + computediff( "B", storage, m, n, B, B_ref, ldb, thresh, is_nan_inf_test ); else - computediff( storage, n, m, B, B_ref, ldb, thresh, is_nan_inf_test ); + computediff( "B", storage, n, m, B, B_ref, ldb, thresh, is_nan_inf_test ); } diff --git a/gtestsuite/testsuite/inc/check_error.h b/gtestsuite/testsuite/inc/check_error.h index 564dd5714..90c0070b7 100644 --- a/gtestsuite/testsuite/inc/check_error.h +++ b/gtestsuite/testsuite/inc/check_error.h @@ -227,17 +227,21 @@ testing::AssertionResult NumericalComparisonInf(const char* blis_sol_char, return testing::AssertionFailure() << error_message; } -// Comparisons that take into account the presence of NaNs and Infs: +// Comparisons that take into account the presence of NaNs and Infs, printing variable name: template::real_type> -testing::AssertionResult NumericalComparison(const char* blis_sol_char, +testing::AssertionResult NumericalComparison(const char* var_name_char, + const char* blis_sol_char, const char* ref_sol_char, const char* comp_helper_char, + std::string var_name, const T blis_sol, const T ref_sol, const ComparisonHelper comp_helper) { // Base error message used for scalar values - std::string error_message = blis_sol_char; + std::string error_message = var_name_char; + error_message += " = " + var_name + ", "; + error_message += blis_sol_char; error_message += " = " + testinghelpers::to_string(blis_sol) + ", "; error_message += ref_sol_char; error_message += " = " + testinghelpers::to_string(ref_sol); @@ -293,34 +297,34 @@ testing::AssertionResult NumericalComparison(const char* blis_sol_char, } /** - * Binary comparison of two scalars. + * Binary comparison of two scalars, printing variable name. */ template -void computediff( T blis_sol, T ref_sol, bool nan_inf_check = false ) +void computediff( std::string var_name, T blis_sol, T ref_sol, bool nan_inf_check = false ) { ComparisonHelper comp_helper(SCALAR); comp_helper.binary_comparison = true; comp_helper.nan_inf_check = nan_inf_check; - ASSERT_PRED_FORMAT3(NumericalComparison, blis_sol, ref_sol, comp_helper); + ASSERT_PRED_FORMAT4(NumericalComparison, var_name, blis_sol, ref_sol, comp_helper); } /** - * Relative comparison of two scalars, using a threshold. + * Relative comparison of two scalars, using a threshold, printing variable name. */ template -void computediff( T blis_sol, T ref_sol, double thresh, bool nan_inf_check = false ) +void computediff( std::string var_name, T blis_sol, T ref_sol, double thresh, bool nan_inf_check = false ) { ComparisonHelper comp_helper(SCALAR, thresh); comp_helper.nan_inf_check = nan_inf_check; - ASSERT_PRED_FORMAT3(NumericalComparison, blis_sol, ref_sol, comp_helper); + ASSERT_PRED_FORMAT4(NumericalComparison, var_name, blis_sol, ref_sol, comp_helper); } /** - * Binary comparison of two vectors with length n and increment inc. + * Binary comparison of two vectors with length n and increment inc, printing variable name. */ template -void computediff( gtint_t n, T *blis_sol, T *ref_sol, gtint_t inc, bool nan_inf_check = false ) +void computediff( std::string var_name, gtint_t n, T *blis_sol, T *ref_sol, gtint_t inc, bool nan_inf_check = false ) { gtint_t abs_inc = std::abs(inc); ComparisonHelper comp_helper(VECTOR); @@ -332,21 +336,22 @@ void computediff( gtint_t n, T *blis_sol, T *ref_sol, gtint_t inc, bool nan_inf_ for (gtint_t i = 0; i < n; i++) { comp_helper.i = i; - ASSERT_PRED_FORMAT3(NumericalComparison, blis_sol[i*abs_inc], ref_sol[i*abs_inc], comp_helper) << "inc = " << inc; + ASSERT_PRED_FORMAT4(NumericalComparison, var_name, blis_sol[i*abs_inc], ref_sol[i*abs_inc], comp_helper) << "inc = " << inc; // Go through elements that are part of the array that should not have been modified by the // call to a BLIS API. Use the bitwise comparison for this case. if (i < n-1) { for (gtint_t j = 1; j < abs_inc; j++) { - ASSERT_PRED_FORMAT3(NumericalComparison, blis_sol[i*abs_inc + j], ref_sol[i*abs_inc + j], comp_helper) << "inc = " << inc << " This element is expected to not be modified."; + ASSERT_PRED_FORMAT4(NumericalComparison, var_name, blis_sol[i*abs_inc + j], ref_sol[i*abs_inc + j], comp_helper) << "inc = " << inc << " This element is expected to not be modified."; } } } } + /** - * Binary comparison of two vectors with length n and increment inc. + * Binary comparison of two vectors with length n and increment inc, printing variable names. */ template void computediff( gtint_t n, T *blis_x, T *blis_x_ref, T *blis_y, T *blis_y_ref, gtint_t incx, gtint_t incy, bool nan_inf_check = false ) @@ -365,8 +370,8 @@ void computediff( gtint_t n, T *blis_x, T *blis_x_ref, T *blis_y, T *blis_y_ref, comp_helper.i = i; idx = (incx > 0) ? (i * incx) : ( - ( n - i - 1 ) * incx ); idy = (incy > 0) ? (i * incy) : ( - ( n - i - 1 ) * incy ); - ASSERT_PRED_FORMAT3(NumericalComparison, blis_x[idx], blis_y_ref[idy], comp_helper) << "incx = " << incx ; - ASSERT_PRED_FORMAT3(NumericalComparison, blis_y[idy], blis_x_ref[idx], comp_helper) << "incy = " << incy; // Go through elements that are part of the array that should not have been modified by the + ASSERT_PRED_FORMAT4(NumericalComparison, "x", blis_x[idx], blis_y_ref[idy], comp_helper) << "incx = " << incx ; + ASSERT_PRED_FORMAT4(NumericalComparison, "y", blis_y[idy], blis_x_ref[idx], comp_helper) << "incy = " << incy; // Go through elements that are part of the array that should not have been modified by the // call to a BLIS API. Use the bitwise comparison for this case. // Random generator fills vector with T{-1.2345e38} if (i < n-1) @@ -374,22 +379,22 @@ void computediff( gtint_t n, T *blis_x, T *blis_x_ref, T *blis_y, T *blis_y_ref, for (gtint_t j = 1; j < abs_incx; j++) { idx = (incx > 0) ? (i * incx) : ( - ( n - i - 1 ) * incx ); - ASSERT_PRED_FORMAT3(NumericalComparison, blis_x[i*abs_incx + j], T{-1.2345e38}, comp_helper) << "incx = " << incx << " This element is expected to not be modified."; + ASSERT_PRED_FORMAT4(NumericalComparison, "x", blis_x[i*abs_incx + j], T{-1.2345e38}, comp_helper) << "incx = " << incx << " This element is expected to not be modified."; } for (gtint_t j = 1; j < abs_incy; j++) { idy = (incy > 0) ? (i * incy) : ( - ( n - i - 1 ) * incy ); - ASSERT_PRED_FORMAT3(NumericalComparison, blis_y[i*abs_incy + j], T{-1.2345e38}, comp_helper) << "incy = " << incy << " This element is expected to not be modified."; + ASSERT_PRED_FORMAT4(NumericalComparison, "y", blis_y[i*abs_incy + j], T{-1.2345e38}, comp_helper) << "incy = " << incy << " This element is expected to not be modified."; } } } } /** - * Relative comparison of two vectors with length n and increment inc. + * Relative comparison of two vectors with length n and increment inc, printing variable name. */ template -void computediff( gtint_t n, T *blis_sol, T *ref_sol, gtint_t inc, double thresh, bool nan_inf_check = false ) +void computediff( std::string var_name, gtint_t n, T *blis_sol, T *ref_sol, gtint_t inc, double thresh, bool nan_inf_check = false ) { gtint_t abs_inc = std::abs(inc); ComparisonHelper comp_helper(VECTOR, thresh); @@ -400,7 +405,7 @@ void computediff( gtint_t n, T *blis_sol, T *ref_sol, gtint_t inc, double thresh for (gtint_t i = 0; i < n; i++) { comp_helper.i = i; - ASSERT_PRED_FORMAT3(NumericalComparison, blis_sol[i*abs_inc], ref_sol[i*abs_inc], comp_helper) << "inc = " << inc; + ASSERT_PRED_FORMAT4(NumericalComparison, var_name, blis_sol[i*abs_inc], ref_sol[i*abs_inc], comp_helper) << "inc = " << inc; // Go through elements that are part of the array that should not have been modified by the // call to a BLIS API. Use the bitwise comparison for this case. if (i < n-1) @@ -408,7 +413,7 @@ void computediff( gtint_t n, T *blis_sol, T *ref_sol, gtint_t inc, double thresh for (gtint_t j = 1; j < abs_inc; j++) { comp_helper.binary_comparison = true; - ASSERT_PRED_FORMAT3(NumericalComparison, blis_sol[i*abs_inc + j], ref_sol[i*abs_inc + j], comp_helper) << "inc = " << inc << " This element is expected to not be modified."; + ASSERT_PRED_FORMAT4(NumericalComparison, var_name, blis_sol[i*abs_inc + j], ref_sol[i*abs_inc + j], comp_helper) << "inc = " << inc << " This element is expected to not be modified."; } comp_helper.binary_comparison = false; } @@ -416,10 +421,10 @@ void computediff( gtint_t n, T *blis_sol, T *ref_sol, gtint_t inc, double thresh } /** - * Binary comparison of two matrices with dimensions m-by-n and leading dimension ld. + * Binary comparison of two matrices with dimensions m-by-n and leading dimension ld, printing variable name. */ template -void computediff(char storage, gtint_t m, gtint_t n, T *blis_sol, T *ref_sol, gtint_t ld, bool nan_inf_check = false ) +void computediff(std::string var_name, char storage, gtint_t m, gtint_t n, T *blis_sol, T *ref_sol, gtint_t ld, bool nan_inf_check = false ) { gtint_t i,j; ComparisonHelper comp_helper(MATRIX); @@ -436,7 +441,7 @@ void computediff(char storage, gtint_t m, gtint_t n, T *blis_sol, T *ref_sol, gt { comp_helper.i = i; comp_helper.j = j; - ASSERT_PRED_FORMAT3(NumericalComparison, blis_sol[i + j*ld], ref_sol[i + j*ld], comp_helper); + ASSERT_PRED_FORMAT4(NumericalComparison, var_name, blis_sol[i + j*ld], ref_sol[i + j*ld], comp_helper); } // Now iterate through the rest of elements in memory space that are not part of the matrix, // so we use binary comparison to verify that are exactly the same as the reference. @@ -444,7 +449,7 @@ void computediff(char storage, gtint_t m, gtint_t n, T *blis_sol, T *ref_sol, gt // elements are expected to identical. for (i = m; i < ld; i++) { - ASSERT_PRED_FORMAT3(NumericalComparison, blis_sol[i + j*ld], ref_sol[i + j*ld], comp_helper) << "This element is expected to not be modified."; + ASSERT_PRED_FORMAT4(NumericalComparison, var_name, blis_sol[i + j*ld], ref_sol[i + j*ld], comp_helper) << "This element is expected to not be modified."; } } } @@ -459,7 +464,7 @@ void computediff(char storage, gtint_t m, gtint_t n, T *blis_sol, T *ref_sol, gt { comp_helper.i = i; comp_helper.j = j; - ASSERT_PRED_FORMAT3(NumericalComparison, blis_sol[i*ld + j], ref_sol[i*ld + j], comp_helper); + ASSERT_PRED_FORMAT4(NumericalComparison, var_name, blis_sol[i*ld + j], ref_sol[i*ld + j], comp_helper); } // Now iterate through the rest of elements in memory space that are not part of the matrix, // so we use binary comparison to verify that are exactly the same as the reference. @@ -467,17 +472,17 @@ void computediff(char storage, gtint_t m, gtint_t n, T *blis_sol, T *ref_sol, gt // elements are expected to identical. for (j = n; j < ld; j++) { - ASSERT_PRED_FORMAT3(NumericalComparison, blis_sol[i*ld + j], ref_sol[i*ld + j], comp_helper) << "This element is expected to not be modified."; + ASSERT_PRED_FORMAT4(NumericalComparison, var_name, blis_sol[i*ld + j], ref_sol[i*ld + j], comp_helper) << "This element is expected to not be modified."; } } } } /** - * Relative comparison of two matrices with dimensions m-by-n and leading dimension ld. + * Relative comparison of two matrices with dimensions m-by-n and leading dimension ld, printing variable name. */ template -void computediff(char storage, gtint_t m, gtint_t n, T *blis_sol, T *ref_sol, gtint_t ld, double thresh, bool nan_inf_check = false ) +void computediff(std::string var_name, char storage, gtint_t m, gtint_t n, T *blis_sol, T *ref_sol, gtint_t ld, double thresh, bool nan_inf_check = false ) { gtint_t i,j; ComparisonHelper comp_helper(MATRIX, thresh); @@ -494,7 +499,7 @@ void computediff(char storage, gtint_t m, gtint_t n, T *blis_sol, T *ref_sol, gt { comp_helper.i = i; comp_helper.j = j; - ASSERT_PRED_FORMAT3(NumericalComparison, blis_sol[i + j*ld], ref_sol[i + j*ld], comp_helper); + ASSERT_PRED_FORMAT4(NumericalComparison, var_name, blis_sol[i + j*ld], ref_sol[i + j*ld], comp_helper); } // Now iterate through the rest of elements in memory space that are not part of the matrix, // so we use binary comparison to verify that are exactly the same as the reference. @@ -503,7 +508,7 @@ void computediff(char storage, gtint_t m, gtint_t n, T *blis_sol, T *ref_sol, gt comp_helper.binary_comparison = true; for (i = m; i < ld; i++) { - ASSERT_PRED_FORMAT3(NumericalComparison, blis_sol[i + j*ld], ref_sol[i + j*ld], comp_helper) << "This element is expected to not be modified."; + ASSERT_PRED_FORMAT4(NumericalComparison, var_name, blis_sol[i + j*ld], ref_sol[i + j*ld], comp_helper) << "This element is expected to not be modified."; } // Disable binary comparison before we go through the next column. comp_helper.binary_comparison = false; @@ -520,7 +525,7 @@ void computediff(char storage, gtint_t m, gtint_t n, T *blis_sol, T *ref_sol, gt { comp_helper.i = i; comp_helper.j = j; - ASSERT_PRED_FORMAT3(NumericalComparison, blis_sol[i*ld + j], ref_sol[i*ld + j], comp_helper); + ASSERT_PRED_FORMAT4(NumericalComparison, var_name, blis_sol[i*ld + j], ref_sol[i*ld + j], comp_helper); } // Now iterate through the rest of elements in memory space that are not part of the matrix, // so we use binary comparison to verify that are exactly the same as the reference. @@ -529,10 +534,54 @@ void computediff(char storage, gtint_t m, gtint_t n, T *blis_sol, T *ref_sol, gt comp_helper.binary_comparison = true; for (j = n; j < ld; j++) { - ASSERT_PRED_FORMAT3(NumericalComparison, blis_sol[i*ld + j], ref_sol[i*ld + j], comp_helper) << "This element is expected to not be modified."; + ASSERT_PRED_FORMAT4(NumericalComparison, var_name, blis_sol[i*ld + j], ref_sol[i*ld + j], comp_helper) << "This element is expected to not be modified."; } // Disable binary comparison before we go through the next column. comp_helper.binary_comparison = false; } } } + +// Generic comparison of integer numbers, printing variable name: +template +testing::AssertionResult EqualityComparison(const char* var_name_char, + const char* blis_sol_char, + const char* ref_sol_char, + const char* comp_helper_char, + std::string var_name, + const T blis_sol, + const T ref_sol, + const ComparisonHelper comp_helper) +{ + // Base error message used for scalar values + std::string error_message = var_name_char; + error_message += " = " + var_name + ", "; + error_message += blis_sol_char; + error_message += " = " + testinghelpers::to_string(blis_sol) + ", "; + error_message += ref_sol_char; + error_message += " = " + testinghelpers::to_string(ref_sol); + + if (blis_sol == ref_sol) return testing::AssertionSuccess(); + return testing::AssertionFailure() << error_message; +} + +/** + * Comparison of two integers, printing variable name. + */ +template <> +inline void computediff( std::string var_name, gtint_t blis_sol, gtint_t ref_sol, bool nan_inf_check ) +{ + ComparisonHelper comp_helper(SCALAR); + ASSERT_PRED_FORMAT4(EqualityComparison, var_name, blis_sol, ref_sol, comp_helper); +} + +/** + * Comparison of two characters, printing variable name. + */ +template <> +inline void computediff( std::string var_name, char blis_sol, char ref_sol, bool nan_inf_check ) +{ + ComparisonHelper comp_helper(SCALAR); + ASSERT_PRED_FORMAT4(EqualityComparison, var_name, blis_sol, ref_sol, comp_helper); +} + diff --git a/gtestsuite/testsuite/level1/addv/test_addv.h b/gtestsuite/testsuite/level1/addv/test_addv.h index 25c93ac99..70b0a15eb 100644 --- a/gtestsuite/testsuite/level1/addv/test_addv.h +++ b/gtestsuite/testsuite/level1/addv/test_addv.h @@ -66,5 +66,5 @@ void test_addv( char conjx, gtint_t n, gtint_t incx, gtint_t incy, double thresh //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - computediff( n, y.data(), y_ref.data(), incy, thresh ); + computediff( "y", n, y.data(), y_ref.data(), incy, thresh ); } diff --git a/gtestsuite/testsuite/level1/amaxv/amaxv_IIT_ERS.cpp b/gtestsuite/testsuite/level1/amaxv/amaxv_IIT_ERS.cpp index d6c95b199..57fbca66f 100644 --- a/gtestsuite/testsuite/level1/amaxv/amaxv_IIT_ERS.cpp +++ b/gtestsuite/testsuite/level1/amaxv/amaxv_IIT_ERS.cpp @@ -81,7 +81,7 @@ TYPED_TEST(amaxv_IIT_ERS_Test, n_lt_one_nonUnitStride) #endif // Computing the difference. - EXPECT_EQ( idx, gtint_t(0) ); + computediff( "idx", idx, gtint_t(0) ); } // inc == 0, with non-unit stride @@ -101,7 +101,7 @@ TYPED_TEST(amaxv_IIT_ERS_Test, incx_eq_zero) #endif // Computing the difference. - EXPECT_EQ( idx, gtint_t(0) ); + computediff( "idx", idx, gtint_t(0) ); } // n < 1, with unit stride @@ -122,7 +122,7 @@ TYPED_TEST(amaxv_IIT_ERS_Test, n_lt_one_unitStride) #endif // Computing the difference. - EXPECT_EQ( idx, gtint_t(0) ); + computediff( "idx", idx, gtint_t(0) ); } // n == 1, with unit stride @@ -138,10 +138,10 @@ TYPED_TEST(amaxv_IIT_ERS_Test, n_eq_one_unitStride) // Invoking AMAXV with an value of n. #ifdef TEST_BLAS gtint_t idx = amaxv_( n, x.data(), unit_inc ); - EXPECT_EQ( idx, gtint_t(1) ); + computediff( "idx", idx, gtint_t(1) ); #else gtint_t idx = cblas_amaxv( n, x.data(), unit_inc ); - EXPECT_EQ( idx, gtint_t(0) ); + computediff( "idx", idx, gtint_t(0) ); #endif } @@ -156,10 +156,10 @@ TYPED_TEST(amaxv_IIT_ERS_Test, n_eq_one_nonUnitStrides) #ifdef TEST_BLAS gtint_t idx = amaxv_( n, x.data(), inc ); - EXPECT_EQ( idx, gtint_t(1) ); + computediff( "idx", idx, gtint_t(1) ); #else gtint_t idx = cblas_amaxv( n, x.data(), inc ); - EXPECT_EQ( idx, gtint_t(0) ); + computediff( "idx", idx, gtint_t(0) ); #endif } diff --git a/gtestsuite/testsuite/level1/amaxv/test_amaxv.h b/gtestsuite/testsuite/level1/amaxv/test_amaxv.h index 39d19f1d0..d4d7a71a7 100644 --- a/gtestsuite/testsuite/level1/amaxv/test_amaxv.h +++ b/gtestsuite/testsuite/level1/amaxv/test_amaxv.h @@ -63,7 +63,7 @@ static void test_amaxv( gtint_t n, gtint_t incx ) //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - EXPECT_EQ(idx, idx_ref) << "Values are different : act_val : " << idx << " ref_val :" << idx_ref; + computediff( "idx", idx, idx_ref ); } /** @@ -99,5 +99,5 @@ static void test_amaxv( gtint_t n, gtint_t incx, gtint_t xi, T xi_exval, //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - EXPECT_EQ(idx, idx_ref) << "Values are different : act_val : " << idx << " ref_val :" << idx_ref; + computediff( "idx", idx, idx_ref ); } diff --git a/gtestsuite/testsuite/level1/axpbyv/IIT_ERS_test.cpp b/gtestsuite/testsuite/level1/axpbyv/IIT_ERS_test.cpp index 07996221b..0670b584d 100644 --- a/gtestsuite/testsuite/level1/axpbyv/IIT_ERS_test.cpp +++ b/gtestsuite/testsuite/level1/axpbyv/IIT_ERS_test.cpp @@ -74,7 +74,7 @@ TYPED_TEST(Axpbyv_IIT_ERS_Test, n_lt_zero_nonUnitStrides) axpbyv( CONJ, -1, alpha, x.data(), 5, beta, y.data(), 5 ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), 5 ); + computediff( "y", N, y.data(), y_ref.data(), 5 ); } // When n = 0 @@ -94,7 +94,7 @@ TYPED_TEST(Axpbyv_IIT_ERS_Test, n_eq_zero_nonUnitStrides) axpbyv( CONJ, 0, alpha, x.data(), 5, beta, y.data(), 5 ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), 5 ); + computediff( "y", N, y.data(), y_ref.data(), 5 ); } // Early return cases with unit strides on vectors @@ -115,7 +115,7 @@ TYPED_TEST(Axpbyv_IIT_ERS_Test, n_lt_zero_unitStrides) axpbyv( CONJ, -1, alpha, x.data(), 1, beta, y.data(), 1 ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), 1 ); + computediff( "y", N, y.data(), y_ref.data(), 1 ); } // When n = 0 @@ -135,6 +135,6 @@ TYPED_TEST(Axpbyv_IIT_ERS_Test, n_eq_zero_unitStrides) axpbyv( CONJ, 0, alpha, x.data(), 1, beta, y.data(), 1 ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), 1 ); + computediff( "y", N, y.data(), y_ref.data(), 1 ); } -#endif \ No newline at end of file +#endif diff --git a/gtestsuite/testsuite/level1/axpbyv/test_axpbyv.h b/gtestsuite/testsuite/level1/axpbyv/test_axpbyv.h index cf6719db0..d2f3e5644 100644 --- a/gtestsuite/testsuite/level1/axpbyv/test_axpbyv.h +++ b/gtestsuite/testsuite/level1/axpbyv/test_axpbyv.h @@ -67,7 +67,7 @@ static void test_axpbyv( char conjx, gtint_t n, gtint_t incx, gtint_t incy, //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - computediff( n, y.data(), y_ref.data(), incy, thresh ); + computediff( "y", n, y.data(), y_ref.data(), incy, thresh ); } template @@ -104,5 +104,5 @@ static void test_axpbyv( char conjx, gtint_t n, gtint_t incx, gtint_t incy, //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - computediff( n, y.data(), y_ref.data(), incy, thresh, true ); + computediff( "y", n, y.data(), y_ref.data(), incy, thresh, true ); } diff --git a/gtestsuite/testsuite/level1/axpyf/test_axpyf.h b/gtestsuite/testsuite/level1/axpyf/test_axpyf.h index 5249f3082..04740fbb1 100644 --- a/gtestsuite/testsuite/level1/axpyf/test_axpyf.h +++ b/gtestsuite/testsuite/level1/axpyf/test_axpyf.h @@ -89,5 +89,5 @@ static void test_axpyf( //--------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - computediff( m, y.data(), y_ref.data(), incy, thresh ); + computediff( "y", m, y.data(), y_ref.data(), incy, thresh, true ); } diff --git a/gtestsuite/testsuite/level1/axpyv/IIT_ERS_test.cpp b/gtestsuite/testsuite/level1/axpyv/IIT_ERS_test.cpp index 2b4fdfcb6..b68b7d689 100644 --- a/gtestsuite/testsuite/level1/axpyv/IIT_ERS_test.cpp +++ b/gtestsuite/testsuite/level1/axpyv/IIT_ERS_test.cpp @@ -72,7 +72,7 @@ TYPED_TEST(Axpyv_IIT_ERS_Test, n_lt_zero_nonUnitStrides) axpyv( CONJ, -1, alpha, x.data(), 5, y.data(), 5 ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), 5 ); + computediff( "y", N, y.data(), y_ref.data(), 5 ); } // When n = 0 @@ -91,7 +91,7 @@ TYPED_TEST(Axpyv_IIT_ERS_Test, n_eq_zero_nonUnitStrides) axpyv( CONJ, 0, alpha, x.data(), 5, y.data(), 5 ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), 5 ); + computediff( "y", N, y.data(), y_ref.data(), 5 ); } // When alpha = 0 @@ -110,7 +110,7 @@ TYPED_TEST(Axpyv_IIT_ERS_Test, alpha_eq_zero_nonUnitStrides) axpyv( CONJ, N, alpha, x.data(), 5, y.data(), 5 ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), 5 ); + computediff( "y", N, y.data(), y_ref.data(), 5 ); } // Early return cases with unit strides on vectors @@ -130,7 +130,7 @@ TYPED_TEST(Axpyv_IIT_ERS_Test, n_lt_zero_unitStrides) axpyv( CONJ, -1, alpha, x.data(), 1, y.data(), 1 ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), 1 ); + computediff( "y", N, y.data(), y_ref.data(), 1 ); } // When n = 0 @@ -149,7 +149,7 @@ TYPED_TEST(Axpyv_IIT_ERS_Test, n_eq_zero_unitStrides) axpyv( CONJ, 0, alpha, x.data(), 1, y.data(), 1 ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), 1 ); + computediff( "y", N, y.data(), y_ref.data(), 1 ); } // When alpha = 0 @@ -168,7 +168,7 @@ TYPED_TEST(Axpyv_IIT_ERS_Test, alpha_eq_zero_unitStrides) axpyv( CONJ, N, alpha, x.data(), 1, y.data(), 1 ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), 1 ); + computediff( "y", N, y.data(), y_ref.data(), 1 ); } #endif diff --git a/gtestsuite/testsuite/level1/axpyv/test_axpyv.h b/gtestsuite/testsuite/level1/axpyv/test_axpyv.h index ad6f4f30d..b342d0f73 100644 --- a/gtestsuite/testsuite/level1/axpyv/test_axpyv.h +++ b/gtestsuite/testsuite/level1/axpyv/test_axpyv.h @@ -67,7 +67,7 @@ static void test_axpyv( char conjx, gtint_t n, gtint_t incx, gtint_t incy, //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - computediff( n, y.data(), y_ref.data(), incy, thresh ); + computediff( "y", n, y.data(), y_ref.data(), incy, thresh ); } template @@ -104,5 +104,5 @@ static void test_axpyv( char conjx, gtint_t n, gtint_t incx, gtint_t incy, //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - computediff( n, y.data(), y_ref.data(), incy, thresh, true ); + computediff( "y", n, y.data(), y_ref.data(), incy, thresh, true ); } diff --git a/gtestsuite/testsuite/level1/copyv/IIT_ERS_test.cpp b/gtestsuite/testsuite/level1/copyv/IIT_ERS_test.cpp index 02f1c2221..b65ce5ddd 100644 --- a/gtestsuite/testsuite/level1/copyv/IIT_ERS_test.cpp +++ b/gtestsuite/testsuite/level1/copyv/IIT_ERS_test.cpp @@ -69,7 +69,7 @@ TYPED_TEST(Copyv_IIT_ERS_Test, n_lt_zero_nonUnitStrides) copyv( CONJ, -1, x.data(), 5, y.data(), 5 ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), 5 ); + computediff( "y", N, y.data(), y_ref.data(), 5 ); } // When n = 0 @@ -86,7 +86,7 @@ TYPED_TEST(Copyv_IIT_ERS_Test, n_eq_zero_nonUnitStrides) copyv( CONJ, 0, x.data(), 5, y.data(), 5 ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), 5 ); + computediff( "y", N, y.data(), y_ref.data(), 5 ); } // Early return cases with unit strides on vectors @@ -104,7 +104,7 @@ TYPED_TEST(Copyv_IIT_ERS_Test, n_lt_zero_unitStrides) copyv( CONJ, -1, x.data(), 1, y.data(), 1 ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), 1 ); + computediff( "y", N, y.data(), y_ref.data(), 1 ); } // When n = 0 @@ -121,6 +121,6 @@ TYPED_TEST(Copyv_IIT_ERS_Test, n_eq_zero_unitStrides) copyv( CONJ, 0, x.data(), 1, y.data(), 1 ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), 1 ); + computediff( "y", N, y.data(), y_ref.data(), 1 ); } -#endif \ No newline at end of file +#endif diff --git a/gtestsuite/testsuite/level1/copyv/test_copyv.h b/gtestsuite/testsuite/level1/copyv/test_copyv.h index 5a4ca2264..f78f9a995 100644 --- a/gtestsuite/testsuite/level1/copyv/test_copyv.h +++ b/gtestsuite/testsuite/level1/copyv/test_copyv.h @@ -67,5 +67,5 @@ static void test_copyv( char conjx, gtint_t n, gtint_t incx, gtint_t incy ) //---------------------------------------------------------- // Compute error. //---------------------------------------------------------- - computediff( n, y.data(), y_ref.data(), incy ); + computediff( "y", n, y.data(), y_ref.data(), incy ); } diff --git a/gtestsuite/testsuite/level1/dotv/dotv_IIT_ERS.cpp b/gtestsuite/testsuite/level1/dotv/dotv_IIT_ERS.cpp index a34402278..f2ef51244 100644 --- a/gtestsuite/testsuite/level1/dotv/dotv_IIT_ERS.cpp +++ b/gtestsuite/testsuite/level1/dotv/dotv_IIT_ERS.cpp @@ -76,7 +76,7 @@ TYPED_TEST(dotv_IIT_ERS_Test, n_lt_zero_nonUnitStride) dotv( CONJ, CONJ, invalid_n, x.data(), inc, y.data(), inc, &rho ); // Computing the difference. - computediff( rho, rho_ref ); + computediff( "rho", rho, rho_ref ); } // n == 0, with non-unit stride @@ -101,7 +101,7 @@ TYPED_TEST(dotv_IIT_ERS_Test, n_eq_zero_nonUnitStride) dotv( CONJ, CONJ, invalid_n, x.data(), inc, y.data(), inc, &rho ); // Computing the difference. - computediff( rho, rho_ref ); + computediff( "rho", rho, rho_ref ); } // n < 0, with unit stride @@ -126,7 +126,7 @@ TYPED_TEST(dotv_IIT_ERS_Test, n_lt_zero_unitStride) dotv( CONJ, CONJ, invalid_n, x.data(), unit_inc, y.data(), unit_inc, &rho ); // Computing the difference. - computediff( rho, rho_ref ); + computediff( "rho", rho, rho_ref ); } // n == 0, with unit stride @@ -151,6 +151,6 @@ TYPED_TEST(dotv_IIT_ERS_Test, n_eq_zero_unitStride) dotv( CONJ, CONJ, invalid_n, x.data(), unit_inc, y.data(), unit_inc, &rho ); // Computing the difference. - computediff( rho, rho_ref ); + computediff( "rho", rho, rho_ref ); } -#endif \ No newline at end of file +#endif diff --git a/gtestsuite/testsuite/level1/dotv/test_dotv.h b/gtestsuite/testsuite/level1/dotv/test_dotv.h index 63a32baec..65f041134 100644 --- a/gtestsuite/testsuite/level1/dotv/test_dotv.h +++ b/gtestsuite/testsuite/level1/dotv/test_dotv.h @@ -72,7 +72,7 @@ static void test_dotv( char conjx, char conjy, gtint_t n, gtint_t incx, //---------------------------------------------------------- // Compute error. //---------------------------------------------------------- - computediff( rho, rho_ref, thresh ); + computediff( "rho", rho, rho_ref, thresh ); } @@ -119,5 +119,5 @@ static void test_dotv( char conjx, char conjy, gtint_t n, //---------------------------------------------------------- // Compute error. //---------------------------------------------------------- - computediff( rho, rho_ref, thresh, true); + computediff( "rho", rho, rho_ref, thresh, true); } diff --git a/gtestsuite/testsuite/level1/dotxf/test_dotxf.h b/gtestsuite/testsuite/level1/dotxf/test_dotxf.h index 7359edef6..39d0167d9 100644 --- a/gtestsuite/testsuite/level1/dotxf/test_dotxf.h +++ b/gtestsuite/testsuite/level1/dotxf/test_dotxf.h @@ -85,5 +85,5 @@ static void test_dotxf( //--------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - computediff( m, y.data(), y_ref.data(), incy, thresh ); + computediff( "y", m, y.data(), y_ref.data(), incy, thresh, true ); } diff --git a/gtestsuite/testsuite/level1/dotxv/test_dotxv.h b/gtestsuite/testsuite/level1/dotxv/test_dotxv.h index 729e172b8..40924aad7 100644 --- a/gtestsuite/testsuite/level1/dotxv/test_dotxv.h +++ b/gtestsuite/testsuite/level1/dotxv/test_dotxv.h @@ -71,5 +71,5 @@ static void test_dotxv( gtint_t n, char conjx, char conjy, T alpha, //---------------------------------------------------------- // Compute error. //---------------------------------------------------------- - computediff( rho, rho_ref, thresh ); + computediff( "rho", rho, rho_ref, thresh ); } diff --git a/gtestsuite/testsuite/level1/scal2v/test_scal2v.h b/gtestsuite/testsuite/level1/scal2v/test_scal2v.h index 9cb621acb..25af36847 100644 --- a/gtestsuite/testsuite/level1/scal2v/test_scal2v.h +++ b/gtestsuite/testsuite/level1/scal2v/test_scal2v.h @@ -66,5 +66,5 @@ static void test_scal2v(char conjx, gtint_t n, gtint_t incx, gtint_t incy, T alp //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - computediff( n, y.data(), y_ref.data(), incy, thresh ); + computediff( "y", n, y.data(), y_ref.data(), incy, thresh ); } diff --git a/gtestsuite/testsuite/level1/scalv/scalv_IIT_ERS.cpp b/gtestsuite/testsuite/level1/scalv/scalv_IIT_ERS.cpp index 5be5a6d06..34ad2c5e9 100644 --- a/gtestsuite/testsuite/level1/scalv/scalv_IIT_ERS.cpp +++ b/gtestsuite/testsuite/level1/scalv/scalv_IIT_ERS.cpp @@ -84,7 +84,7 @@ TYPED_TEST(scalv_IIT_ERS_Test, n_lt_zero_nonUnitStride) scalv( 'n', invalid_n, alpha, x.data(), inc ); // Computing bitwise difference. - computediff( N, x.data(), x_ref.data(), inc ); + computediff( "x", N, x.data(), x_ref.data(), inc ); } // n == 0, with non-unit stride @@ -107,7 +107,7 @@ TYPED_TEST(scalv_IIT_ERS_Test, n_eq_zero_nonUnitStride) scalv( 'n', invalid_n, alpha, x.data(), inc ); // Computing bitwise difference. - computediff( N, x.data(), x_ref.data(), inc ); + computediff( "x", N, x.data(), x_ref.data(), inc ); } // n < 0, with unit stride @@ -130,7 +130,7 @@ TYPED_TEST(scalv_IIT_ERS_Test, n_lt_zero_unitStride) scalv( 'n', invalid_n, alpha, x.data(), unit_inc ); // Computing bitwise difference. - computediff( N, x.data(), x_ref.data(), unit_inc ); + computediff( "x", N, x.data(), x_ref.data(), unit_inc ); } // n == 0, with unit stride @@ -153,7 +153,7 @@ TYPED_TEST(scalv_IIT_ERS_Test, n_eq_zero_unitStride) scalv( 'n', invalid_n, alpha, x.data(), unit_inc ); // Computing bitwise difference. - computediff( N, x.data(), x_ref.data(), unit_inc ); + computediff( "x", N, x.data(), x_ref.data(), unit_inc ); } // inc < 0 @@ -175,7 +175,7 @@ TYPED_TEST(scalv_IIT_ERS_Test, inc_lt_0) scalv( 'n', N, alpha, x.data(), invalid_inc ); // Computing bitwise difference. - computediff( N, x.data(), x_ref.data(), INC ); + computediff( "x", N, x.data(), x_ref.data(), INC ); } // inc == 0 @@ -197,7 +197,7 @@ TYPED_TEST(scalv_IIT_ERS_Test, inc_eq_0) scalv( 'n', N, alpha, x.data(), invalid_inc ); // Computing bitwise difference. - computediff( N, x.data(), x_ref.data(), INC ); + computediff( "x", N, x.data(), x_ref.data(), INC ); } // alpha == 1, with non-unit stride @@ -218,7 +218,7 @@ TYPED_TEST(scalv_IIT_ERS_Test, alpha_eq_one_nonUnitStride) scalv( 'n', N, invalid_alpha, x.data(), inc ); // Computing bitwise difference. - computediff( N, x.data(), x_ref.data(), inc ); + computediff( "x", N, x.data(), x_ref.data(), inc ); } // alpha == 1, with unit stride @@ -239,6 +239,6 @@ TYPED_TEST(scalv_IIT_ERS_Test, alpha_eq_one_unitStride) scalv( 'n', N, invalid_alpha, x.data(), unit_inc ); // Computing bitwise difference. - computediff( N, x.data(), x_ref.data(), unit_inc ); + computediff( "x", N, x.data(), x_ref.data(), unit_inc ); } #endif diff --git a/gtestsuite/testsuite/level1/scalv/scalv_extreme_cases.cpp b/gtestsuite/testsuite/level1/scalv/scalv_extreme_cases.cpp index 43c6db32c..b08a0f47a 100644 --- a/gtestsuite/testsuite/level1/scalv/scalv_extreme_cases.cpp +++ b/gtestsuite/testsuite/level1/scalv/scalv_extreme_cases.cpp @@ -74,7 +74,7 @@ TYPED_TEST(xscalv, zero_alpha_x_fp) //---------------------------------------------------------- // Call generic test body using those parameters //---------------------------------------------------------- - computediff( n, x.data(), x_ref.data(), incx, thresh, true ); + computediff( "x", n, x.data(), x_ref.data(), incx, thresh, true ); } TYPED_TEST(xscalv, zero_alpha_x_inf) @@ -113,5 +113,5 @@ TYPED_TEST(xscalv, zero_alpha_x_inf) //---------------------------------------------------------- // Call generic test body using those parameters //---------------------------------------------------------- - computediff( n, x.data(), x_ref.data(), incx, thresh, true ); + computediff( "x", n, x.data(), x_ref.data(), incx, thresh, true ); } diff --git a/gtestsuite/testsuite/level1/scalv/test_scalv.h b/gtestsuite/testsuite/level1/scalv/test_scalv.h index c47267814..b194d417a 100644 --- a/gtestsuite/testsuite/level1/scalv/test_scalv.h +++ b/gtestsuite/testsuite/level1/scalv/test_scalv.h @@ -64,7 +64,7 @@ static void test_scalv( char conja_alpha, gtint_t n, gtint_t incx, U alpha, doub //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - computediff( n, x.data(), x_ref.data(), incx, thresh ); + computediff( "x", n, x.data(), x_ref.data(), incx, thresh ); } /** @@ -98,5 +98,5 @@ static void test_scalv( char conja_alpha, gtint_t n, gtint_t incx, gtint_t xi, //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - computediff( n, x.data(), x_ref.data(), incx, thresh, true ); + computediff( "x", n, x.data(), x_ref.data(), incx, thresh, true ); } diff --git a/gtestsuite/testsuite/level1/subv/subv_IIT_ERS.cpp b/gtestsuite/testsuite/level1/subv/subv_IIT_ERS.cpp index f10fb290f..2abc36f4f 100644 --- a/gtestsuite/testsuite/level1/subv/subv_IIT_ERS.cpp +++ b/gtestsuite/testsuite/level1/subv/subv_IIT_ERS.cpp @@ -72,7 +72,7 @@ TYPED_TEST(subv_IIT_ERS_Test, n_lt_zero_nonUnitStride) subv( 'n', invalid_n, x.data(), inc, y.data(), inc ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), inc ); + computediff( "y", n, y.data(), y_ref.data(), inc ); } // n < 0, with unit stride @@ -93,7 +93,7 @@ TYPED_TEST(subv_IIT_ERS_Test, n_lt_zero_unitStride) subv( 'n', invalid_n, x.data(), inc, y.data(), inc ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), inc ); + computediff( "y", n, y.data(), y_ref.data(), inc ); } // n == 0, with non-unit stride @@ -114,7 +114,7 @@ TYPED_TEST(subv_IIT_ERS_Test, n_eq_zero_nonUnitStride) subv( 'n', invalid_n, x.data(), inc, y.data(), inc ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), inc ); + computediff( "y", n, y.data(), y_ref.data(), inc ); } // n == 0, with unit stride @@ -135,6 +135,6 @@ TYPED_TEST(subv_IIT_ERS_Test, n_eq_zero_unitStride) subv( 'n', invalid_n, x.data(), inc, y.data(), inc ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), inc ); + computediff( "y", n, y.data(), y_ref.data(), inc ); } #endif diff --git a/gtestsuite/testsuite/level1/subv/test_subv.h b/gtestsuite/testsuite/level1/subv/test_subv.h index 783f8e0be..2be3f0cdb 100644 --- a/gtestsuite/testsuite/level1/subv/test_subv.h +++ b/gtestsuite/testsuite/level1/subv/test_subv.h @@ -66,7 +66,7 @@ void test_subv( char conjx, gtint_t n, gtint_t incx, gtint_t incy, double thresh //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - computediff( n, y.data(), y_ref.data(), incy, thresh ); + computediff( "y", n, y.data(), y_ref.data(), incy, thresh ); } template @@ -98,5 +98,5 @@ static void test_subv( char conjx, gtint_t n, gtint_t incx, gtint_t incy, //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - computediff( n, y.data(), y_ref.data(), incy, thresh, true ); + computediff( "y", n, y.data(), y_ref.data(), incy, thresh, true ); } diff --git a/gtestsuite/testsuite/level1/swapv/swapv_IIT_ERS.cpp b/gtestsuite/testsuite/level1/swapv/swapv_IIT_ERS.cpp index 47c3317ba..248ef2ef8 100644 --- a/gtestsuite/testsuite/level1/swapv/swapv_IIT_ERS.cpp +++ b/gtestsuite/testsuite/level1/swapv/swapv_IIT_ERS.cpp @@ -72,7 +72,7 @@ TYPED_TEST(swapv_IIT_ERS_Test, n_lt_zero_nonUnitStride) swapv( invalid_n, x.data(), inc, y.data(), inc ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), inc ); + computediff( "y", N, y.data(), y_ref.data(), inc ); } // n < 0, with unit stride @@ -93,7 +93,7 @@ TYPED_TEST(swapv_IIT_ERS_Test, n_lt_zero_unitStride) swapv( invalid_n, x.data(), inc, y.data(), inc ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), inc ); + computediff( "y", N, y.data(), y_ref.data(), inc ); } // n == 0, with non-unit stride @@ -114,7 +114,7 @@ TYPED_TEST(swapv_IIT_ERS_Test, n_eq_zero_nonUnitStride) swapv( invalid_n, x.data(), inc, y.data(), inc ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), inc ); + computediff( "y", N, y.data(), y_ref.data(), inc ); } // n == 0, with unit stride @@ -135,7 +135,7 @@ TYPED_TEST(swapv_IIT_ERS_Test, n_eq_zero_unitStride) swapv( invalid_n, x.data(), inc, y.data(), inc ); // Use bitwise comparison (no threshold). - computediff( N, y.data(), y_ref.data(), inc ); + computediff( "y", N, y.data(), y_ref.data(), inc ); } #endif diff --git a/gtestsuite/testsuite/level1/xpbyv/test_xpbyv.h b/gtestsuite/testsuite/level1/xpbyv/test_xpbyv.h index 1694c2149..e4bb9a70e 100644 --- a/gtestsuite/testsuite/level1/xpbyv/test_xpbyv.h +++ b/gtestsuite/testsuite/level1/xpbyv/test_xpbyv.h @@ -67,5 +67,5 @@ static void test_xpbyv( char conjx, gtint_t n, gtint_t incx, gtint_t incy, //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - computediff( n, y.data(), y_ref.data(), incy, thresh ); + computediff( "y", n, y.data(), y_ref.data(), incy, thresh ); } diff --git a/gtestsuite/testsuite/level2/gemv/gemv_IIT_ERS.cpp b/gtestsuite/testsuite/level2/gemv/gemv_IIT_ERS.cpp index 872a5aa7a..593d4546f 100644 --- a/gtestsuite/testsuite/level2/gemv/gemv_IIT_ERS.cpp +++ b/gtestsuite/testsuite/level2/gemv/gemv_IIT_ERS.cpp @@ -87,7 +87,7 @@ TYPED_TEST(gemv_IIT_ERS_Test, n_eq_zero_Unitalphabeta) //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( N, y.data(), y_ref.data(), incy); + computediff( "y", N, y.data(), y_ref.data(), incy); } TYPED_TEST(gemv_IIT_ERS_Test, ZeroBeta_Unitalpha) @@ -121,7 +121,7 @@ TYPED_TEST(gemv_IIT_ERS_Test, ZeroBeta_Unitalpha) //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( N, y.data(), y_ref.data(), incy); + computediff( "y", N, y.data(), y_ref.data(), incy); } TYPED_TEST(gemv_IIT_ERS_Test, m_eq_zero_Unitbeta) @@ -157,7 +157,7 @@ TYPED_TEST(gemv_IIT_ERS_Test, m_eq_zero_Unitbeta) //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( N, y.data(), y_ref.data(), incy); + computediff( "y", N, y.data(), y_ref.data(), incy); } TYPED_TEST(gemv_IIT_ERS_Test, m_lt_zero_Unitscalar) @@ -193,7 +193,7 @@ TYPED_TEST(gemv_IIT_ERS_Test, m_lt_zero_Unitscalar) //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( N, y.data(), y_ref.data(), incy); + computediff( "y", N, y.data(), y_ref.data(), incy); } TYPED_TEST(gemv_IIT_ERS_Test, n_lt_zero_Unitscalar) @@ -229,7 +229,7 @@ TYPED_TEST(gemv_IIT_ERS_Test, n_lt_zero_Unitscalar) //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( N, y.data(), y_ref.data(), incy); + computediff( "y", N, y.data(), y_ref.data(), incy); } TYPED_TEST(gemv_IIT_ERS_Test, Zero_scalar) @@ -266,6 +266,7 @@ TYPED_TEST(gemv_IIT_ERS_Test, Zero_scalar) //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( N, y.data(), zero_vec.data(), incy); + computediff( "y", N, y.data(), zero_vec.data(), incy); } + #endif diff --git a/gtestsuite/testsuite/level2/gemv/test_gemv.h b/gtestsuite/testsuite/level2/gemv/test_gemv.h index e85866290..74c43e792 100644 --- a/gtestsuite/testsuite/level2/gemv/test_gemv.h +++ b/gtestsuite/testsuite/level2/gemv/test_gemv.h @@ -135,5 +135,5 @@ void test_gemv( char storage, char transa, char conjx, gtint_t m, gtint_t n, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( leny, y, y_ref, incy, thresh, is_evt_test ); + computediff( "y", leny, y, y_ref, incy, thresh ); } diff --git a/gtestsuite/testsuite/level2/ger/ger_IIT_ERS.cpp b/gtestsuite/testsuite/level2/ger/ger_IIT_ERS.cpp index 031153b8f..d810b58fa 100644 --- a/gtestsuite/testsuite/level2/ger/ger_IIT_ERS.cpp +++ b/gtestsuite/testsuite/level2/ger/ger_IIT_ERS.cpp @@ -78,7 +78,7 @@ TYPED_TEST(ger_IIT_ERS_Test, m_eq_zero_unitStride) y.data(), unit_inc, a.data(), LDA ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } // m == 0, with non-unit stride @@ -103,7 +103,7 @@ TYPED_TEST(ger_IIT_ERS_Test, m_eq_zero_nonUnitStride) y.data(), inc, a.data(), LDA ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } // n == 0, with unit stride @@ -128,7 +128,7 @@ TYPED_TEST(ger_IIT_ERS_Test, n_eq_zero_unitStride) y.data(), unit_inc, a.data(), LDA ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } // n == 0, with non-unit stride @@ -153,7 +153,7 @@ TYPED_TEST(ger_IIT_ERS_Test, n_eq_zero_nonUnitStride) y.data(), inc, a.data(), LDA ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } // alpha == 0, with unit stride @@ -176,7 +176,7 @@ TYPED_TEST(ger_IIT_ERS_Test, alpha_eq_zero_unitStride) y.data(), unit_inc, a.data(), LDA ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } // alpha == 0, with non-unit stride @@ -199,7 +199,7 @@ TYPED_TEST(ger_IIT_ERS_Test, alpha_eq_zero_nonUnitStride) y.data(), inc, a.data(), LDA ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } @@ -235,7 +235,7 @@ TYPED_TEST(ger_IIT_ERS_Test, m_lt_zero_unitStride) y.data(), unit_inc, a.data(), LDA ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } // m < 0, with non-unit stride @@ -260,7 +260,7 @@ TYPED_TEST(ger_IIT_ERS_Test, m_lt_zero_nonUnitStride) y.data(), inc, a.data(), LDA ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } // n < 0, with unit stride @@ -285,7 +285,7 @@ TYPED_TEST(ger_IIT_ERS_Test, n_lt_zero_unitStride) y.data(), unit_inc, a.data(), LDA ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } // n < 0, with non-unit stride @@ -310,7 +310,7 @@ TYPED_TEST(ger_IIT_ERS_Test, n_lt_zero_nonUnitStride) y.data(), inc, a.data(), LDA ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } // incx = 0, with unit incy @@ -335,7 +335,7 @@ TYPED_TEST(ger_IIT_ERS_Test, incx_eq_zero_unitStride) y.data(), unit_inc, a.data(), LDA ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } // incx = 0, with non-unit incy @@ -360,7 +360,7 @@ TYPED_TEST(ger_IIT_ERS_Test, incx_eq_zero_nonUnitStride) y.data(), inc, a.data(), LDA ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } // incy = 0, with unit incy @@ -385,7 +385,7 @@ TYPED_TEST(ger_IIT_ERS_Test, incy_eq_zero_unitStride) y.data(), invalid_incy, a.data(), LDA ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } // incy = 0, with non-unit incy @@ -410,7 +410,7 @@ TYPED_TEST(ger_IIT_ERS_Test, incy_eq_zero_nonUnitStride) y.data(), invalid_incy, a.data(), LDA ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } // lda < max(1, M), with unit stride @@ -435,7 +435,7 @@ TYPED_TEST(ger_IIT_ERS_Test, lda_lt_max_1_m_unitStride) y.data(), unit_inc, a.data(), invalid_lda ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } // lda < max(1, M), with non-unit stride @@ -460,6 +460,6 @@ TYPED_TEST(ger_IIT_ERS_Test, lda_lt_max_1_m_nonUnitStride) y.data(), inc, a.data(), invalid_lda ); // Computing bitwise difference. - computediff( STORAGE, M, N, a.data(), a_ref.data(), LDA ); + computediff( "A", STORAGE, M, N, a.data(), a_ref.data(), LDA ); } #endif diff --git a/gtestsuite/testsuite/level2/ger/test_ger.h b/gtestsuite/testsuite/level2/ger/test_ger.h index 8f2335705..213f44afe 100644 --- a/gtestsuite/testsuite/level2/ger/test_ger.h +++ b/gtestsuite/testsuite/level2/ger/test_ger.h @@ -71,7 +71,7 @@ void test_ger( char storage, char conjx, char conjy, gtint_t m, gtint_t n, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, m, n, a.data(), a_ref.data(), lda, thresh ); + computediff( "a", storage, m, n, a.data(), a_ref.data(), lda, thresh ); } template @@ -116,5 +116,5 @@ void test_ger( char storage, char conjx, char conjy, gtint_t m, gtint_t n, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, m, n, a.data(), a_ref.data(), lda, thresh, true ); + computediff( "A", storage, m, n, a.data(), a_ref.data(), lda, thresh, true ); } diff --git a/gtestsuite/testsuite/level2/hemv/test_hemv.h b/gtestsuite/testsuite/level2/hemv/test_hemv.h index a7243cbd2..9da9769db 100644 --- a/gtestsuite/testsuite/level2/hemv/test_hemv.h +++ b/gtestsuite/testsuite/level2/hemv/test_hemv.h @@ -74,5 +74,5 @@ void test_hemv( char storage, char uploa, char conja, char conjx, gtint_t n, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( n, y.data(), y_ref.data(), incy, thresh ); + computediff( "y", n, y.data(), y_ref.data(), incy, thresh ); } diff --git a/gtestsuite/testsuite/level2/her/test_her.h b/gtestsuite/testsuite/level2/her/test_her.h index db4165297..efffcb9f2 100644 --- a/gtestsuite/testsuite/level2/her/test_her.h +++ b/gtestsuite/testsuite/level2/her/test_her.h @@ -71,5 +71,5 @@ void test_her( char storage, char uploa, char conjx, gtint_t n, Tr alpha, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, n, n, a.data(), a_ref.data(), lda, thresh ); + computediff( "A", storage, n, n, a.data(), a_ref.data(), lda, thresh ); } diff --git a/gtestsuite/testsuite/level2/her2/test_her2.h b/gtestsuite/testsuite/level2/her2/test_her2.h index b0802d64b..36a98adb6 100644 --- a/gtestsuite/testsuite/level2/her2/test_her2.h +++ b/gtestsuite/testsuite/level2/her2/test_her2.h @@ -74,5 +74,5 @@ void test_her2( char storage, char uploa, char conjx, char conjy, gtint_t n, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, n, n, a.data(), a_ref.data(), lda, thresh ); + computediff( "A", storage, n, n, a.data(), a_ref.data(), lda, thresh ); } diff --git a/gtestsuite/testsuite/level2/symv/test_symv.h b/gtestsuite/testsuite/level2/symv/test_symv.h index f0df77c18..1efd636f0 100644 --- a/gtestsuite/testsuite/level2/symv/test_symv.h +++ b/gtestsuite/testsuite/level2/symv/test_symv.h @@ -74,5 +74,5 @@ void test_symv( char storage, char uploa, char conja, char conjx, gtint_t n, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( n, y.data(), y_ref.data(), incy, thresh ); + computediff( "y", n, y.data(), y_ref.data(), incy, thresh ); } diff --git a/gtestsuite/testsuite/level2/syr/test_syr.h b/gtestsuite/testsuite/level2/syr/test_syr.h index 125445fa1..0d6762379 100644 --- a/gtestsuite/testsuite/level2/syr/test_syr.h +++ b/gtestsuite/testsuite/level2/syr/test_syr.h @@ -71,5 +71,5 @@ void test_syr( char storage, char uploa, char conjx, gtint_t n, T alpha, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, n, n, a.data(), a_ref.data(), lda, thresh ); + computediff( "A", storage, n, n, a.data(), a_ref.data(), lda, thresh ); } diff --git a/gtestsuite/testsuite/level2/syr2/test_syr2.h b/gtestsuite/testsuite/level2/syr2/test_syr2.h index a4a623b6e..636f03d62 100644 --- a/gtestsuite/testsuite/level2/syr2/test_syr2.h +++ b/gtestsuite/testsuite/level2/syr2/test_syr2.h @@ -74,5 +74,5 @@ void test_syr2( char storage, char uploa, char conjx, char conjy, gtint_t n, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, n, n, a.data(), a_ref.data(), lda, thresh ); + computediff( "A", storage, n, n, a.data(), a_ref.data(), lda, thresh ); } diff --git a/gtestsuite/testsuite/level2/trmv/test_trmv.h b/gtestsuite/testsuite/level2/trmv/test_trmv.h index d59f4412f..a86d6cd48 100644 --- a/gtestsuite/testsuite/level2/trmv/test_trmv.h +++ b/gtestsuite/testsuite/level2/trmv/test_trmv.h @@ -70,5 +70,5 @@ void test_trmv( char storage, char uploa, char transa, char diaga, gtint_t n, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( n, x.data(), x_ref.data(), incx, thresh ); + computediff( "x", n, x.data(), x_ref.data(), incx, thresh ); } diff --git a/gtestsuite/testsuite/level2/trsv/IIT_ERS_test.cpp b/gtestsuite/testsuite/level2/trsv/IIT_ERS_test.cpp index 8aca8ba00..fdcc1db62 100644 --- a/gtestsuite/testsuite/level2/trsv/IIT_ERS_test.cpp +++ b/gtestsuite/testsuite/level2/trsv/IIT_ERS_test.cpp @@ -77,7 +77,7 @@ TYPED_TEST(TRSV_IIT_ERS_Test, invalid_UPLO) std::vector x_ref(x); trsv( STORAGE, 'A', TRANS, DIAG, N, &alpha, nullptr, LDA, x.data(), INC); - computediff( N, x.data(), x_ref.data(), INC ); + computediff( "x", N, x.data(), x_ref.data(), INC ); } /** @@ -94,7 +94,7 @@ TYPED_TEST(TRSV_IIT_ERS_Test, invalid_TRANS) std::vector x_ref(x); trsv( STORAGE, UPLO, 'A', DIAG, N, &alpha, nullptr, LDA, x.data(), INC); - computediff( N, x.data(), x_ref.data(), INC ); + computediff( "x", N, x.data(), x_ref.data(), INC ); } /** @@ -110,7 +110,7 @@ TYPED_TEST(TRSV_IIT_ERS_Test, invalid_DIAG) std::vector x_ref(x); trsv( STORAGE, UPLO, TRANS, 'A', N, &alpha, nullptr, LDA, x.data(), INC); - computediff( N, x.data(), x_ref.data(), INC ); + computediff( "x", N, x.data(), x_ref.data(), INC ); } /** @@ -126,7 +126,7 @@ TYPED_TEST(TRSV_IIT_ERS_Test, invalid_n) std::vector x_ref(x); trsv( STORAGE, UPLO, TRANS, DIAG, -1, &alpha, nullptr, LDA, x.data(), INC); - computediff( N, x.data(), x_ref.data(), INC ); + computediff( "x", N, x.data(), x_ref.data(), INC ); } @@ -143,7 +143,7 @@ TYPED_TEST(TRSV_IIT_ERS_Test, invalid_lda) std::vector x_ref(x); trsv( STORAGE, UPLO, TRANS, DIAG, N, &alpha, nullptr, LDA - 1, x.data(), INC); - computediff( N, x.data(), x_ref.data(), INC ); + computediff( "x", N, x.data(), x_ref.data(), INC ); } /** @@ -159,7 +159,7 @@ TYPED_TEST(TRSV_IIT_ERS_Test, invalid_incx) std::vector x_ref(x); trsv( STORAGE, UPLO, TRANS, DIAG, N, &alpha, nullptr, LDA, x.data(), 0); - computediff( N, x.data(), x_ref.data(), INC ); + computediff( "x", N, x.data(), x_ref.data(), INC ); } @@ -184,7 +184,7 @@ TYPED_TEST(TRSV_IIT_ERS_Test, n_eq_zero) std::vector x_ref(x); trsv( STORAGE, UPLO, TRANS, DIAG, 0, &alpha, nullptr, LDA, x.data(), INC); - computediff( N, x.data(), x_ref.data(), INC ); + computediff( "x", N, x.data(), x_ref.data(), INC ); } -#endif \ No newline at end of file +#endif diff --git a/gtestsuite/testsuite/level2/trsv/test_trsv.h b/gtestsuite/testsuite/level2/trsv/test_trsv.h index 24fb2b2be..f73b55118 100644 --- a/gtestsuite/testsuite/level2/trsv/test_trsv.h +++ b/gtestsuite/testsuite/level2/trsv/test_trsv.h @@ -144,5 +144,5 @@ void test_trsv( //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( n, x_ptr, x_ref.data(), incx, thresh, is_evt_test ); + computediff( "x", n, x_ptr, x_ref.data(), incx, thresh, is_evt_test ); } diff --git a/gtestsuite/testsuite/level3/gemm/IIT_ERS_test.cpp b/gtestsuite/testsuite/level3/gemm/IIT_ERS_test.cpp index 6aaf7d380..b0315e64e 100644 --- a/gtestsuite/testsuite/level3/gemm/IIT_ERS_test.cpp +++ b/gtestsuite/testsuite/level3/gemm/IIT_ERS_test.cpp @@ -81,7 +81,7 @@ TYPED_TEST(Gemm_IIT_ERS_Test, invalid_transa) // Call BLIS Gemm with a invalid value for TRANS value for A. gemm( STORAGE, 'p', TRANS, M, N, K, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When info == 2 @@ -102,7 +102,7 @@ TYPED_TEST(Gemm_IIT_ERS_Test, invalid_transb) // Call BLIS Gemm with a invalid value for TRANS value for B. gemm( STORAGE, TRANS, 'p', M, N, K, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When info == 3 @@ -122,7 +122,7 @@ TYPED_TEST(Gemm_IIT_ERS_Test, m_lt_zero) // Call BLIS Gemm with a invalid value for m. gemm( STORAGE, TRANS, TRANS, -1, N, K, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When info == 4 @@ -142,7 +142,7 @@ TYPED_TEST(Gemm_IIT_ERS_Test, n_lt_zero) // Call BLIS Gemm with a invalid value for n. gemm( STORAGE, TRANS, TRANS, M, -1, K, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When info == 5 @@ -162,7 +162,7 @@ TYPED_TEST(Gemm_IIT_ERS_Test, k_lt_zero) // Call BLIS Gemm with a invalid value for k. gemm( STORAGE, TRANS, TRANS, M, N, -1, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When info == 8 @@ -182,7 +182,7 @@ TYPED_TEST(Gemm_IIT_ERS_Test, invalid_lda) // Call BLIS Gemm with a invalid value for lda. gemm( STORAGE, TRANS, TRANS, M, N, K, &alpha, a.data(), LDA - 1, b.data(), LDB, &beta, c.data(), LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When info == 10 @@ -202,7 +202,7 @@ TYPED_TEST(Gemm_IIT_ERS_Test, invalid_ldb) // Call BLIS Gemm with a invalid value for ldb. gemm( STORAGE, TRANS, TRANS, M, N, K, &alpha, a.data(), LDA, b.data(), LDB - 1, &beta, c.data(), LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When info == 13 @@ -222,7 +222,7 @@ TYPED_TEST(Gemm_IIT_ERS_Test, invalid_ldc) // Call BLIS Gemm with a invalid value for ldc. gemm( STORAGE, TRANS, TRANS, M, N, K, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC - 1 ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } /* @@ -252,7 +252,7 @@ TYPED_TEST(Gemm_IIT_ERS_Test, m_eq_zero) testinghelpers::initone( beta ); gemm( STORAGE, TRANS, TRANS, 0, N, K, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When n is 0 @@ -271,7 +271,7 @@ TYPED_TEST(Gemm_IIT_ERS_Test, n_eq_zero) testinghelpers::initone( beta ); gemm( STORAGE, TRANS, TRANS, M, 0, K, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When alpha is 0 and beta is 1 @@ -292,7 +292,7 @@ TYPED_TEST(Gemm_IIT_ERS_Test, alpha_zero_beta_one) gemm( STORAGE, TRANS, TRANS, M, N, K, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When k is 0 and beta is 1 @@ -313,7 +313,7 @@ TYPED_TEST(Gemm_IIT_ERS_Test, k_zero_beta_one) gemm( STORAGE, TRANS, TRANS, M, N, 0, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } #if 0 @@ -338,7 +338,7 @@ TYPED_TEST(Gemm_IIT_ERS_Test, null_a_matrix) gemm( STORAGE, TRANS, TRANS, M, N, K, &alpha, nullptr, LDA, b.data(), LDB, &beta, c.data(), LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When b matrix is null @@ -357,7 +357,7 @@ TYPED_TEST(Gemm_IIT_ERS_Test, null_b_matrix) gemm( STORAGE, TRANS, TRANS, M, N, K, &alpha, a.data(), LDA, nullptr, LDB, &beta, c.data(), LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } #endif /* #IF 0 ENDS HERE */ #endif diff --git a/gtestsuite/testsuite/level3/gemm/test_gemm.h b/gtestsuite/testsuite/level3/gemm/test_gemm.h index ecf3fabeb..67aa1ba93 100644 --- a/gtestsuite/testsuite/level3/gemm/test_gemm.h +++ b/gtestsuite/testsuite/level3/gemm/test_gemm.h @@ -76,7 +76,7 @@ void test_gemm( char storage, char trnsa, char trnsb, gtint_t m, gtint_t n, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, m, n, c.data(), c_ref.data(), ldc, thresh ); + computediff( "c", storage, m, n, c.data(), c_ref.data(), ldc, thresh ); } // Test body used for exception value testing, by inducing an exception value @@ -135,7 +135,7 @@ void test_gemm( char storage, char trnsa, char trnsb, gtint_t m, gtint_t n, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, m, n, c.data(), c_ref.data(), ldc, thresh, true ); + computediff( "c", storage, m, n, c.data(), c_ref.data(), ldc, thresh, true ); } // Test body used for overflow and underflow checks @@ -242,5 +242,5 @@ void test_gemm( char storage, char trnsa, char trnsb, gtint_t over_under, gtint_ //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, m, n, c.data(), c_ref.data(), ldc, thresh, true ); + computediff( "C", storage, m, n, c.data(), c_ref.data(), ldc, thresh, true ); } diff --git a/gtestsuite/testsuite/level3/gemm_compute/gemm_compute_IIT_ERS.cpp b/gtestsuite/testsuite/level3/gemm_compute/gemm_compute_IIT_ERS.cpp index fe21f10c5..e49b93979 100644 --- a/gtestsuite/testsuite/level3/gemm_compute/gemm_compute_IIT_ERS.cpp +++ b/gtestsuite/testsuite/level3/gemm_compute/gemm_compute_IIT_ERS.cpp @@ -73,7 +73,7 @@ TYPED_TEST(GEMM_Compute_IIT_ERS_Test, invalid_transa) // Call BLIS Gemm with a invalid value for TRANS value for A. gemm_compute( STORAGE, 'x', TRANS, 'U', 'U', M, N, K, nullptr, nullptr, LDA, nullptr, LDB, nullptr, nullptr, LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When info == 2 @@ -88,7 +88,7 @@ TYPED_TEST(GEMM_Compute_IIT_ERS_Test, invalid_transb) // Call BLIS Gemm with a invalid value for TRANS value for A. gemm_compute( STORAGE, TRANS, 'x', 'U', 'U', M, N, K, nullptr, nullptr, LDA, nullptr, LDB, nullptr, nullptr, LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When info == 3 @@ -103,7 +103,7 @@ TYPED_TEST(GEMM_Compute_IIT_ERS_Test, m_lt_zero) // Call BLIS Gemm with a invalid value for m. gemm_compute( STORAGE, TRANS, TRANS, 'U', 'U', -1, N, K, nullptr, nullptr, LDA, nullptr, LDB, nullptr, nullptr, LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When info == 4 @@ -118,7 +118,7 @@ TYPED_TEST(GEMM_Compute_IIT_ERS_Test, n_lt_zero) // Call BLIS Gemm with a invalid value for m. gemm_compute( STORAGE, TRANS, TRANS, 'U', 'U', M, -1, K, nullptr, nullptr, LDA, nullptr, LDB, nullptr, nullptr, LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When info == 5 @@ -133,7 +133,7 @@ TYPED_TEST(GEMM_Compute_IIT_ERS_Test, k_lt_zero) // Call BLIS Gemm with a invalid value for m. gemm_compute( STORAGE, TRANS, TRANS, 'U', 'U', M, N, -1, nullptr, nullptr, LDA, nullptr, LDB, nullptr, nullptr, LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When info == 7 @@ -148,7 +148,7 @@ TYPED_TEST(GEMM_Compute_IIT_ERS_Test, invalid_lda) // Call BLIS Gemm with a invalid value for m. gemm_compute( STORAGE, TRANS, TRANS, 'U', 'U', M, N, K, nullptr, nullptr, LDA - 1, nullptr, LDB, nullptr, nullptr, LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When info == 9 @@ -163,7 +163,7 @@ TYPED_TEST(GEMM_Compute_IIT_ERS_Test, invalid_ldb) // Call BLIS Gemm with a invalid value for m. gemm_compute( STORAGE, TRANS, TRANS, 'U', 'U', M, N, K, nullptr, nullptr, LDA, nullptr, LDB - 1, nullptr, nullptr, LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When info == 12 @@ -178,7 +178,7 @@ TYPED_TEST(GEMM_Compute_IIT_ERS_Test, invalid_ldc_lt_zero) // Call BLIS Gemm with a invalid value for m. gemm_compute( STORAGE, TRANS, TRANS, 'U', 'U', M, N, K, nullptr, nullptr, LDA, nullptr, LDB, nullptr, nullptr, -1 ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When info == 12 @@ -193,7 +193,7 @@ TYPED_TEST(GEMM_Compute_IIT_ERS_Test, invalid_ldc) // Call BLIS Gemm with a invalid value for m. gemm_compute( STORAGE, TRANS, TRANS, 'U', 'U', M, N, K, nullptr, nullptr, LDA, nullptr, LDB, nullptr, nullptr, LDC - 1 ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } /* @@ -217,7 +217,7 @@ TYPED_TEST(GEMM_Compute_IIT_ERS_Test, m_eq_zero) // Call BLIS Gemm with a invalid value for m. gemm_compute( STORAGE, TRANS, TRANS, 'U', 'U', 0, N, K, nullptr, nullptr, LDA, nullptr, LDB, nullptr, nullptr, LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } // When n = 0 @@ -232,6 +232,6 @@ TYPED_TEST(GEMM_Compute_IIT_ERS_Test, n_eq_zero) // Call BLIS Gemm with a invalid value for m. gemm_compute( STORAGE, TRANS, TRANS, 'U', 'U', M, 0, K, nullptr, nullptr, LDA, nullptr, LDB, nullptr, nullptr, LDC ); // Use bitwise comparison (no threshold). - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC); } #endif diff --git a/gtestsuite/testsuite/level3/gemm_compute/test_gemm_compute.h b/gtestsuite/testsuite/level3/gemm_compute/test_gemm_compute.h index a9109d5ab..3f8f28e75 100644 --- a/gtestsuite/testsuite/level3/gemm_compute/test_gemm_compute.h +++ b/gtestsuite/testsuite/level3/gemm_compute/test_gemm_compute.h @@ -75,5 +75,5 @@ void test_gemm_compute( char storage, char trnsa, char trnsb, char pcka, char pc //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, m, n, c.data(), c_ref.data(), ldc, thresh ); + computediff( "C", storage, m, n, c.data(), c_ref.data(), ldc, thresh ); } diff --git a/gtestsuite/testsuite/level3/gemmt/IIT_ERS_test.cpp b/gtestsuite/testsuite/level3/gemmt/IIT_ERS_test.cpp index 5cf3de57a..e0e822e50 100644 --- a/gtestsuite/testsuite/level3/gemmt/IIT_ERS_test.cpp +++ b/gtestsuite/testsuite/level3/gemmt/IIT_ERS_test.cpp @@ -80,7 +80,7 @@ TYPED_TEST(GEMMT_IIT_ERS, invalid_uploa) testinghelpers::initone( beta ); gemmt( STORAGE, 'A', TRANS, TRANS, N, K, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC ); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC ); } // When info == 2 @@ -100,7 +100,7 @@ TYPED_TEST(GEMMT_IIT_ERS, invalid_transa) testinghelpers::initone( beta ); gemmt( STORAGE, UPLO, 'A', TRANS, N, K, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC ); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC ); } // When info == 3 @@ -120,7 +120,7 @@ TYPED_TEST(GEMMT_IIT_ERS, invalid_transb) testinghelpers::initone( beta ); gemmt( STORAGE, UPLO, TRANS, 'A', N, K, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC ); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC ); } // When info == 4 @@ -140,7 +140,7 @@ TYPED_TEST(GEMMT_IIT_ERS, n_lt_zero) testinghelpers::initone( beta ); gemmt( STORAGE, UPLO, TRANS, TRANS, -1, K, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC ); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC ); } // When info == 5 @@ -160,7 +160,7 @@ TYPED_TEST(GEMMT_IIT_ERS, k_lt_zero) testinghelpers::initone( beta ); gemmt( STORAGE, UPLO, TRANS, TRANS, N, -1, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC ); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC ); } // When info == 8 @@ -180,7 +180,7 @@ TYPED_TEST(GEMMT_IIT_ERS, invalid_lda) testinghelpers::initone( beta ); gemmt( STORAGE, UPLO, TRANS, TRANS, N, K, &alpha, a.data(), LDA-1, b.data(), LDB, &beta, c.data(), LDC ); - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC ); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC ); } // When info == 10 @@ -200,7 +200,7 @@ TYPED_TEST(GEMMT_IIT_ERS, invalid_ldb) testinghelpers::initone( beta ); gemmt( STORAGE, UPLO, TRANS, TRANS, N, K, &alpha, a.data(), LDA, b.data(), LDB-1, &beta, c.data(), LDC ); - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC ); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC ); } // When info == 13 @@ -220,7 +220,7 @@ TYPED_TEST(GEMMT_IIT_ERS, invalid_ldc) testinghelpers::initone( beta ); gemmt( STORAGE, UPLO, TRANS, TRANS, N, K, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC-1 ); - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC ); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC ); } /* @@ -250,7 +250,7 @@ TYPED_TEST(GEMMT_IIT_ERS, n_eq_zero) testinghelpers::initone( beta ); gemmt( STORAGE, UPLO, TRANS, TRANS, 0, K, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC ); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC ); } // When alpha is 0 and beta is 1 @@ -270,7 +270,7 @@ TYPED_TEST(GEMMT_IIT_ERS, alpha_zero_beta_one) testinghelpers::initone( beta ); gemmt( STORAGE, UPLO, TRANS, TRANS, N, K, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC ); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC ); } // When k is 0 and beta is 1 @@ -290,7 +290,7 @@ TYPED_TEST(GEMMT_IIT_ERS, k_zero_beta_one) testinghelpers::initone( beta ); gemmt( STORAGE, UPLO, TRANS, TRANS, N, 0, &alpha, a.data(), LDA, b.data(), LDB, &beta, c.data(), LDC ); - computediff( STORAGE, N, N, c.data(), c_ref.data(), LDC ); + computediff( "C", STORAGE, N, N, c.data(), c_ref.data(), LDC ); } #endif diff --git a/gtestsuite/testsuite/level3/gemmt/test_gemmt.h b/gtestsuite/testsuite/level3/gemmt/test_gemmt.h index fee14cec9..a20531e08 100644 --- a/gtestsuite/testsuite/level3/gemmt/test_gemmt.h +++ b/gtestsuite/testsuite/level3/gemmt/test_gemmt.h @@ -136,5 +136,5 @@ void test_gemmt( char storage, char uplo, char trnsa, char trnsb, gtint_t n, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, n, n, c_ptr, c_ref.data(), ldc, thresh, is_evt_test ); + computediff( "C", storage, n, n, c_ptr, c_ref.data(), ldc, thresh, is_evt_test ); } diff --git a/gtestsuite/testsuite/level3/hemm/test_hemm.h b/gtestsuite/testsuite/level3/hemm/test_hemm.h index a55510bf0..fc3aebca4 100644 --- a/gtestsuite/testsuite/level3/hemm/test_hemm.h +++ b/gtestsuite/testsuite/level3/hemm/test_hemm.h @@ -79,5 +79,5 @@ void test_hemm( char storage, char side, char uplo, char conja, char transb, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, m, n, c.data(), c_ref.data(), ldc, thresh ); + computediff( "C", storage, m, n, c.data(), c_ref.data(), ldc, thresh ); } diff --git a/gtestsuite/testsuite/level3/her2k/test_her2k.h b/gtestsuite/testsuite/level3/her2k/test_her2k.h index 6c65ffd79..b4e878d9b 100644 --- a/gtestsuite/testsuite/level3/her2k/test_her2k.h +++ b/gtestsuite/testsuite/level3/her2k/test_her2k.h @@ -78,5 +78,5 @@ void test_her2k( char storage, char uplo, char transa, char transb, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, n, n, c.data(), c_ref.data(), ldc, thresh ); + computediff( "C", storage, n, n, c.data(), c_ref.data(), ldc, thresh ); } diff --git a/gtestsuite/testsuite/level3/herk/test_herk.h b/gtestsuite/testsuite/level3/herk/test_herk.h index 46f0bbfcb..fe9e1be00 100644 --- a/gtestsuite/testsuite/level3/herk/test_herk.h +++ b/gtestsuite/testsuite/level3/herk/test_herk.h @@ -60,6 +60,7 @@ void test_herk( char storage, char uplo, char transa, gtint_t n, gtint_t k, // Create a copy of c so that we can check reference results. std::vector c_ref(c); + //---------------------------------------------------------- // Call BLIS function //---------------------------------------------------------- @@ -75,5 +76,5 @@ void test_herk( char storage, char uplo, char transa, gtint_t n, gtint_t k, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, n, n, c.data(), c_ref.data(), ldc, thresh ); + computediff( "C", storage, n, n, c.data(), c_ref.data(), ldc, thresh ); } diff --git a/gtestsuite/testsuite/level3/symm/test_symm.h b/gtestsuite/testsuite/level3/symm/test_symm.h index cc90d7f52..772a9cf91 100644 --- a/gtestsuite/testsuite/level3/symm/test_symm.h +++ b/gtestsuite/testsuite/level3/symm/test_symm.h @@ -80,5 +80,5 @@ void test_symm( char storage, char side, char uplo, char conja, char transb, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, m, n, c.data(), c_ref.data(), ldc, thresh ); + computediff( "C", storage, m, n, c.data(), c_ref.data(), ldc, thresh ); } diff --git a/gtestsuite/testsuite/level3/syr2k/test_syr2k.h b/gtestsuite/testsuite/level3/syr2k/test_syr2k.h index 27ce08b89..730076594 100644 --- a/gtestsuite/testsuite/level3/syr2k/test_syr2k.h +++ b/gtestsuite/testsuite/level3/syr2k/test_syr2k.h @@ -78,5 +78,5 @@ void test_syr2k( char storage, char uplo, char transa, char transb, gtint_t n, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, n, n, c.data(), c_ref.data(), ldc, thresh ); + computediff( "C", storage, n, n, c.data(), c_ref.data(), ldc, thresh ); } diff --git a/gtestsuite/testsuite/level3/syrk/test_syrk.h b/gtestsuite/testsuite/level3/syrk/test_syrk.h index 160055c57..4718b6174 100644 --- a/gtestsuite/testsuite/level3/syrk/test_syrk.h +++ b/gtestsuite/testsuite/level3/syrk/test_syrk.h @@ -59,18 +59,21 @@ void test_syrk( char storage, char uplo, char transa, gtint_t n, gtint_t k, // Create a copy of c so that we can check reference results. std::vector c_ref(c); + //---------------------------------------------------------- // Call BLIS function //---------------------------------------------------------- syrk( storage, uplo, transa, n, k, &alpha, a.data(), lda, &beta, c.data(), ldc ); + //---------------------------------------------------------- // Call reference implementation. //---------------------------------------------------------- testinghelpers::ref_syrk( storage, uplo, transa, n, k, alpha, a.data(), lda, beta, c_ref.data(), ldc ); + //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, n, n, c.data(), c_ref.data(), ldc, thresh ); + computediff( "C", storage, n, n, c.data(), c_ref.data(), ldc, thresh ); } diff --git a/gtestsuite/testsuite/level3/trmm/test_trmm.h b/gtestsuite/testsuite/level3/trmm/test_trmm.h index 4ba801d93..2709000b6 100644 --- a/gtestsuite/testsuite/level3/trmm/test_trmm.h +++ b/gtestsuite/testsuite/level3/trmm/test_trmm.h @@ -72,5 +72,5 @@ void test_trmm( char storage, char side, char uploa, char transa, char diaga, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, m, n, b.data(), b_ref.data(), ldb, thresh ); + computediff( "B", storage, m, n, b.data(), b_ref.data(), ldb, thresh ); } diff --git a/gtestsuite/testsuite/level3/trmm3/test_trmm3.h b/gtestsuite/testsuite/level3/trmm3/test_trmm3.h index 8203a0cb6..b7533b01b 100644 --- a/gtestsuite/testsuite/level3/trmm3/test_trmm3.h +++ b/gtestsuite/testsuite/level3/trmm3/test_trmm3.h @@ -76,5 +76,5 @@ void test_trmm3( char storage, char side, char uploa, char transa, char diaga, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, m, n, c.data(), c_ref.data(), ldb, thresh ); + computediff( "C", storage, m, n, c.data(), c_ref.data(), ldb, thresh ); } diff --git a/gtestsuite/testsuite/level3/trsm/IIT_ERS_test.cpp b/gtestsuite/testsuite/level3/trsm/IIT_ERS_test.cpp index 5d96e4df6..6656d28d7 100644 --- a/gtestsuite/testsuite/level3/trsm/IIT_ERS_test.cpp +++ b/gtestsuite/testsuite/level3/trsm/IIT_ERS_test.cpp @@ -63,7 +63,7 @@ TYPED_TEST(TRSM_IIT_ERS_Test, invalid_side) std::vector b_ref(b); trsm( STORAGE, 'a', UPLO, TRANS, DIAG, M, N, nullptr, nullptr, LDA, b.data(), LDB); - computediff( STORAGE, M, N, b.data(), b_ref.data(), LDB ); + computediff( "B", STORAGE, M, N, b.data(), b_ref.data(), LDB ); } /** @@ -79,7 +79,7 @@ TYPED_TEST(TRSM_IIT_ERS_Test, invalid_UPLO) std::vector b_ref(b); trsm( STORAGE, SIDE, 'a', TRANS, DIAG, M, N, nullptr, nullptr, LDA, b.data(), LDB); - computediff( STORAGE, M, N, b.data(), b_ref.data(), LDB ); + computediff( "B", STORAGE, M, N, b.data(), b_ref.data(), LDB ); } /** @@ -95,7 +95,7 @@ TYPED_TEST(TRSM_IIT_ERS_Test, invalid_TRANS) std::vector b_ref(b); trsm( STORAGE, SIDE, UPLO, 'a', DIAG, M, N, nullptr, nullptr, LDA, b.data(), LDB); - computediff( STORAGE, M, N, b.data(), b_ref.data(), LDB ); + computediff( "B", STORAGE, M, N, b.data(), b_ref.data(), LDB ); } /** @@ -110,7 +110,7 @@ TYPED_TEST(TRSM_IIT_ERS_Test, invalid_DIAG) std::vector b_ref(b); trsm( STORAGE, SIDE, UPLO, TRANS, 'a', M, N, nullptr, nullptr, LDA, b.data(), LDB); - computediff( STORAGE, M, N, b.data(), b_ref.data(), LDB ); + computediff( "B", STORAGE, M, N, b.data(), b_ref.data(), LDB ); } /** @@ -125,7 +125,7 @@ TYPED_TEST(TRSM_IIT_ERS_Test, invalid_m) std::vector b_ref(b); trsm( STORAGE, SIDE, UPLO, TRANS, DIAG, -2, N, nullptr, nullptr, LDA, b.data(), LDB); - computediff( STORAGE, M, N, b.data(), b_ref.data(), LDB ); + computediff( "B", STORAGE, M, N, b.data(), b_ref.data(), LDB ); } /** @@ -140,7 +140,7 @@ TYPED_TEST(TRSM_IIT_ERS_Test, invalid_n) std::vector b_ref(b); trsm( STORAGE, SIDE, UPLO, TRANS, DIAG, M, -2, nullptr, nullptr, LDA, b.data(), LDB); - computediff( STORAGE, M, N, b.data(), b_ref.data(), LDB ); + computediff( "B", STORAGE, M, N, b.data(), b_ref.data(), LDB ); } /** @@ -155,7 +155,7 @@ TYPED_TEST(TRSM_IIT_ERS_Test, invalid_lda) std::vector b_ref(b); trsm( STORAGE, SIDE, UPLO, TRANS, DIAG, M, N, nullptr, nullptr, LDA - 1, b.data(), LDB); - computediff( STORAGE, M, N, b.data(), b_ref.data(), LDB ); + computediff( "B", STORAGE, M, N, b.data(), b_ref.data(), LDB ); } /** @@ -170,7 +170,7 @@ TYPED_TEST(TRSM_IIT_ERS_Test, invalid_ldb) std::vector b_ref(b); trsm( STORAGE, SIDE, UPLO, TRANS, DIAG, M, N, nullptr, nullptr, LDA, b.data(), LDB - 1); - computediff( STORAGE, M, N, b.data(), b_ref.data(), LDB ); + computediff( "B", STORAGE, M, N, b.data(), b_ref.data(), LDB ); } @@ -195,7 +195,7 @@ TYPED_TEST(TRSM_IIT_ERS_Test, m_eq_zero) std::vector b_ref(b); trsm( STORAGE, SIDE, UPLO, TRANS, DIAG, 0, N, nullptr, nullptr, LDA, b.data(), LDB ); - computediff( STORAGE, M, N, b.data(), b_ref.data(), LDB ); + computediff( "B", STORAGE, M, N, b.data(), b_ref.data(), LDB ); } /** @@ -209,7 +209,7 @@ TYPED_TEST(TRSM_IIT_ERS_Test, n_eq_zero) std::vector b_ref(b); trsm( STORAGE, SIDE, UPLO, TRANS, DIAG, M, 0, nullptr, nullptr, LDA, b.data(), LDB ); - computediff( STORAGE, M, N, b.data(), b_ref.data(), LDB ); + computediff( "B", STORAGE, M, N, b.data(), b_ref.data(), LDB ); } -#endif \ No newline at end of file +#endif diff --git a/gtestsuite/testsuite/level3/trsm/test_trsm.h b/gtestsuite/testsuite/level3/trsm/test_trsm.h index 135c53f70..9218718fc 100644 --- a/gtestsuite/testsuite/level3/trsm/test_trsm.h +++ b/gtestsuite/testsuite/level3/trsm/test_trsm.h @@ -243,5 +243,5 @@ void test_trsm( char storage, char side, char uploa, char transa, char diaga, //---------------------------------------------------------- // check component-wise error. //---------------------------------------------------------- - computediff( storage, m, n, b.data(), b_ref.data(), ldb, thresh, nan_inf_check ); + computediff( "B", storage, m, n, b.data(), b_ref.data(), ldb, thresh, nan_inf_check ); } diff --git a/gtestsuite/testsuite/ukr/amaxv/test_amaxv_ukr.h b/gtestsuite/testsuite/ukr/amaxv/test_amaxv_ukr.h index df77e5055..2599cc1e7 100644 --- a/gtestsuite/testsuite/ukr/amaxv/test_amaxv_ukr.h +++ b/gtestsuite/testsuite/ukr/amaxv/test_amaxv_ukr.h @@ -111,5 +111,5 @@ void test_amaxv_ukr( FT ukr_fp, gtint_t n, gtint_t incx, double thresh, bool is_ //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - EXPECT_EQ( idx, idx_ref ); + computediff( "idx", idx, idx_ref ); } diff --git a/gtestsuite/testsuite/ukr/axpbyv/test_axpbyv_ukr.h b/gtestsuite/testsuite/ukr/axpbyv/test_axpbyv_ukr.h index 88d315d9c..1c1774e68 100644 --- a/gtestsuite/testsuite/ukr/axpbyv/test_axpbyv_ukr.h +++ b/gtestsuite/testsuite/ukr/axpbyv/test_axpbyv_ukr.h @@ -122,5 +122,5 @@ static void test_axpbyv_ukr( FT ukr_fp, char conjx, gtint_t n, gtint_t incx, gti //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - computediff( n, y, y_ref, incy, thresh ); + computediff( "y", n, y, y_ref, incy, thresh ); } diff --git a/gtestsuite/testsuite/ukr/axpyv/test_axpyv_ukr.h b/gtestsuite/testsuite/ukr/axpyv/test_axpyv_ukr.h index b196e3add..035f2f53d 100644 --- a/gtestsuite/testsuite/ukr/axpyv/test_axpyv_ukr.h +++ b/gtestsuite/testsuite/ukr/axpyv/test_axpyv_ukr.h @@ -122,6 +122,6 @@ static void test_axpyv_ukr( FT ukr_fp, char conjx, gtint_t n, gtint_t incx, gtin //---------------------------------------------------------- // Compute component-wise error. //---------------------------------------------------------- - computediff( n, y, y_ref, incy, thresh ); + computediff( "y", n, y, y_ref, incy, thresh ); } diff --git a/gtestsuite/testsuite/ukr/copyv/test_copyv_ukr.h b/gtestsuite/testsuite/ukr/copyv/test_copyv_ukr.h index c4f915eae..89c9a0e79 100644 --- a/gtestsuite/testsuite/ukr/copyv/test_copyv_ukr.h +++ b/gtestsuite/testsuite/ukr/copyv/test_copyv_ukr.h @@ -121,5 +121,5 @@ static void test_copyv_ukr( FT ukr_fp, char conjx, gtint_t n, gtint_t incx, gtin //---------------------------------------------------------- // Compute error. //---------------------------------------------------------- - computediff( n, y, y_ref, incy ); + computediff( "y", n, y, y_ref, incy ); } diff --git a/gtestsuite/testsuite/ukr/dotv/test_dotv_ukr.h b/gtestsuite/testsuite/ukr/dotv/test_dotv_ukr.h index 9377f8d59..ea35ca3b8 100644 --- a/gtestsuite/testsuite/ukr/dotv/test_dotv_ukr.h +++ b/gtestsuite/testsuite/ukr/dotv/test_dotv_ukr.h @@ -122,5 +122,5 @@ static void test_dotv_ukr( FT ukr, char conjx, char conjy, gtint_t n, gtint_t in testinghelpers::ref_dotv( conjx, conjy, n, x, incx, y_ref, incy, &rho_ref ); // Compute component-wise error. - computediff( rho, rho_ref, thresh ); + computediff( "rho", rho, rho_ref, thresh ); } diff --git a/gtestsuite/testsuite/ukr/gemm/dgemm_ukernel.cpp b/gtestsuite/testsuite/ukr/gemm/dgemm_ukernel.cpp index df3380310..058a7630d 100644 --- a/gtestsuite/testsuite/ukr/gemm/dgemm_ukernel.cpp +++ b/gtestsuite/testsuite/ukr/gemm/dgemm_ukernel.cpp @@ -592,7 +592,7 @@ TEST_P(dgemmSmallUkernel, gemm_small) testinghelpers::ref_gemm( storage, 'n', 'n', m, n, k, alpha, a, lda, b, ldb, beta, cref, ldc); // Check component-wise error - computediff( storage, m, n, c, cref, ldc, thresh ); + computediff( "C", storage, m, n, c, cref, ldc, thresh ); free(cref); } @@ -641,7 +641,7 @@ TEST_P(dgemmSmallUkernel, gemm_small) testinghelpers::ref_gemm( storage, 'n', 'n', m, n, k, alpha, a.data(), lda, b.data(), ldb, beta, c_ref.data(), ldc); // Check component-wise error - computediff( storage, m, n, c.data(), c_ref.data(), ldc, thresh ); + computediff( "C", storage, m, n, c.data(), c_ref.data(), ldc, thresh ); } }// end of function diff --git a/gtestsuite/testsuite/ukr/gemm/sgemm_ukernel.cpp b/gtestsuite/testsuite/ukr/gemm/sgemm_ukernel.cpp index a89e9d12e..e1948cf5a 100644 --- a/gtestsuite/testsuite/ukr/gemm/sgemm_ukernel.cpp +++ b/gtestsuite/testsuite/ukr/gemm/sgemm_ukernel.cpp @@ -484,7 +484,7 @@ TEST_P(SGemmSmallUkernelTest, gemm_small) a.data(), lda, b.data(), ldb, beta, c_ref.data(), ldc); // Check component-wise error - computediff( storage, m, n, c.data(), c_ref.data(), ldc, thresh ); + computediff( "C", storage, m, n, c.data(), c_ref.data(), ldc, thresh ); }// end of function diff --git a/gtestsuite/testsuite/ukr/gemm/test_complex_gemm_ukr.h b/gtestsuite/testsuite/ukr/gemm/test_complex_gemm_ukr.h index f576f06fb..301a09db3 100644 --- a/gtestsuite/testsuite/ukr/gemm/test_complex_gemm_ukr.h +++ b/gtestsuite/testsuite/ukr/gemm/test_complex_gemm_ukr.h @@ -231,7 +231,7 @@ static void test_complex_gemmsup_ukr( char storage, char trnsa, char trnsb, gtin buf_a, lda, buf_b, ldb, beta, buf_cref, ldc); // Check component-wise error - computediff( storage, m, n, buf_c, buf_cref, ldc, thresh ); + computediff( "C", storage, m, n, buf_c, buf_cref, ldc, thresh ); } @@ -408,6 +408,6 @@ static void test_gemmnat_ukr( char storage, gtint_t m, gtint_t n, gtint_t k, T a buf_a, lda, buf_b, ldb, beta, (T*)buf_cref, ldc); // Check component-wise error - computediff( storage, m, n, (T*)buf_c, (T*)buf_cref, ldc, thresh ); + computediff( "C", storage, m, n, (T*)buf_c, (T*)buf_cref, ldc, thresh ); } diff --git a/gtestsuite/testsuite/ukr/gemm/test_gemm_ukr.h b/gtestsuite/testsuite/ukr/gemm/test_gemm_ukr.h index 66e3d0c0b..1da89dd48 100644 --- a/gtestsuite/testsuite/ukr/gemm/test_gemm_ukr.h +++ b/gtestsuite/testsuite/ukr/gemm/test_gemm_ukr.h @@ -226,7 +226,7 @@ static void test_gemmnat_ukr( buf_a, lda, buf_b, ldb, beta, (T*)buf_cref, ldc); // Check component-wise error - computediff( storage, m, n, (T*)buf_c, (T*)buf_cref, ldc, thresh ); + computediff( "C", storage, m, n, (T*)buf_c, (T*)buf_cref, ldc, thresh ); } @@ -354,7 +354,7 @@ static void test_gemmk1_ukr( FT ukr_fp, gtint_t m, gtint_t n, gtint_t k, char st buf_a, lda, buf_b, ldb, beta, buf_cref, ldc); // Check component-wise error - computediff( storage, m, n, buf_c, buf_cref, ldc, thresh ); + computediff( "C", storage, m, n, buf_c, buf_cref, ldc, thresh ); } template @@ -591,5 +591,5 @@ static void test_gemmsup_ukr( FT ukr_fp, char trnsa, char trnsb, gtint_t m, gtin buf_a, lda, buf_b, ldb, beta, ref_c, ldc); // Check component-wise error - computediff( storage, m, n, buf_c, ref_c, ldc, thresh ); + computediff( "C", storage, m, n, buf_c, ref_c, ldc, thresh ); } diff --git a/gtestsuite/testsuite/ukr/nrm2/test_nrm2_ukr.h b/gtestsuite/testsuite/ukr/nrm2/test_nrm2_ukr.h index da5c2e63e..1c99f6592 100644 --- a/gtestsuite/testsuite/ukr/nrm2/test_nrm2_ukr.h +++ b/gtestsuite/testsuite/ukr/nrm2/test_nrm2_ukr.h @@ -115,6 +115,6 @@ static void test_nrm2_ukr( nrm2_ker_ft ukr_fp, gtint_t n, gtint_t incx, d //---------------------------------------------------------- // Compute error. //---------------------------------------------------------- - computediff( norm, norm_ref, thresh ); + computediff( "norm", norm, norm_ref, thresh ); } diff --git a/gtestsuite/testsuite/ukr/scalv/test_scalv_ukr.h b/gtestsuite/testsuite/ukr/scalv/test_scalv_ukr.h index 936e2f981..95c889e31 100644 --- a/gtestsuite/testsuite/ukr/scalv/test_scalv_ukr.h +++ b/gtestsuite/testsuite/ukr/scalv/test_scalv_ukr.h @@ -113,5 +113,5 @@ static void test_scalv_ukr( FT ukr, char conja_alpha, gtint_t n, gtint_t incx, testinghelpers::ref_scalv( conja_alpha, n, alpha, x_ref, incx ); // Compute component-wise error. - computediff( n, x, x_ref, incx, thresh ); + computediff( "x", n, x, x_ref, incx, thresh ); } diff --git a/gtestsuite/testsuite/ukr/trsm/test_trsm_ukr.h b/gtestsuite/testsuite/ukr/trsm/test_trsm_ukr.h index a1e03ad45..641012f85 100644 --- a/gtestsuite/testsuite/ukr/trsm/test_trsm_ukr.h +++ b/gtestsuite/testsuite/ukr/trsm/test_trsm_ukr.h @@ -299,7 +299,7 @@ static void test_trsm_ukr( FT ukr_fp, char storage, char uploa, char diaga, } // Compute component-wise error. - computediff( storage, m, n, c, c_ref, ldc, thresh ); + computediff( "C", storage, m, n, c, c_ref, ldc, thresh ); if(storage != 'r' && storage != 'R' && storage != 'c' && storage != 'C') { @@ -419,8 +419,8 @@ static void test_trsm_small_ukr( FT ukr_fp, char side, char uploa, char diaga, testinghelpers::ref_trsm( 'c', side, uploa, transa, diaga, m, n, alpha, a, cs_a, b_ref, cs_b ); - computediff( 'c', m, n, b, b_ref, cs_b, thresh ); + computediff( "B", 'c', m, n, b, b_ref, cs_b, thresh ); // free memory free(b_ref); -} \ No newline at end of file +} diff --git a/gtestsuite/testsuite/util/asumv/asumv_IIT_ERS.cpp b/gtestsuite/testsuite/util/asumv/asumv_IIT_ERS.cpp index 33f90dce7..9f90fea72 100644 --- a/gtestsuite/testsuite/util/asumv/asumv_IIT_ERS.cpp +++ b/gtestsuite/testsuite/util/asumv/asumv_IIT_ERS.cpp @@ -77,7 +77,7 @@ TYPED_TEST(asumv_IIT_ERS_Test, n_lt_zero_nonUnitStride) asum = asumv( invalid_n, x.data(), inc ); // Computing the difference. - computediff( asum, asum_ref ); + computediff( "asum", asum, asum_ref ); } // n == 0, with non-unit stride @@ -102,7 +102,7 @@ TYPED_TEST(asumv_IIT_ERS_Test, n_eq_zero_nonUnitStride) asum = asumv( invalid_n, x.data(), inc ); // Computing the difference. - computediff( asum, asum_ref ); + computediff( "asum", asum, asum_ref ); } // n < 0, with unit stride @@ -127,7 +127,7 @@ TYPED_TEST(asumv_IIT_ERS_Test, n_lt_zero_unitStride) asum = asumv( invalid_n, x.data(), unit_inc ); // Computing the difference. - computediff( asum, asum_ref ); + computediff( "asum", asum, asum_ref ); } // n == 0, with unit stride @@ -152,7 +152,7 @@ TYPED_TEST(asumv_IIT_ERS_Test, n_eq_zero_unitStride) asum = asumv( invalid_n, x.data(), unit_inc ); // Computing the difference. - computediff( asum, asum_ref ); + computediff( "asum", asum, asum_ref ); } // inc < 0 @@ -176,7 +176,7 @@ TYPED_TEST(asumv_IIT_ERS_Test, inc_lt_0) asum = asumv( N, x.data(), invalid_inc ); // Computing the difference. - computediff( asum, asum_ref ); + computediff( "asum", asum, asum_ref ); } // inc == 0 @@ -200,6 +200,6 @@ TYPED_TEST(asumv_IIT_ERS_Test, inc_eq_0) asum = asumv( N, x.data(), invalid_inc ); // Computing the difference. - computediff( asum, asum_ref ); + computediff( "asum", asum, asum_ref ); } -#endif \ No newline at end of file +#endif diff --git a/gtestsuite/testsuite/util/asumv/test_asumv.h b/gtestsuite/testsuite/util/asumv/test_asumv.h index 330b0fd0f..89ef6ebfb 100644 --- a/gtestsuite/testsuite/util/asumv/test_asumv.h +++ b/gtestsuite/testsuite/util/asumv/test_asumv.h @@ -65,7 +65,7 @@ void test_asumv( gtint_t n, gtint_t incx, double thresh ) //---------------------------------------------------------- // Compute error. //---------------------------------------------------------- - computediff( asum, asum_ref, thresh ); + computediff( "asum", asum, asum_ref, thresh ); } /** @@ -103,5 +103,5 @@ void test_asumv( gtint_t n, gtint_t incx, gtint_t xi, double ix_exval, //---------------------------------------------------------- // Compute error. //---------------------------------------------------------- - computediff( asum, asum_ref, thresh, true ); -} \ No newline at end of file + computediff( "asum", asum, asum_ref, thresh, true ); +} diff --git a/gtestsuite/testsuite/util/nrm2/nrm2_corner_cases.cpp b/gtestsuite/testsuite/util/nrm2/nrm2_corner_cases.cpp index c4e09cd83..4224d1a4b 100644 --- a/gtestsuite/testsuite/util/nrm2/nrm2_corner_cases.cpp +++ b/gtestsuite/testsuite/util/nrm2/nrm2_corner_cases.cpp @@ -59,7 +59,7 @@ TYPED_TEST(nrm2_ERS, zero_n) { // If "x" is accessed before return then nrm2 would segfault. blis_norm = nrm2(n, nullptr, incx); RT ref_norm = testinghelpers::ref_nrm2(n, nullptr, incx); - computediff(blis_norm, ref_norm); + computediff("norm", blis_norm, ref_norm); } // Edge case where it actually does not return early. @@ -85,7 +85,7 @@ TYPED_TEST(nrm2_EIC, zero_incx_scalar) { RT blis_norm = 19.0; blis_norm = nrm2(n, x.data(), incx); RT ref_norm = testinghelpers::ref_nrm2(n, x.data(), incx); - computediff(blis_norm, ref_norm); + computediff("norm", blis_norm, ref_norm); } TYPED_TEST(nrm2_EIC, zero_incx_vectorized) { @@ -103,7 +103,7 @@ TYPED_TEST(nrm2_EIC, zero_incx_vectorized) { RT blis_norm = 19.0; blis_norm = nrm2(n, x.data(), incx); RT ref_norm = testinghelpers::ref_nrm2(n, x.data(), incx); - computediff(blis_norm, ref_norm); + computediff("norm", blis_norm, ref_norm); } /* @@ -126,5 +126,5 @@ TYPED_TEST( nrm2_EIC, zero_incx_MT ) { x[0] = T{2.0}*x[0]; RT blis_norm = nrm2(n, x.data(), incx); RT ref_norm = testinghelpers::ref_nrm2(n, x.data(), incx); - computediff(blis_norm, ref_norm); + computediff("norm", blis_norm, ref_norm); } diff --git a/gtestsuite/testsuite/util/nrm2/nrm2_invalid_inputs.cpp b/gtestsuite/testsuite/util/nrm2/nrm2_invalid_inputs.cpp index 3a702de62..1c2f6ceec 100644 --- a/gtestsuite/testsuite/util/nrm2/nrm2_invalid_inputs.cpp +++ b/gtestsuite/testsuite/util/nrm2/nrm2_invalid_inputs.cpp @@ -57,5 +57,5 @@ TYPED_TEST(nrm2_IIT, negative_n) { RT blis_norm = -4.2; blis_norm = nrm2(-2, &x, INC); - computediff(blis_norm, 0.0); + computediff("norm", blis_norm, 0.0); } diff --git a/gtestsuite/testsuite/util/nrm2/nrm2_underflow_overflow.cpp b/gtestsuite/testsuite/util/nrm2/nrm2_underflow_overflow.cpp index 22e014129..9d6babc26 100644 --- a/gtestsuite/testsuite/util/nrm2/nrm2_underflow_overflow.cpp +++ b/gtestsuite/testsuite/util/nrm2/nrm2_underflow_overflow.cpp @@ -15,7 +15,7 @@ TYPED_TEST(OUT_nrm2, maxFP_scalar) { T x = T{maxval}; RT norm = nrm2(1, &x, 1); - computediff(maxval, norm); + computediff("norm", norm, maxval); } TYPED_TEST(OUT_nrm2, maxFP_vectorized) { using T = TypeParam; @@ -25,7 +25,7 @@ TYPED_TEST(OUT_nrm2, maxFP_vectorized) { RT maxval = (std::numeric_limits::max)(); x[17] = T{maxval}; RT norm = nrm2(n, x.data(), 1); - computediff(maxval, norm); + computediff("norm", norm, maxval); } // Testing for min representable number to see if underflow is handled correctly. @@ -36,7 +36,7 @@ TYPED_TEST(OUT_nrm2, minFP_scalar) { RT minval = (std::numeric_limits::min)(); T x = T{minval}; RT norm = nrm2(1, &x, 1); - computediff(minval, norm); + computediff("norm", norm, minval); } TYPED_TEST(OUT_nrm2, minFP_vectorized) { using T = TypeParam; @@ -46,7 +46,7 @@ TYPED_TEST(OUT_nrm2, minFP_vectorized) { RT minval = (std::numeric_limits::min)(); x[17] = T{minval}; RT norm = nrm2(n, x.data(), 1); - computediff(minval, norm); + computediff("norm", norm, minval); } // Since there are 2 different paths, vectorized and scalar, @@ -57,7 +57,7 @@ TYPED_TEST(OUT_nrm2, zeroFP_scalar) { T x = T{0}; RT norm = nrm2(1, &x, 1); - computediff(0, norm); + computediff("norm", norm, 0); } TYPED_TEST(OUT_nrm2, zeroFP_vectorized) { using T = TypeParam; @@ -66,7 +66,7 @@ TYPED_TEST(OUT_nrm2, zeroFP_vectorized) { std::vector x(n, T{0}); RT norm = nrm2(n, x.data(), 1); - computediff(0, norm); + computediff("norm", norm, 0); } /* @@ -101,7 +101,7 @@ TYPED_TEST( OUT_nrm2, OFlow_MT ) { RT norm = nrm2( n, x.data(), 1 ); RT ref_norm = testinghelpers::ref_nrm2( n, x.data(), 1 ); - computediff( norm, ref_norm, thresh ); + computediff( "norm", norm, ref_norm, thresh ); } // Checking only for underflow, based on the threshold @@ -129,7 +129,7 @@ TYPED_TEST( OUT_nrm2, UFlow_MT ) { RT norm = nrm2( n, x.data(), 1 ); RT ref_norm = testinghelpers::ref_nrm2( n, x.data(), 1 ); - computediff( norm, ref_norm, thresh ); + computediff( "norm", norm, ref_norm, thresh ); } // Checking for both overflow and underflow, based on the thresholds @@ -159,7 +159,7 @@ TYPED_TEST( OUT_nrm2, OUFlow_MT ) { RT norm = nrm2( n, x.data(), 1 ); RT ref_norm = testinghelpers::ref_nrm2( n, x.data(), 1 ); - computediff( norm, ref_norm, thresh ); + computediff( "norm", norm, ref_norm, thresh ); } // Specific test case used by an ISV. @@ -170,8 +170,8 @@ TEST(dnrm2, largeDouble) { std::vector x{3e300, 4e300}, y{-4e300, -3e300}; T norm = nrm2(n, x.data(), 1); - computediff(5e300, norm); + computediff( "norm", norm, 5e300 ); norm = nrm2(n, y.data(), 1); - computediff(5e300, norm); + computediff( "norm", norm, 5e300 ); } diff --git a/gtestsuite/testsuite/util/nrm2/test_nrm2.h b/gtestsuite/testsuite/util/nrm2/test_nrm2.h index def455192..f32735e16 100644 --- a/gtestsuite/testsuite/util/nrm2/test_nrm2.h +++ b/gtestsuite/testsuite/util/nrm2/test_nrm2.h @@ -63,7 +63,7 @@ void test_nrm2( gtint_t n, gtint_t incx, double thresh ) //---------------------------------------------------------- // Compute error. //---------------------------------------------------------- - computediff( norm, norm_ref, thresh ); + computediff( "norm", norm, norm_ref, thresh ); } // Test body used for extreme value testing, where we want to test @@ -97,5 +97,5 @@ void test_nrm2( gtint_t n, gtint_t incx, gtint_t i, T iexval, gtint_t j = 0, T j // Compute error. //---------------------------------------------------------- // Compare using NaN/Inf checks. - computediff( norm, norm_ref, true ); + computediff( "norm", norm, norm_ref, true ); }