From 9e42209e41045194aeb5304197f16139e2db7fa4 Mon Sep 17 00:00:00 2001 From: James Foucar Date: Mon, 7 Mar 2022 14:19:07 -0700 Subject: [PATCH 1/2] A couple newer sparse tests were not following the new testing pattern --- .../sparse/Test_Sparse_spmv_blockcrs.hpp | 241 ++---------------- unit_test/sparse/Test_Sparse_spmv_bsr.hpp | 240 ++--------------- 2 files changed, 38 insertions(+), 443 deletions(-) diff --git a/unit_test/sparse/Test_Sparse_spmv_blockcrs.hpp b/unit_test/sparse/Test_Sparse_spmv_blockcrs.hpp index c30923a5bf..f775e4890d 100644 --- a/unit_test/sparse/Test_Sparse_spmv_blockcrs.hpp +++ b/unit_test/sparse/Test_Sparse_spmv_blockcrs.hpp @@ -500,229 +500,26 @@ void testBlockCrsMatrix_SpM_MV() { DEVICE>(); \ } -#if (defined(KOKKOSKERNELS_INST_DOUBLE) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) #if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(double, int, int, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(double, int, int, LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_DOUBLE) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(double, int64_t, int, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(double, int64_t, int, LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_DOUBLE) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(double, int, size_t, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(double, int, size_t, LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_DOUBLE) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(double, int64_t, size_t, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(double, int64_t, size_t, LayoutRight, - TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_FLOAT) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(float, int, int, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(float, int, int, LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_FLOAT) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(float, int64_t, int, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(float, int64_t, int, LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_FLOAT) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(float, int, size_t, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(float, int, size_t, LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_FLOAT) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(float, int64_t, size_t, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(float, int64_t, size_t, LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_DOUBLE_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_double, int, int, LayoutLeft, - TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_double, int, int, LayoutRight, - TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_DOUBLE_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_double, int64_t, int, LayoutLeft, - TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_double, int64_t, int, LayoutRight, - TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_DOUBLE_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_double, int, size_t, LayoutLeft, - TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_double, int, size_t, LayoutRight, - TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_DOUBLE_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_double, int64_t, size_t, LayoutLeft, - TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_double, int64_t, size_t, - LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_FLOAT_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_float, int, int, LayoutLeft, - TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_float, int, int, LayoutRight, - TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_FLOAT_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_float, int64_t, int, LayoutLeft, - TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_float, int64_t, int, LayoutRight, - TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_FLOAT_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_float, int, size_t, LayoutLeft, - TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_float, int, size_t, LayoutRight, - TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_FLOAT_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_float, int64_t, size_t, LayoutLeft, - TestExecSpace) -#endif + +#define KOKKOSKERNELS_EXECUTE_TEST(SCALAR, ORDINAL, OFFSET, DEVICE) \ + EXECUTE_BCRS_TIMES_MVEC_TEST(SCALAR, ORDINAL, OFFSET, LayoutLeft, TestExecSpace) + +#include + +#undef KOKKOSKERNELS_EXECUTE_TEST + +#endif // KOKKOSKERNELS_INST_LAYOUTLEFT + #if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BCRS_TIMES_MVEC_TEST(kokkos_complex_float, int64_t, size_t, LayoutRight, - TestExecSpace) -#endif -#endif + +#define KOKKOSKERNELS_EXECUTE_TEST(SCALAR, ORDINAL, OFFSET, DEVICE) \ + EXECUTE_BCRS_TIMES_MVEC_TEST(SCALAR, ORDINAL, OFFSET, LayoutRight, TestExecSpace) + +#include + +#undef KOKKOSKERNELS_EXECUTE_TEST + +#endif // KOKKOSKERNELS_INST_LAYOUTRIGHT #undef EXECUTE_BCRS_TIMES_MVEC_TEST diff --git a/unit_test/sparse/Test_Sparse_spmv_bsr.hpp b/unit_test/sparse/Test_Sparse_spmv_bsr.hpp index 25b44b4e7e..73f5d103bd 100644 --- a/unit_test/sparse/Test_Sparse_spmv_bsr.hpp +++ b/unit_test/sparse/Test_Sparse_spmv_bsr.hpp @@ -609,228 +609,26 @@ void testBsrMatrix_SpM_MV() { testBsrMatrix_SpM_MV(); \ } -#if (defined(KOKKOSKERNELS_INST_DOUBLE) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) #if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(double, int, int, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(double, int, int, LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_DOUBLE) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(double, int64_t, int, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(double, int64_t, int, LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_DOUBLE) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(double, int, size_t, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(double, int, size_t, LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_DOUBLE) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(double, int64_t, size_t, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(double, int64_t, size_t, LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_FLOAT) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(float, int, int, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(float, int, int, LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_FLOAT) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(float, int64_t, int, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(float, int64_t, int, LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_FLOAT) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(float, int, size_t, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(float, int, size_t, LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_FLOAT) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(float, int64_t, size_t, LayoutLeft, TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(float, int64_t, size_t, LayoutRight, TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_DOUBLE_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_double, int, int, LayoutLeft, - TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_double, int, int, LayoutRight, - TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_DOUBLE_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_double, int64_t, int, LayoutLeft, - TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_double, int64_t, int, LayoutRight, - TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_DOUBLE_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_double, int, size_t, LayoutLeft, - TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_double, int, size_t, LayoutRight, - TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_DOUBLE_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_double, int64_t, size_t, LayoutLeft, - TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_double, int64_t, size_t, LayoutRight, - TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_FLOAT_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_float, int, int, LayoutLeft, - TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_float, int, int, LayoutRight, - TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_FLOAT_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_INT)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_float, int64_t, int, LayoutLeft, - TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_float, int64_t, int, LayoutRight, - TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_FLOAT_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_float, int, size_t, LayoutLeft, - TestExecSpace) -#endif -#if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_float, int, size_t, LayoutRight, - TestExecSpace) -#endif -#endif - -#if (defined(KOKKOSKERNELS_INST_KOKKOS_COMPLEX_FLOAT_) && \ - defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T) && \ - defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)) || \ - (!defined(KOKKOSKERNELS_ETI_ONLY) && \ - !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) -#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_float, int64_t, size_t, LayoutLeft, - TestExecSpace) -#endif + +#define KOKKOSKERNELS_EXECUTE_TEST(SCALAR, ORDINAL, OFFSET, DEVICE) \ + EXECUTE_BSR_TIMES_MVEC_TEST(SCALAR, ORDINAL, OFFSET, LayoutLeft, TestExecSpace) + +#include + +#undef KOKKOSKERNELS_EXECUTE_TEST + +#endif // KOKKOSKERNELS_INST_LAYOUTLEFT + #if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -EXECUTE_BSR_TIMES_MVEC_TEST(kokkos_complex_float, int64_t, size_t, LayoutRight, - TestExecSpace) -#endif -#endif + +#define KOKKOSKERNELS_EXECUTE_TEST(SCALAR, ORDINAL, OFFSET, DEVICE) \ + EXECUTE_BSR_TIMES_MVEC_TEST(SCALAR, ORDINAL, OFFSET, LayoutRight, TestExecSpace) + +#include + +#undef KOKKOSKERNELS_EXECUTE_TEST + +#endif // KOKKOSKERNELS_INST_LAYOUTRIGHT #undef EXECUTE_BSR_TIMES_MVEC_TEST From e4f146a85965b461d3b1a8efaa7539efd51d2bf7 Mon Sep 17 00:00:00 2001 From: James Foucar Date: Tue, 8 Mar 2022 10:09:01 -0700 Subject: [PATCH 2/2] clang formatting --- unit_test/sparse/Test_Sparse_spmv_blockcrs.hpp | 8 +++++--- unit_test/sparse/Test_Sparse_spmv_bsr.hpp | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/unit_test/sparse/Test_Sparse_spmv_blockcrs.hpp b/unit_test/sparse/Test_Sparse_spmv_blockcrs.hpp index f775e4890d..a96af6973e 100644 --- a/unit_test/sparse/Test_Sparse_spmv_blockcrs.hpp +++ b/unit_test/sparse/Test_Sparse_spmv_blockcrs.hpp @@ -503,7 +503,8 @@ void testBlockCrsMatrix_SpM_MV() { #if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) #define KOKKOSKERNELS_EXECUTE_TEST(SCALAR, ORDINAL, OFFSET, DEVICE) \ - EXECUTE_BCRS_TIMES_MVEC_TEST(SCALAR, ORDINAL, OFFSET, LayoutLeft, TestExecSpace) + EXECUTE_BCRS_TIMES_MVEC_TEST(SCALAR, ORDINAL, OFFSET, LayoutLeft, \ + TestExecSpace) #include @@ -513,8 +514,9 @@ void testBlockCrsMatrix_SpM_MV() { #if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) -#define KOKKOSKERNELS_EXECUTE_TEST(SCALAR, ORDINAL, OFFSET, DEVICE) \ - EXECUTE_BCRS_TIMES_MVEC_TEST(SCALAR, ORDINAL, OFFSET, LayoutRight, TestExecSpace) +#define KOKKOSKERNELS_EXECUTE_TEST(SCALAR, ORDINAL, OFFSET, DEVICE) \ + EXECUTE_BCRS_TIMES_MVEC_TEST(SCALAR, ORDINAL, OFFSET, LayoutRight, \ + TestExecSpace) #include diff --git a/unit_test/sparse/Test_Sparse_spmv_bsr.hpp b/unit_test/sparse/Test_Sparse_spmv_bsr.hpp index 73f5d103bd..344a203567 100644 --- a/unit_test/sparse/Test_Sparse_spmv_bsr.hpp +++ b/unit_test/sparse/Test_Sparse_spmv_bsr.hpp @@ -612,7 +612,8 @@ void testBsrMatrix_SpM_MV() { #if defined(KOKKOSKERNELS_INST_LAYOUTLEFT) #define KOKKOSKERNELS_EXECUTE_TEST(SCALAR, ORDINAL, OFFSET, DEVICE) \ - EXECUTE_BSR_TIMES_MVEC_TEST(SCALAR, ORDINAL, OFFSET, LayoutLeft, TestExecSpace) + EXECUTE_BSR_TIMES_MVEC_TEST(SCALAR, ORDINAL, OFFSET, LayoutLeft, \ + TestExecSpace) #include @@ -623,7 +624,8 @@ void testBsrMatrix_SpM_MV() { #if defined(KOKKOSKERNELS_INST_LAYOUTRIGHT) #define KOKKOSKERNELS_EXECUTE_TEST(SCALAR, ORDINAL, OFFSET, DEVICE) \ - EXECUTE_BSR_TIMES_MVEC_TEST(SCALAR, ORDINAL, OFFSET, LayoutRight, TestExecSpace) + EXECUTE_BSR_TIMES_MVEC_TEST(SCALAR, ORDINAL, OFFSET, LayoutRight, \ + TestExecSpace) #include