Skip to content

Commit

Permalink
Merge pull request #1356 from jgfouca/jgfouca/minor_test_cleanup
Browse files Browse the repository at this point in the history
A couple newer sparse tests were not following the new testing pattern
  • Loading branch information
lucbv authored Mar 18, 2022
2 parents ec6cf57 + e634bd5 commit 6bb3927
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 443 deletions.
243 changes: 21 additions & 222 deletions unit_test/sparse/Test_Sparse_spmv_blockcrs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,229 +500,28 @@ 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 <Test_Common_Test_All_Type_Combos.hpp>

#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 <Test_Common_Test_All_Type_Combos.hpp>

#undef KOKKOSKERNELS_EXECUTE_TEST

#endif // KOKKOSKERNELS_INST_LAYOUTRIGHT

#undef EXECUTE_BCRS_TIMES_MVEC_TEST
Loading

0 comments on commit 6bb3927

Please sign in to comment.