From 6e9543c33b1b7fac7a11a91895491387b7e448b2 Mon Sep 17 00:00:00 2001 From: Luc Berger-Vergiat Date: Wed, 13 Mar 2024 09:47:41 -0600 Subject: [PATCH] Kokkos Kernels: removing old code branches ahead of 4.3.00 release Some old code branches kept for compatibility with Kokkos Core versions less than 4.2.00 are dropped after release 4.3.00. The largest changes are the removal of support the Kokkos print macro in favor of Kokkos::printf() and the removal of half support from Kokkos Kernels since it is now in Kokkos Core. --- .../dense/impl/KokkosBatched_Axpy_Impl.hpp | 42 --- .../dense/impl/KokkosBatched_Copy_Impl.hpp | 50 --- .../dense/impl/KokkosBatched_Dot_Internal.hpp | 93 ------ .../dense/impl/KokkosBatched_Gesv_Impl.hpp | 75 ----- .../KokkosBatched_HadamardProduct_Impl.hpp | 48 --- .../dense/impl/KokkosBatched_Xpay_Impl.hpp | 42 --- .../impl/KokkosBatched_Spmv_Serial_Impl.hpp | 78 ----- .../KokkosBatched_Spmv_TeamVector_Impl.hpp | 78 ----- .../impl/KokkosBatched_Spmv_Team_Impl.hpp | 78 ----- .../sparse/src/KokkosBatched_JacobiPrec.hpp | 14 - blas/src/KokkosBlas1_nrm2.hpp | 7 - blas/unit_test/Test_Blas2_ger.hpp | 122 ------- blas/unit_test/Test_Blas2_syr.hpp | 98 ------ common/src/KokkosKernels_Error.hpp | 11 - common/src/KokkosKernels_Half.hpp | 65 ---- common/src/KokkosKernels_SimpleUtils.hpp | 8 - common/src/Kokkos_ArithTraits.hpp | 288 ----------------- common/unit_test/Test_Common_ArithTraits.hpp | 298 ------------------ common/unit_test/Test_Common_LowerBound.hpp | 12 - common/unit_test/Test_Common_UpperBound.hpp | 12 - ode/impl/KokkosODE_Newton_impl.hpp | 5 - sparse/src/KokkosSparse_spmv_team.hpp | 28 -- sparse/unit_test/Test_Sparse_spmv.hpp | 13 - test_common/KokkosKernels_TestUtils.hpp | 20 -- 24 files changed, 1585 deletions(-) delete mode 100644 common/src/KokkosKernels_Half.hpp diff --git a/batched/dense/impl/KokkosBatched_Axpy_Impl.hpp b/batched/dense/impl/KokkosBatched_Axpy_Impl.hpp index 400c46544d..da9d607241 100644 --- a/batched/dense/impl/KokkosBatched_Axpy_Impl.hpp +++ b/batched/dense/impl/KokkosBatched_Axpy_Impl.hpp @@ -199,31 +199,17 @@ KOKKOS_INLINE_FUNCTION int SerialAxpy::invoke(const alphaViewType& alpha, // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::axpy: Dimensions of X and Y do not match: X: %d x %d, " - "Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::axpy: Dimensions of X and Y do not match: X: %d x %d, " "Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != alpha.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::axpy: First dimension of X and alpha do not match: X: " - "%d x %d, alpha: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#else Kokkos::printf( "KokkosBatched::axpy: First dimension of X and alpha do not match: X: " "%d x %d, alpha: %d\n", (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#endif return 1; } #endif @@ -263,31 +249,17 @@ KOKKOS_INLINE_FUNCTION int TeamAxpy::invoke( // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::axpy: Dimensions of X and Y do not match: X: %d x %d, " - "Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::axpy: Dimensions of X and Y do not match: X: %d x %d, " "Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != alpha.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::axpy: First dimension of X and alpha do not match: X: " - "%d x %d, alpha: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#else Kokkos::printf( "KokkosBatched::axpy: First dimension of X and alpha do not match: X: " "%d x %d, alpha: %d\n", (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#endif return 1; } #endif @@ -332,31 +304,17 @@ KOKKOS_INLINE_FUNCTION int TeamVectorAxpy::invoke( // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::axpy: Dimensions of X and Y do not match: X: %d x %d, " - "Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::axpy: Dimensions of X and Y do not match: X: %d x %d, " "Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != alpha.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::axpy: First dimension of X and alpha do not match: X: " - "%d x %d, alpha: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#else Kokkos::printf( "KokkosBatched::axpy: First dimension of X and alpha do not match: X: " "%d x %d, alpha: %d\n", (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#endif return 1; } #endif diff --git a/batched/dense/impl/KokkosBatched_Copy_Impl.hpp b/batched/dense/impl/KokkosBatched_Copy_Impl.hpp index 5b693bb87a..0a8c9d456f 100644 --- a/batched/dense/impl/KokkosBatched_Copy_Impl.hpp +++ b/batched/dense/impl/KokkosBatched_Copy_Impl.hpp @@ -59,17 +59,10 @@ KOKKOS_INLINE_FUNCTION int SerialCopy::invoke( // Check compatibility of dimensions at run time. if (A.extent(0) != B.extent(0) || A.extent(1) != B.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::copy: Dimensions of A and B do not match: A: %d x %d, " - "B: %d x %d\n", - (int)A.extent(0), (int)A.extent(1), (int)B.extent(0), (int)B.extent(1)); -#else Kokkos::printf( "KokkosBatched::copy: Dimensions of A and B do not match: A: %d x %d, " "B: %d x %d\n", (int)A.extent(0), (int)A.extent(1), (int)B.extent(0), (int)B.extent(1)); -#endif return 1; } #endif @@ -94,17 +87,10 @@ KOKKOS_INLINE_FUNCTION int SerialCopy::invoke( // Check compatibility of dimensions at run time. if (A.extent(0) != B.extent(0) || A.extent(1) != B.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::copy: Dimensions of A and B do not match: A: %d x %d, " - "B: %d x %d\n", - (int)A.extent(0), (int)A.extent(1), (int)B.extent(0), (int)B.extent(1)); -#else Kokkos::printf( "KokkosBatched::copy: Dimensions of A and B do not match: A: %d x %d, " "B: %d x %d\n", (int)A.extent(0), (int)A.extent(1), (int)B.extent(0), (int)B.extent(1)); -#endif return 1; } #endif @@ -157,21 +143,12 @@ struct TeamCopy { // Check compatibility of dimensions at run time. if (A.extent(0) != B.extent(0) || A.extent(1) != B.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::copy: Dimensions of A and B do not match: A: %d x " - "%d, " - "B: %d x %d\n", - (int)A.extent(0), (int)A.extent(1), (int)B.extent(0), - (int)B.extent(1)); -#else Kokkos::printf( "KokkosBatched::copy: Dimensions of A and B do not match: A: %d x " "%d, " "B: %d x %d\n", (int)A.extent(0), (int)A.extent(1), (int)B.extent(0), (int)B.extent(1)); -#endif return 1; } #endif @@ -204,21 +181,12 @@ struct TeamCopy { // Check compatibility of dimensions at run time. if (A.extent(0) != B.extent(0) || A.extent(1) != B.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::copy: Dimensions of A and B do not match: A: %d x " - "%d, " - "B: %d x %d\n", - (int)A.extent(0), (int)A.extent(1), (int)B.extent(0), - (int)B.extent(1)); -#else Kokkos::printf( "KokkosBatched::copy: Dimensions of A and B do not match: A: %d x " "%d, " "B: %d x %d\n", (int)A.extent(0), (int)A.extent(1), (int)B.extent(0), (int)B.extent(1)); -#endif return 1; } #endif @@ -277,21 +245,12 @@ struct TeamVectorCopy { // Check compatibility of dimensions at run time. if (A.extent(0) != B.extent(0) || A.extent(1) != B.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::copy: Dimensions of A and B do not match: A: %d x " - "%d, " - "B: %d x %d\n", - (int)A.extent(0), (int)A.extent(1), (int)B.extent(0), - (int)B.extent(1)); -#else Kokkos::printf( "KokkosBatched::copy: Dimensions of A and B do not match: A: %d x " "%d, " "B: %d x %d\n", (int)A.extent(0), (int)A.extent(1), (int)B.extent(0), (int)B.extent(1)); -#endif return 1; } #endif @@ -324,21 +283,12 @@ struct TeamVectorCopy { // Check compatibility of dimensions at run time. if (A.extent(0) != B.extent(0) || A.extent(1) != B.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::copy: Dimensions of A and B do not match: A: %d x " - "%d, " - "B: %d x %d\n", - (int)A.extent(0), (int)A.extent(1), (int)B.extent(0), - (int)B.extent(1)); -#else Kokkos::printf( "KokkosBatched::copy: Dimensions of A and B do not match: A: %d x " "%d, " "B: %d x %d\n", (int)A.extent(0), (int)A.extent(1), (int)B.extent(0), (int)B.extent(1)); -#endif return 1; } #endif diff --git a/batched/dense/impl/KokkosBatched_Dot_Internal.hpp b/batched/dense/impl/KokkosBatched_Dot_Internal.hpp index 854069289e..a0960c621b 100644 --- a/batched/dense/impl/KokkosBatched_Dot_Internal.hpp +++ b/batched/dense/impl/KokkosBatched_Dot_Internal.hpp @@ -186,35 +186,19 @@ struct SerialDot { // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::dot: Dimensions of X and Y do not match: X: %d x %d, " - "Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), - (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::dot: Dimensions of X and Y do not match: X: %d x %d, " "Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(1) != dot.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::dot: Second dimension of X and alpha do not match: " - "X: " - "%d x %d, dot: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)dot.extent(0)); -#else Kokkos::printf( "KokkosBatched::dot: Second dimension of X and alpha do not match: " "X: " "%d x %d, dot: %d\n", (int)X.extent(0), (int)X.extent(1), (int)dot.extent(0)); -#endif return 1; } #endif @@ -248,33 +232,18 @@ struct SerialDot { // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::dot: Dimensions of X and Y do not match: X: %d x %d, " - "Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), - (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::dot: Dimensions of X and Y do not match: X: %d x %d, " "Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != dot.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::dot: First dimension of X and alpha do not match: X: " - "%d x %d, dot: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)dot.extent(0)); -#else Kokkos::printf( "KokkosBatched::dot: First dimension of X and alpha do not match: X: " "%d x %d, dot: %d\n", (int)X.extent(0), (int)X.extent(1), (int)dot.extent(0)); -#endif return 1; } #endif @@ -313,35 +282,19 @@ struct TeamDot { // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::dot: Dimensions of X and Y do not match: X: %d x %d, " - "Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), - (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::dot: Dimensions of X and Y do not match: X: %d x %d, " "Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(1) != dot.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::dot: Second dimension of X and alpha do not match: " - "X: " - "%d x %d, dot: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)dot.extent(0)); -#else Kokkos::printf( "KokkosBatched::dot: Second dimension of X and alpha do not match: " "X: " "%d x %d, dot: %d\n", (int)X.extent(0), (int)X.extent(1), (int)dot.extent(0)); -#endif return 1; } #endif @@ -384,33 +337,18 @@ struct TeamDot { // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::dot: Dimensions of X and Y do not match: X: %d x %d, " - "Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), - (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::dot: Dimensions of X and Y do not match: X: %d x %d, " "Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != dot.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::dot: First dimension of X and alpha do not match: X: " - "%d x %d, dot: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)dot.extent(0)); -#else Kokkos::printf( "KokkosBatched::dot: First dimension of X and alpha do not match: X: " "%d x %d, dot: %d\n", (int)X.extent(0), (int)X.extent(1), (int)dot.extent(0)); -#endif return 1; } #endif @@ -457,35 +395,19 @@ struct TeamVectorDot { // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::dot: Dimensions of X and Y do not match: X: %d x %d, " - "Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), - (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::dot: Dimensions of X and Y do not match: X: %d x %d, " "Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(1) != dot.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::dot: Second dimension of X and alpha do not match: " - "X: " - "%d x %d, dot: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)dot.extent(0)); -#else Kokkos::printf( "KokkosBatched::dot: Second dimension of X and alpha do not match: " "X: " "%d x %d, dot: %d\n", (int)X.extent(0), (int)X.extent(1), (int)dot.extent(0)); -#endif return 1; } #endif @@ -528,33 +450,18 @@ struct TeamVectorDot { // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::dot: Dimensions of X and Y do not match: X: %d x %d, " - "Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), - (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::dot: Dimensions of X and Y do not match: X: %d x %d, " "Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != dot.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::dot: First dimension of X and alpha do not match: X: " - "%d x %d, dot: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)dot.extent(0)); -#else Kokkos::printf( "KokkosBatched::dot: First dimension of X and alpha do not match: X: " "%d x %d, dot: %d\n", (int)X.extent(0), (int)X.extent(1), (int)dot.extent(0)); -#endif return 1; } #endif diff --git a/batched/dense/impl/KokkosBatched_Gesv_Impl.hpp b/batched/dense/impl/KokkosBatched_Gesv_Impl.hpp index e4e0d5b8b7..34319881df 100644 --- a/batched/dense/impl/KokkosBatched_Gesv_Impl.hpp +++ b/batched/dense/impl/KokkosBatched_Gesv_Impl.hpp @@ -384,39 +384,22 @@ struct SerialGesv { // Check compatibility of dimensions at run time. if (A.extent(0) != tmp.extent(0) || A.extent(1) + 4 != tmp.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::gesv: dimensions of A and tmp do not match: A: " - "%d x %d, tmp (note: its second dimension should be the second " - "dimension of A + 4): %d x %d\n", - (int)A.extent(0), (int)A.extent(1), (int)tmp.extent(0), - (int)tmp.extent(1)); -#else Kokkos::printf( "KokkosBatched::gesv: dimensions of A and tmp do not match: A: " "%d x %d, tmp (note: its second dimension should be the second " "dimension of A + 4): %d x %d\n", (int)A.extent(0), (int)A.extent(1), (int)tmp.extent(0), (int)tmp.extent(1)); -#endif return 1; } if (A.extent(0) != X.extent(0) || A.extent(1) != X.extent(0) || A.extent(0) != Y.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::gesv: dimensions of A and X and Y do not match: A: " - "%d x %d, X: %d, Y: %d\n", - (int)A.extent(0), (int)A.extent(1), (int)X.extent(0), - (int)Y.extent(0)); -#else Kokkos::printf( "KokkosBatched::gesv: dimensions of A and X and Y do not match: A: " "%d x %d, X: %d, Y: %d\n", (int)A.extent(0), (int)A.extent(1), (int)X.extent(0), (int)Y.extent(0)); -#endif return 1; } #endif @@ -431,15 +414,9 @@ struct SerialGesv { if (SerialStaticPivoting::invoke(A, PDAD, Y, PDY, D2, tmp_v_1, tmp_v_2) == 1) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::gesv: the currently implemented static pivoting " - "failed.\n"); -#else Kokkos::printf( "KokkosBatched::gesv: the currently implemented static pivoting " "failed.\n"); -#endif return 1; } @@ -481,19 +458,11 @@ struct SerialGesv { if (A.extent(0) != X.extent(0) || A.extent(1) != X.extent(0) || A.extent(0) != Y.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::gesv: dimensions of A and X and Y do not match: A: " - "%d x %d, X: %d, Y: %d\n", - (int)A.extent(0), (int)A.extent(1), (int)X.extent(0), - (int)Y.extent(0)); -#else Kokkos::printf( "KokkosBatched::gesv: dimensions of A and X and Y do not match: A: " "%d x %d, X: %d, Y: %d\n", (int)A.extent(0), (int)A.extent(1), (int)X.extent(0), (int)Y.extent(0)); -#endif return 1; } #endif @@ -540,19 +509,11 @@ struct TeamGesv { // Check compatibility of dimensions at run time. if (A.extent(0) != X.extent(0) || A.extent(1) != X.extent(0) || A.extent(0) != Y.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::gesv: dimensions of A and X and Y do not match: A: " - "%d x %d, X: %d, Y: %d\n", - (int)A.extent(0), (int)A.extent(1), (int)X.extent(0), - (int)Y.extent(0)); -#else Kokkos::printf( "KokkosBatched::gesv: dimensions of A and X and Y do not match: A: " "%d x %d, X: %d, Y: %d\n", (int)A.extent(0), (int)A.extent(1), (int)X.extent(0), (int)Y.extent(0)); -#endif return 1; } #endif @@ -571,15 +532,9 @@ struct TeamGesv { if (TeamStaticPivoting::invoke(member, A, PDAD, Y, PDY, D2, tmp_v_1, tmp_v_2) == 1) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::gesv: the currently implemented static pivoting " - "failed.\n"); -#else Kokkos::printf( "KokkosBatched::gesv: the currently implemented static pivoting " "failed.\n"); -#endif return 1; } member.team_barrier(); @@ -632,19 +587,11 @@ struct TeamGesv { // Check compatibility of dimensions at run time. if (A.extent(0) != X.extent(0) || A.extent(1) != X.extent(0) || A.extent(0) != Y.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::gesv: dimensions of A and X and Y do not match: A: " - "%d x %d, X: %d, Y: %d\n", - (int)A.extent(0), (int)A.extent(1), (int)X.extent(0), - (int)Y.extent(0)); -#else Kokkos::printf( "KokkosBatched::gesv: dimensions of A and X and Y do not match: A: " "%d x %d, X: %d, Y: %d\n", (int)A.extent(0), (int)A.extent(1), (int)X.extent(0), (int)Y.extent(0)); -#endif return 1; } #endif @@ -698,19 +645,11 @@ struct TeamVectorGesv { // Check compatibility of dimensions at run time. if (A.extent(0) != X.extent(0) || A.extent(1) != X.extent(0) || A.extent(0) != Y.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::gesv: dimensions of A and X and Y do not match: A: " - "%d x %d, X: %d, Y: %d\n", - (int)A.extent(0), (int)A.extent(1), (int)X.extent(0), - (int)Y.extent(0)); -#else Kokkos::printf( "KokkosBatched::gesv: dimensions of A and X and Y do not match: A: " "%d x %d, X: %d, Y: %d\n", (int)A.extent(0), (int)A.extent(1), (int)X.extent(0), (int)Y.extent(0)); -#endif return 1; } #endif @@ -729,15 +668,9 @@ struct TeamVectorGesv { if (TeamVectorStaticPivoting::invoke( member, A, PDAD, Y, PDY, D2, tmp_v_1, tmp_v_2) == 1) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::gesv: the currently implemented static pivoting " - "failed.\n"); -#else Kokkos::printf( "KokkosBatched::gesv: the currently implemented static pivoting " "failed.\n"); -#endif return 1; } @@ -791,19 +724,11 @@ struct TeamVectorGesv { // Check compatibility of dimensions at run time. if (A.extent(0) != X.extent(0) || A.extent(1) != X.extent(0) || A.extent(0) != Y.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::gesv: dimensions of A and X and Y do not match: A: " - "%d x %d, X: %d, Y: %d\n", - (int)A.extent(0), (int)A.extent(1), (int)X.extent(0), - (int)Y.extent(0)); -#else Kokkos::printf( "KokkosBatched::gesv: dimensions of A and X and Y do not match: A: " "%d x %d, X: %d, Y: %d\n", (int)A.extent(0), (int)A.extent(1), (int)X.extent(0), (int)Y.extent(0)); -#endif return 1; } #endif diff --git a/batched/dense/impl/KokkosBatched_HadamardProduct_Impl.hpp b/batched/dense/impl/KokkosBatched_HadamardProduct_Impl.hpp index 0570bc4ccc..90b89e4ad1 100644 --- a/batched/dense/impl/KokkosBatched_HadamardProduct_Impl.hpp +++ b/batched/dense/impl/KokkosBatched_HadamardProduct_Impl.hpp @@ -110,35 +110,19 @@ KOKKOS_INLINE_FUNCTION int SerialHadamardProduct::invoke(const XViewType& X, // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::HadamardProduct: Dimensions of X and Y do not match: " - "X: %d x %d, " - "Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::HadamardProduct: Dimensions of X and Y do not match: " "X: %d x %d, " "Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != V.extent(0) || X.extent(1) != V.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::HadamardProduct: Dimensions of X and V do not match: " - "X: %d x %d, " - "V: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)V.extent(0), (int)V.extent(1)); -#else Kokkos::printf( "KokkosBatched::HadamardProduct: Dimensions of X and V do not match: " "X: %d x %d, " "V: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)V.extent(0), (int)V.extent(1)); -#endif return 1; } #endif @@ -177,35 +161,19 @@ KOKKOS_INLINE_FUNCTION int TeamHadamardProduct::invoke( // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::HadamardProduct: Dimensions of X and Y do not match: " - "X: %d x %d, " - "Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::HadamardProduct: Dimensions of X and Y do not match: " "X: %d x %d, " "Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != V.extent(0) || X.extent(1) != V.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::HadamardProduct: Dimensions of X and V do not match: " - "X: %d x %d, " - "V: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)V.extent(0), (int)V.extent(1)); -#else Kokkos::printf( "KokkosBatched::HadamardProduct: Dimensions of X and V do not match: " "X: %d x %d, " "V: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)V.extent(0), (int)V.extent(1)); -#endif return 1; } #endif @@ -246,35 +214,19 @@ KOKKOS_INLINE_FUNCTION int TeamVectorHadamardProduct::invoke( // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::HadamardProduct: Dimensions of X and Y do not match: " - "X: %d x %d, " - "Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::HadamardProduct: Dimensions of X and Y do not match: " "X: %d x %d, " "Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != V.extent(0) || X.extent(1) != V.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::HadamardProduct: Dimensions of X and V do not match: " - "X: %d x %d, " - "V: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)V.extent(0), (int)V.extent(1)); -#else Kokkos::printf( "KokkosBatched::HadamardProduct: Dimensions of X and V do not match: " "X: %d x %d, " "V: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)V.extent(0), (int)V.extent(1)); -#endif return 1; } #endif diff --git a/batched/dense/impl/KokkosBatched_Xpay_Impl.hpp b/batched/dense/impl/KokkosBatched_Xpay_Impl.hpp index 5e5b7e13cc..52e1425041 100644 --- a/batched/dense/impl/KokkosBatched_Xpay_Impl.hpp +++ b/batched/dense/impl/KokkosBatched_Xpay_Impl.hpp @@ -204,31 +204,17 @@ KOKKOS_INLINE_FUNCTION int SerialXpay::invoke(const alphaViewType& alpha, // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::xpay: Dimensions of X and Y do not match: X: %d x %d, " - "Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::xpay: Dimensions of X and Y do not match: X: %d x %d, " "Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != alpha.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::xpay: First dimension of X and alpha do not match: X: " - "%d x %d, alpha: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#else Kokkos::printf( "KokkosBatched::xpay: First dimension of X and alpha do not match: X: " "%d x %d, alpha: %d\n", (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#endif return 1; } #endif @@ -261,31 +247,17 @@ KOKKOS_INLINE_FUNCTION int TeamXpay::invoke( // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::xpay: Dimensions of X and Y do not match: X: %d x %d, " - "Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::xpay: Dimensions of X and Y do not match: X: %d x %d, " "Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != alpha.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::xpay: First dimension of X and alpha do not match: X: " - "%d x %d, alpha: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#else Kokkos::printf( "KokkosBatched::xpay: First dimension of X and alpha do not match: X: " "%d x %d, alpha: %d\n", (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#endif return 1; } #endif @@ -319,31 +291,17 @@ KOKKOS_INLINE_FUNCTION int TeamVectorXpay::invoke( // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::xpay: Dimensions of X and Y do not match: X: %d x %d, " - "Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::xpay: Dimensions of X and Y do not match: X: %d x %d, " "Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != alpha.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::xpay: First dimension of X and alpha do not match: X: " - "%d x %d, alpha: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#else Kokkos::printf( "KokkosBatched::xpay: First dimension of X and alpha do not match: X: " "%d x %d, alpha: %d\n", (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#endif return 1; } #endif diff --git a/batched/sparse/impl/KokkosBatched_Spmv_Serial_Impl.hpp b/batched/sparse/impl/KokkosBatched_Spmv_Serial_Impl.hpp index b96dc79a80..0f1e5feb39 100644 --- a/batched/sparse/impl/KokkosBatched_Spmv_Serial_Impl.hpp +++ b/batched/sparse/impl/KokkosBatched_Spmv_Serial_Impl.hpp @@ -153,95 +153,49 @@ struct SerialSpmv { // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimensions of X and Y do not match: X: %d x " - "%d, Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), - (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimensions of X and Y do not match: X: %d x " "%d, Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != alpha.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: First dimension of X and alpha do not match: " - "X: %d x %d, alpha: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#else Kokkos::printf( "KokkosBatched::spmv: First dimension of X and alpha do not match: " "X: %d x %d, alpha: %d\n", (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#endif return 1; } if (X.extent(0) != beta.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: First dimension of X and beta do not match: X: " - "%d x %d, beta: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)beta.extent(0)); -#else Kokkos::printf( "KokkosBatched::spmv: First dimension of X and beta do not match: X: " "%d x %d, beta: %d\n", (int)X.extent(0), (int)X.extent(1), (int)beta.extent(0)); -#endif return 1; } if (X.extent(0) != values.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: First dimension of X and the first dimension " - "of values do not match: X: %d x %d, values: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)values.extent(0), - (int)values.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: First dimension of X and the first dimension " "of values do not match: X: %d x %d, values: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)values.extent(0), (int)values.extent(1)); -#endif return 1; } if (colIndices.extent(0) != values.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimension of colIndices and the second " - "dimension of values do not match: colIndices: %d , values: %d x " - "%d\n", - (int)colIndices.extent(0), (int)values.extent(0), - (int)values.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimension of colIndices and the second " "dimension of values do not match: colIndices: %d , values: %d x " "%d\n", (int)colIndices.extent(0), (int)values.extent(0), (int)values.extent(1)); -#endif return 1; } if (row_ptr.extent(0) - 1 != X.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimension of row_ptr and the second dimension " - "of X do not match: colIndices (-1): %d , values: %d x %d\n", - (int)row_ptr.extent(0) - 1, (int)X.extent(0), (int)X.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimension of row_ptr and the second dimension " "of X do not match: colIndices (-1): %d , values: %d x %d\n", (int)row_ptr.extent(0) - 1, (int)X.extent(0), (int)X.extent(1)); -#endif return 1; } #endif @@ -289,67 +243,35 @@ struct SerialSpmv { // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimensions of X and Y do not match: X: %d x " - "%d, Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), - (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimensions of X and Y do not match: X: %d x " "%d, Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != values.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: First dimension of X and the first dimension " - "of values do not match: X: %d x %d, values: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)values.extent(0), - (int)values.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: First dimension of X and the first dimension " "of values do not match: X: %d x %d, values: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)values.extent(0), (int)values.extent(1)); -#endif return 1; } if (colIndices.extent(0) != values.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimension of colIndices and the second " - "dimension of values do not match: colIndices: %d , values: %d x " - "%d\n", - (int)colIndices.extent(0), (int)values.extent(0), - (int)values.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimension of colIndices and the second " "dimension of values do not match: colIndices: %d , values: %d x " "%d\n", (int)colIndices.extent(0), (int)values.extent(0), (int)values.extent(1)); -#endif return 1; } if (row_ptr.extent(0) - 1 != X.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimension of row_ptr and the second dimension " - "of X do not match: colIndices (-1): %d , values: %d x %d\n", - (int)row_ptr.extent(0) - 1, (int)X.extent(0), (int)X.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimension of row_ptr and the second dimension " "of X do not match: colIndices (-1): %d , values: %d x %d\n", (int)row_ptr.extent(0) - 1, (int)X.extent(0), (int)X.extent(1)); -#endif return 1; } #endif diff --git a/batched/sparse/impl/KokkosBatched_Spmv_TeamVector_Impl.hpp b/batched/sparse/impl/KokkosBatched_Spmv_TeamVector_Impl.hpp index d7379777be..dd510b2d0e 100644 --- a/batched/sparse/impl/KokkosBatched_Spmv_TeamVector_Impl.hpp +++ b/batched/sparse/impl/KokkosBatched_Spmv_TeamVector_Impl.hpp @@ -341,95 +341,49 @@ struct TeamVectorSpmv { // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimensions of X and Y do not match: X: %d x " - "%d, Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), - (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimensions of X and Y do not match: X: %d x " "%d, Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != alpha.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: First dimension of X and alpha do not match: " - "X: %d x %d, alpha: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#else Kokkos::printf( "KokkosBatched::spmv: First dimension of X and alpha do not match: " "X: %d x %d, alpha: %d\n", (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#endif return 1; } if (X.extent(0) != beta.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: First dimension of X and beta do not match: X: " - "%d x %d, beta: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)beta.extent(0)); -#else Kokkos::printf( "KokkosBatched::spmv: First dimension of X and beta do not match: X: " "%d x %d, beta: %d\n", (int)X.extent(0), (int)X.extent(1), (int)beta.extent(0)); -#endif return 1; } if (X.extent(0) != values.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: First dimension of X and the first dimension " - "of values do not match: X: %d x %d, values: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)values.extent(0), - (int)values.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: First dimension of X and the first dimension " "of values do not match: X: %d x %d, values: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)values.extent(0), (int)values.extent(1)); -#endif return 1; } if (colIndices.extent(0) != values.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimension of colIndices and the second " - "dimension of values do not match: colIndices: %d , values: %d x " - "%d\n", - (int)colIndices.extent(0), (int)values.extent(0), - (int)values.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimension of colIndices and the second " "dimension of values do not match: colIndices: %d , values: %d x " "%d\n", (int)colIndices.extent(0), (int)values.extent(0), (int)values.extent(1)); -#endif return 1; } if (row_ptr.extent(0) - 1 != X.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimension of row_ptr and the second dimension " - "of X do not match: colIndices (-1): %d , values: %d x %d\n", - (int)row_ptr.extent(0) - 1, (int)X.extent(0), (int)X.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimension of row_ptr and the second dimension " "of X do not match: colIndices (-1): %d , values: %d x %d\n", (int)row_ptr.extent(0) - 1, (int)X.extent(0), (int)X.extent(1)); -#endif return 1; } #endif @@ -484,67 +438,35 @@ struct TeamVectorSpmv { // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimensions of X and Y do not match: X: %d x " - "%d, Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), - (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimensions of X and Y do not match: X: %d x " "%d, Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != values.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: First dimension of X and the first dimension " - "of values do not match: X: %d x %d, values: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)values.extent(0), - (int)values.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: First dimension of X and the first dimension " "of values do not match: X: %d x %d, values: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)values.extent(0), (int)values.extent(1)); -#endif return 1; } if (colIndices.extent(0) != values.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimension of colIndices and the second " - "dimension of values do not match: colIndices: %d , values: %d x " - "%d\n", - (int)colIndices.extent(0), (int)values.extent(0), - (int)values.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimension of colIndices and the second " "dimension of values do not match: colIndices: %d , values: %d x " "%d\n", (int)colIndices.extent(0), (int)values.extent(0), (int)values.extent(1)); -#endif return 1; } if (row_ptr.extent(0) - 1 != X.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimension of row_ptr and the second dimension " - "of X do not match: colIndices (-1): %d , values: %d x %d\n", - (int)row_ptr.extent(0) - 1, (int)X.extent(0), (int)X.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimension of row_ptr and the second dimension " "of X do not match: colIndices (-1): %d , values: %d x %d\n", (int)row_ptr.extent(0) - 1, (int)X.extent(0), (int)X.extent(1)); -#endif return 1; } #endif diff --git a/batched/sparse/impl/KokkosBatched_Spmv_Team_Impl.hpp b/batched/sparse/impl/KokkosBatched_Spmv_Team_Impl.hpp index beb53521f0..41128744a3 100644 --- a/batched/sparse/impl/KokkosBatched_Spmv_Team_Impl.hpp +++ b/batched/sparse/impl/KokkosBatched_Spmv_Team_Impl.hpp @@ -192,95 +192,49 @@ struct TeamSpmv { // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimensions of X and Y do not match: X: %d x " - "%d, Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), - (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimensions of X and Y do not match: X: %d x " "%d, Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != alpha.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: First dimension of X and alpha do not match: " - "X: %d x %d, alpha: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#else Kokkos::printf( "KokkosBatched::spmv: First dimension of X and alpha do not match: " "X: %d x %d, alpha: %d\n", (int)X.extent(0), (int)X.extent(1), (int)alpha.extent(0)); -#endif return 1; } if (X.extent(0) != beta.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: First dimension of X and beta do not match: X: " - "%d x %d, beta: %d\n", - (int)X.extent(0), (int)X.extent(1), (int)beta.extent(0)); -#else Kokkos::printf( "KokkosBatched::spmv: First dimension of X and beta do not match: X: " "%d x %d, beta: %d\n", (int)X.extent(0), (int)X.extent(1), (int)beta.extent(0)); -#endif return 1; } if (X.extent(0) != values.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: First dimension of X and the first dimension " - "of values do not match: X: %d x %d, values: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)values.extent(0), - (int)values.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: First dimension of X and the first dimension " "of values do not match: X: %d x %d, values: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)values.extent(0), (int)values.extent(1)); -#endif return 1; } if (colIndices.extent(0) != values.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimension of colIndices and the second " - "dimension of values do not match: colIndices: %d , values: %d x " - "%d\n", - (int)colIndices.extent(0), (int)values.extent(0), - (int)values.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimension of colIndices and the second " "dimension of values do not match: colIndices: %d , values: %d x " "%d\n", (int)colIndices.extent(0), (int)values.extent(0), (int)values.extent(1)); -#endif return 1; } if (row_ptr.extent(0) - 1 != X.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimension of row_ptr and the second dimension " - "of X do not match: colIndices (-1): %d , values: %d x %d\n", - (int)row_ptr.extent(0) - 1, (int)X.extent(0), (int)X.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimension of row_ptr and the second dimension " "of X do not match: colIndices (-1): %d , values: %d x %d\n", (int)row_ptr.extent(0) - 1, (int)X.extent(0), (int)X.extent(1)); -#endif return 1; } #endif @@ -335,67 +289,35 @@ struct TeamSpmv { // Check compatibility of dimensions at run time. if (X.extent(0) != Y.extent(0) || X.extent(1) != Y.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimensions of X and Y do not match: X: %d x " - "%d, Y: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), - (int)Y.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimensions of X and Y do not match: X: %d x " "%d, Y: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)Y.extent(0), (int)Y.extent(1)); -#endif return 1; } if (X.extent(0) != values.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: First dimension of X and the first dimension " - "of values do not match: X: %d x %d, values: %d x %d\n", - (int)X.extent(0), (int)X.extent(1), (int)values.extent(0), - (int)values.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: First dimension of X and the first dimension " "of values do not match: X: %d x %d, values: %d x %d\n", (int)X.extent(0), (int)X.extent(1), (int)values.extent(0), (int)values.extent(1)); -#endif return 1; } if (colIndices.extent(0) != values.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimension of colIndices and the second " - "dimension of values do not match: colIndices: %d , values: %d x " - "%d\n", - (int)colIndices.extent(0), (int)values.extent(0), - (int)values.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimension of colIndices and the second " "dimension of values do not match: colIndices: %d , values: %d x " "%d\n", (int)colIndices.extent(0), (int)values.extent(0), (int)values.extent(1)); -#endif return 1; } if (row_ptr.extent(0) - 1 != X.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::spmv: Dimension of row_ptr and the second dimension " - "of X do not match: colIndices (-1): %d , values: %d x %d\n", - (int)row_ptr.extent(0) - 1, (int)X.extent(0), (int)X.extent(1)); -#else Kokkos::printf( "KokkosBatched::spmv: Dimension of row_ptr and the second dimension " "of X do not match: colIndices (-1): %d , values: %d x %d\n", (int)row_ptr.extent(0) - 1, (int)X.extent(0), (int)X.extent(1)); -#endif return 1; } #endif diff --git a/batched/sparse/src/KokkosBatched_JacobiPrec.hpp b/batched/sparse/src/KokkosBatched_JacobiPrec.hpp index 44a982525d..eacb859636 100644 --- a/batched/sparse/src/KokkosBatched_JacobiPrec.hpp +++ b/batched/sparse/src/KokkosBatched_JacobiPrec.hpp @@ -109,17 +109,10 @@ class JacobiPrec { } if (tooSmall > 0) -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::JacobiPrec: %d entrie(s) has/have a too small " - "magnitude and have been replaced by one, \n", - (int)tooSmall); -#else Kokkos::printf( "KokkosBatched::JacobiPrec: %d entrie(s) has/have a too small " "magnitude and have been replaced by one, \n", (int)tooSmall); -#endif computed_inverse = true; } @@ -138,17 +131,10 @@ class JacobiPrec { } if (tooSmall > 0) -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBatched::JacobiPrec: %d entrie(s) has/have a too small " - "magnitude and have been replaced by one, \n", - (int)tooSmall); -#else Kokkos::printf( "KokkosBatched::JacobiPrec: %d entrie(s) has/have a too small " "magnitude and have been replaced by one, \n", (int)tooSmall); -#endif computed_inverse = true; } diff --git a/blas/src/KokkosBlas1_nrm2.hpp b/blas/src/KokkosBlas1_nrm2.hpp index 64643367a0..59f105f5a4 100644 --- a/blas/src/KokkosBlas1_nrm2.hpp +++ b/blas/src/KokkosBlas1_nrm2.hpp @@ -241,17 +241,10 @@ KOKKOS_INLINE_FUNCTION int serial_nrm2(const XMV X, const RV& R) { " Kokkos::ArithTraits::mag_type"); if (R.extent(0) != X.extent(1)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosBlas::serial_nrm2 (MV): Dimensions of R and X do not match," - " R: %d and X: %d x %d.\n", - R.extent_int(0), X.extent_int(0), X.extent_int(1)); -#else Kokkos::printf( "KokkosBlas::serial_nrm2 (MV): Dimensions of R and X do not match," " R: %d and X: %d x %d.\n", R.extent_int(0), X.extent_int(0), X.extent_int(1)); -#endif return 1; } #endif // KOKKOSKERNELS_DEBUG_LEVEL diff --git a/blas/unit_test/Test_Blas2_ger.hpp b/blas/unit_test/Test_Blas2_ger.hpp index df3d2cb5d1..9a8f740569 100644 --- a/blas/unit_test/Test_Blas2_ger.hpp +++ b/blas/unit_test/Test_Blas2_ger.hpp @@ -295,15 +295,9 @@ void GerTester h_vanilla( "vanilla = A + alpha * x * y^{t,h}", _M, _N); #ifdef HAVE_KOKKOSKERNELS_DEBUG -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "In Test_Blas2_ger.hpp, computing vanilla A with alpha type = %s\n", - typeid(alpha).name()); -#else Kokkos::printf( "In Test_Blas2_ger.hpp, computing vanilla A with alpha type = %s\n", typeid(alpha).name()); -#endif #endif this->populateVanillaValues(alpha, x.h_view, y.h_view, A.h_view, h_vanilla.d_view); @@ -1364,17 +1358,10 @@ void GerTester& A, const _ViewTypeExpected& h_expected, const std::string& situation) { #ifdef HAVE_KOKKOSKERNELS_DEBUG -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "In Test_Blas2_ger.hpp, right before calling KokkosBlas::ger(): " - "ViewTypeA = %s, _kkGerShouldThrowException=%d\n", - typeid(_ViewTypeA).name(), _kkGerShouldThrowException); -#else Kokkos::printf( "In Test_Blas2_ger.hpp, right before calling KokkosBlas::ger(): " "ViewTypeA = %s, _kkGerShouldThrowException=%d\n", typeid(_ViewTypeA).name(), _kkGerShouldThrowException); -#endif #endif std::string mode = _useHermitianOption ? "H" : "T"; bool gotStdException(false); @@ -1416,22 +1403,11 @@ void GerTester #ifdef HAVE_KOKKOSKERNELS_DEBUG int test_ger(const std::string& caseName) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "+=======================================================================" - "===\n"); -#else Kokkos::printf( "+=======================================================================" "===\n"); -#endif -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("Starting %s, device = %s ...\n", - caseName.c_str(), typeid(Device).name()); -#else Kokkos::printf("Starting %s, device = %s ...\n", caseName.c_str(), typeid(Device).name()); -#endif #else int test_ger(const std::string& /*caseName*/) { #endif @@ -1453,21 +1429,10 @@ int test_ger(const std::string& /*caseName*/) { (!defined(KOKKOSKERNELS_ETI_ONLY) && \ !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) #ifdef HAVE_KOKKOSKERNELS_DEBUG -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "+-----------------------------------------------------------------------" - "---\n"); -#else Kokkos::printf( "+-----------------------------------------------------------------------" "---\n"); -#endif -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("Starting %s for LAYOUTLEFT ...\n", - caseName.c_str()); -#else Kokkos::printf("Starting %s for LAYOUTLEFT ...\n", caseName.c_str()); -#endif #endif if (true) { Test::GerTester::test( view_stride_adapter<_ViewTypeExpected, true> h_vanilla( "vanilla = A + alpha * x * x^{t,h}", _M, _N); #ifdef HAVE_KOKKOSKERNELS_DEBUG -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "In Test_Blas2_syr.hpp, computing vanilla A with alpha type = %s\n", - typeid(alpha).name()); -#else Kokkos::printf( "In Test_Blas2_syr.hpp, computing vanilla A with alpha type = %s\n", typeid(alpha).name()); -#endif #endif this->populateVanillaValues(alpha, x.h_view, A.h_view, h_vanilla.d_view); @@ -1441,17 +1435,10 @@ void SyrTester:: #ifdef HAVE_KOKKOSKERNELS_DEBUG std::cout << "In Test_Blas2_syr, '" << situation << "', alpha = " << alpha << std::endl; -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "In Test_Blas2_syr.hpp, right before calling KokkosBlas::syr(): " - "ViewTypeA = %s, _kkSyrShouldThrowException=%d\n", - typeid(_ViewTypeA).name(), _kkSyrShouldThrowException); -#else Kokkos::printf( "In Test_Blas2_syr.hpp, right before calling KokkosBlas::syr(): " "ViewTypeA = %s, _kkSyrShouldThrowException=%d\n", typeid(_ViewTypeA).name(), _kkSyrShouldThrowException); -#endif #endif std::string mode = _useHermitianOption ? "H" : "T"; std::string uplo = _useUpOption ? "U" : "L"; @@ -1505,17 +1492,10 @@ void SyrTester:: #ifdef HAVE_KOKKOSKERNELS_DEBUG std::cout << "In Test_Blas2_syr, '" << situation << "', alpha = " << alpha << std::endl; -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "In Test_Blas2_syr.hpp, right before calling KokkosBlas::ger(): " - "ViewTypeA = %s, _kkGerShouldThrowException=%d\n", - typeid(_ViewTypeA).name(), _kkGerShouldThrowException); -#else Kokkos::printf( "In Test_Blas2_syr.hpp, right before calling KokkosBlas::ger(): " "ViewTypeA = %s, _kkGerShouldThrowException=%d\n", typeid(_ViewTypeA).name(), _kkGerShouldThrowException); -#endif #endif std::string mode = _useHermitianOption ? "H" : "T"; bool gotStdException(false); @@ -1582,17 +1562,10 @@ void SyrTester:: template #ifdef HAVE_KOKKOSKERNELS_DEBUG int test_syr(const std::string& caseName) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "+=======================================================================" - "===\n"); - KOKKOS_IMPL_DO_NOT_USE_PRINTF("Starting %s ...\n", caseName.c_str()); -#else Kokkos::printf( "+=======================================================================" "===\n"); Kokkos::printf("Starting %s ...\n", caseName.c_str()); -#endif #else int test_syr(const std::string& /*caseName*/) { #endif @@ -1610,18 +1583,10 @@ int test_syr(const std::string& /*caseName*/) { (!defined(KOKKOSKERNELS_ETI_ONLY) && \ !defined(KOKKOSKERNELS_IMPL_CHECK_ETI_CALLS)) #ifdef HAVE_KOKKOSKERNELS_DEBUG -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "+-----------------------------------------------------------------------" - "---\n"); - KOKKOS_IMPL_DO_NOT_USE_PRINTF("Starting %s for LAYOUTLEFT ...\n", - caseName.c_str()); -#else Kokkos::printf( "+-----------------------------------------------------------------------" "---\n"); Kokkos::printf("Starting %s for LAYOUTLEFT ...\n", caseName.c_str()); -#endif #endif if (true) { Test::SyrTester mag_type(eps)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "Values at index %d, %.6f + %.6fi and %.6f + %.6fi, differ too much " - "(eps = %e)\n", - (int)i, KAT::real(view1(i)), KAT::imag(view1(i)), KAT::real(view2(i)), - KAT::imag(view2(i)), eps); -#else Kokkos::printf( "Values at index %d, %.6f + %.6fi and %.6f + %.6fi, differ too much " "(eps = %e)\n", (int)i, KAT::real(view1(i)), KAT::imag(view1(i)), KAT::real(view2(i)), KAT::imag(view2(i)), eps); -#endif num_diffs++; } } diff --git a/common/src/Kokkos_ArithTraits.hpp b/common/src/Kokkos_ArithTraits.hpp index 75c0951e10..415189be93 100644 --- a/common/src/Kokkos_ArithTraits.hpp +++ b/common/src/Kokkos_ArithTraits.hpp @@ -25,9 +25,6 @@ #include #include #include -#if KOKKOS_VERSION < 40199 -#include -#endif #include @@ -1003,109 +1000,6 @@ class ArithTraits { static constexpr bool is_complex = false; static constexpr bool has_infinity = true; -#if KOKKOS_VERSION < 40199 - static KOKKOS_FUNCTION val_type infinity() { - return Kokkos::Experimental::cast_to_half( - Kokkos::Experimental::infinity::value); - } - - static KOKKOS_FUNCTION bool isInf(const val_type x) { -#ifndef __CUDA_ARCH__ - using std::isinf; -#endif - return isinf(Kokkos::Experimental::cast_from_half(x)); - } - static KOKKOS_FUNCTION bool isNan(const val_type x) { -#ifndef __CUDA_ARCH__ - using std::isnan; -#endif - return isnan(Kokkos::Experimental::cast_from_half(x)); - } - static KOKKOS_FUNCTION mag_type abs(const val_type x) { - return Kokkos::Experimental::cast_to_half( - Kokkos::abs(Kokkos::Experimental::cast_from_half(x))); - } - static KOKKOS_FUNCTION val_type zero() { - return Kokkos::Experimental::cast_to_half(0.0); - } - static KOKKOS_FUNCTION val_type one() { - return Kokkos::Experimental::cast_to_half(1.0); - } - static KOKKOS_FUNCTION val_type min() { - return Kokkos::Experimental::cast_to_half(-KOKKOSKERNELS_IMPL_FP16_MAX); - } - static KOKKOS_FUNCTION val_type max() { - return Kokkos::Experimental::cast_to_half(KOKKOSKERNELS_IMPL_FP16_MAX); - } - static KOKKOS_FUNCTION mag_type real(const val_type x) { return x; } - static KOKKOS_FUNCTION mag_type imag(const val_type) { return zero(); } - static KOKKOS_FUNCTION val_type conj(const val_type x) { return x; } - static KOKKOS_FUNCTION val_type pow(const val_type x, const val_type y) { - return Kokkos::Experimental::cast_to_half( - Kokkos::pow(Kokkos::Experimental::cast_from_half(x), - Kokkos::Experimental::cast_from_half(y))); - } - static KOKKOS_FUNCTION val_type sqrt(const val_type x) { - return Kokkos::Experimental::cast_to_half( - Kokkos::sqrt(Kokkos::Experimental::cast_from_half(x))); - } - static KOKKOS_FUNCTION val_type cbrt(const val_type x) { - return Kokkos::Experimental::cast_to_half( - Kokkos::cbrt(Kokkos::Experimental::cast_from_half(x))); - } - static KOKKOS_FUNCTION val_type exp(const val_type x) { - return Kokkos::Experimental::cast_to_half( - Kokkos::exp(Kokkos::Experimental::cast_from_half(x))); - } - static KOKKOS_FUNCTION val_type log(const val_type x) { - return Kokkos::Experimental::cast_to_half( - Kokkos::log(Kokkos::Experimental::cast_from_half(x))); - } - static KOKKOS_FUNCTION val_type log10(const val_type x) { - return Kokkos::Experimental::cast_to_half( - Kokkos::log10(Kokkos::Experimental::cast_from_half(x))); - } - static KOKKOS_FUNCTION val_type sin(const val_type x) { - return Kokkos::Experimental::cast_to_half( - Kokkos::sin(Kokkos::Experimental::cast_from_half(x))); - } - static KOKKOS_FUNCTION val_type cos(const val_type x) { - return Kokkos::Experimental::cast_to_half( - Kokkos::cos(Kokkos::Experimental::cast_from_half(x))); - } - static KOKKOS_FUNCTION val_type tan(const val_type x) { - return Kokkos::Experimental::cast_to_half( - Kokkos::tan(Kokkos::Experimental::cast_from_half(x))); - } - static KOKKOS_FUNCTION val_type sinh(const val_type x) { - return Kokkos::Experimental::cast_to_half( - Kokkos::sinh(Kokkos::Experimental::cast_from_half(x))); - } - static KOKKOS_FUNCTION val_type cosh(const val_type x) { - return Kokkos::Experimental::cast_to_half( - Kokkos::cosh(Kokkos::Experimental::cast_from_half(x))); - } - static KOKKOS_FUNCTION val_type tanh(const val_type x) { - return Kokkos::Experimental::cast_to_half( - Kokkos::tanh(Kokkos::Experimental::cast_from_half(x))); - } - static KOKKOS_FUNCTION val_type asin(const val_type x) { - return Kokkos::Experimental::cast_to_half( - Kokkos::asin(Kokkos::Experimental::cast_from_half(x))); - } - static KOKKOS_FUNCTION val_type acos(const val_type x) { - return Kokkos::Experimental::cast_to_half( - Kokkos::acos(Kokkos::Experimental::cast_from_half(x))); - } - static KOKKOS_FUNCTION val_type atan(const val_type x) { - return Kokkos::Experimental::cast_to_half( - Kokkos::atan(Kokkos::Experimental::cast_from_half(x))); - } - static KOKKOS_FUNCTION mag_type epsilon() { - return Kokkos::Experimental::cast_to_half(KOKKOSKERNELS_IMPL_FP16_EPSILON); - } -#endif - // Backwards compatibility with Teuchos::ScalarTraits. using magnitudeType = mag_type; using halfPrecision = Kokkos::Experimental::half_t; @@ -1118,52 +1012,11 @@ class ArithTraits { static constexpr bool isComparable = true; static constexpr bool hasMachineParameters = true; -#if KOKKOS_VERSION < 40199 - static KOKKOS_FUNCTION bool isnaninf(const val_type x) { - return isNan(x) || isInf(x); - } - static KOKKOS_FUNCTION magnitudeType magnitude(const val_type x) { - return abs(x); - } - static KOKKOS_FUNCTION val_type conjugate(const val_type x) { - return conj(x); - } - static KOKKOS_FUNCTION val_type squareroot(const val_type x) { - return sqrt(x); - } - static KOKKOS_FUNCTION val_type nan() { - return Kokkos::Experimental::cast_to_half( - Kokkos::Experimental::quiet_NaN::value); - } - static KOKKOS_FUNCTION mag_type eps() { return epsilon(); } - static KOKKOS_FUNCTION mag_type sfmin() { - return Kokkos::Experimental::cast_to_half(KOKKOSKERNELS_IMPL_FP16_MIN); - } - static KOKKOS_FUNCTION int base() { return KOKKOSKERNELS_IMPL_FP16_RADIX; } - // Use float to allow running on both host and device - static KOKKOS_FUNCTION float prec() { - float e = KOKKOSKERNELS_IMPL_FP16_EPSILON; - float b = (float)base(); - float r = e * b; - return r; - } - static KOKKOS_FUNCTION int t() { return KOKKOSKERNELS_IMPL_FP16_MANT_DIG; } - static KOKKOS_FUNCTION mag_type rnd() { return one(); } - static KOKKOS_FUNCTION int emin() { return KOKKOSKERNELS_IMPL_FP16_MIN_EXP; } - static KOKKOS_FUNCTION mag_type rmin() { - return Kokkos::Experimental::cast_to_half(KOKKOSKERNELS_IMPL_FP16_MIN); - } - static KOKKOS_FUNCTION int emax() { return KOKKOSKERNELS_IMPL_FP16_MAX_EXP; } - static KOKKOS_FUNCTION mag_type rmax() { - return Kokkos::Experimental::cast_to_half(KOKKOSKERNELS_IMPL_FP16_MAX); - } -#else #if defined(KOKKOS_ENABLE_SYCL) || defined(KOKKOS_ENABLE_HIP) KOKKOSKERNELS_ARITHTRAITS_HALF_FP(KOKKOS_FUNCTION) #else KOKKOSKERNELS_ARITHTRAITS_REAL_FP(KOKKOS_FUNCTION) #endif -#endif }; #endif // #if defined(KOKKOS_HALF_T_IS_FLOAT) && !KOKKOS_HALF_T_IS_FLOAT @@ -1183,106 +1036,6 @@ class ArithTraits { static constexpr bool is_complex = false; static constexpr bool has_infinity = true; -#if KOKKOS_VERSION < 40199 - static KOKKOS_FUNCTION val_type infinity() { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::Experimental::infinity::value); - } - - static KOKKOS_FUNCTION bool isInf(const val_type x) { - return Kokkos::isinf(Kokkos::Experimental::cast_from_bhalf(x)); - } - static KOKKOS_FUNCTION bool isNan(const val_type x) { - return Kokkos::isnan(Kokkos::Experimental::cast_from_bhalf(x)); - } - static KOKKOS_FUNCTION mag_type abs(const val_type x) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::abs(Kokkos::Experimental::cast_from_bhalf(x))); - } - static KOKKOS_FUNCTION val_type zero() { - return Kokkos::Experimental::cast_to_bhalf(0.0F); - } - static KOKKOS_FUNCTION val_type one() { - return Kokkos::Experimental::cast_to_bhalf(1.0F); - } - static KOKKOS_FUNCTION val_type min() { - return Kokkos::Experimental::cast_to_bhalf(-KOKKOSKERNELS_IMPL_BF16_MAX); - } - static KOKKOS_FUNCTION val_type max() { - return Kokkos::Experimental::cast_to_bhalf(KOKKOSKERNELS_IMPL_BF16_MAX); - } - static KOKKOS_FUNCTION mag_type real(const val_type x) { return x; } - static KOKKOS_FUNCTION mag_type imag(const val_type) { - return Kokkos::Experimental::cast_to_bhalf(0.0F); - } - static KOKKOS_FUNCTION val_type conj(const val_type x) { return x; } - static KOKKOS_FUNCTION val_type pow(const val_type x, const val_type y) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::pow(Kokkos::Experimental::cast_from_bhalf(x), - Kokkos::Experimental::cast_from_bhalf(y))); - } - static KOKKOS_FUNCTION val_type sqrt(const val_type x) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::sqrt(Kokkos::Experimental::cast_from_bhalf(x))); - } - static KOKKOS_FUNCTION val_type cbrt(const val_type x) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::cbrt(Kokkos::Experimental::cast_from_bhalf(x))); - } - static KOKKOS_FUNCTION val_type exp(const val_type x) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::exp(Kokkos::Experimental::cast_from_bhalf(x))); - } - static KOKKOS_FUNCTION val_type log(const val_type x) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::log(Kokkos::Experimental::cast_from_bhalf(x))); - } - static KOKKOS_FUNCTION val_type log10(const val_type x) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::log10(Kokkos::Experimental::cast_from_bhalf(x))); - } - static KOKKOS_FUNCTION val_type sin(const val_type x) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::sin(Kokkos::Experimental::cast_from_bhalf(x))); - } - static KOKKOS_FUNCTION val_type cos(const val_type x) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::cos(Kokkos::Experimental::cast_from_bhalf(x))); - } - static KOKKOS_FUNCTION val_type tan(const val_type x) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::tan(Kokkos::Experimental::cast_from_bhalf(x))); - } - static KOKKOS_FUNCTION val_type sinh(const val_type x) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::sinh(Kokkos::Experimental::cast_from_bhalf(x))); - } - static KOKKOS_FUNCTION val_type cosh(const val_type x) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::cosh(Kokkos::Experimental::cast_from_bhalf(x))); - } - static KOKKOS_FUNCTION val_type tanh(const val_type x) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::tanh(Kokkos::Experimental::cast_from_bhalf(x))); - } - static KOKKOS_FUNCTION val_type asin(const val_type x) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::asin(Kokkos::Experimental::cast_from_bhalf(x))); - } - static KOKKOS_FUNCTION val_type acos(const val_type x) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::acos(Kokkos::Experimental::cast_from_bhalf(x))); - } - static KOKKOS_FUNCTION val_type atan(const val_type x) { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::atan(Kokkos::Experimental::cast_from_bhalf(x))); - } - static KOKKOS_FUNCTION mag_type epsilon() { - // return ::pow(2, -KOKKOSKERNELS_IMPL_BF16_SIGNIFICAND_BITS); - return Kokkos::Experimental::cast_to_bhalf(KOKKOSKERNELS_IMPL_BF16_EPSILON); - } -#endif - // Backwards compatibility with Teuchos::ScalarTraits. using magnitudeType = mag_type; using bhalfPrecision = Kokkos::Experimental::bhalf_t; @@ -1297,52 +1050,11 @@ class ArithTraits { static std::string name() { return "bhalf_t"; } -#if KOKKOS_VERSION < 40199 - static KOKKOS_FUNCTION bool isnaninf(const val_type x) { - return isNan(x) || isInf(x); - } - static KOKKOS_FUNCTION magnitudeType magnitude(const val_type x) { - return abs(x); - } - static KOKKOS_FUNCTION val_type conjugate(const val_type x) { - return conj(x); - } - static KOKKOS_FUNCTION val_type squareroot(const val_type x) { - return sqrt(x); - } - static KOKKOS_FUNCTION val_type nan() { - return Kokkos::Experimental::cast_to_bhalf( - Kokkos::Experimental::quiet_NaN::value); - } - static KOKKOS_FUNCTION mag_type eps() { return epsilon(); } - static KOKKOS_FUNCTION mag_type sfmin() { - return Kokkos::Experimental::cast_to_bhalf(KOKKOSKERNELS_IMPL_BF16_MIN); - } - static KOKKOS_FUNCTION int base() { return KOKKOSKERNELS_IMPL_BF16_RADIX; } - // Use float to allow running on both host and device - static KOKKOS_FUNCTION float prec() { - float e = KOKKOSKERNELS_IMPL_BF16_EPSILON; - float b = (float)base(); - float r = e * b; - return r; - } - static KOKKOS_FUNCTION int t() { return KOKKOSKERNELS_IMPL_BF16_MANT_DIG; } - static KOKKOS_FUNCTION mag_type rnd() { return one(); } - static KOKKOS_FUNCTION int emin() { return KOKKOSKERNELS_IMPL_BF16_MIN_EXP; } - static KOKKOS_FUNCTION mag_type rmin() { - return Kokkos::Experimental::cast_to_bhalf(KOKKOSKERNELS_IMPL_BF16_MIN); - } - static KOKKOS_FUNCTION int emax() { return KOKKOSKERNELS_IMPL_BF16_MAX_EXP; } - static KOKKOS_FUNCTION mag_type rmax() { - return Kokkos::Experimental::cast_to_bhalf(KOKKOSKERNELS_IMPL_BF16_MAX); - } -#else #if defined(KOKKOS_ENABLE_SYCL) || defined(KOKKOS_ENABLE_HIP) KOKKOSKERNELS_ARITHTRAITS_HALF_FP(KOKKOS_FUNCTION) #else KOKKOSKERNELS_ARITHTRAITS_REAL_FP(KOKKOS_FUNCTION) #endif -#endif }; #endif // #if defined(KOKKOS_BHALF_T_IS_FLOAT) && !KOKKOS_BHALF_T_IS_FLOAT diff --git a/common/unit_test/Test_Common_ArithTraits.hpp b/common/unit_test/Test_Common_ArithTraits.hpp index 1d9a4c6480..8c493a3666 100644 --- a/common/unit_test/Test_Common_ArithTraits.hpp +++ b/common/unit_test/Test_Common_ArithTraits.hpp @@ -35,30 +35,15 @@ #include // typeid (T) #include -#if KOKKOS_VERSION < 40199 -#define FAILURE() \ - { \ - KOKKOS_IMPL_DO_NOT_USE_PRINTF("%s:%s:%d: Failure\n", __FILE__, __func__, \ - __LINE__); \ - success = 0; \ - } -#else #define FAILURE() \ { \ Kokkos::printf("%s:%s:%d: Failure\n", __FILE__, __func__, __LINE__); \ success = 0; \ } -#endif #if 0 -#if KOKKOS_VERSION < 40199 -#define TRACE() \ - KOKKOS_IMPL_DO_NOT_USE_PRINTF("%s:%s:%d: Trace\n", __FILE__, __func__, \ - __LINE__); -#else #define TRACE() \ Kokkos::printf("%s:%s:%d: Trace\n", __FILE__, __func__, __LINE__); -#endif #else #define TRACE() #endif @@ -194,11 +179,7 @@ class ArithTraitsTesterBase { // T, but we check for this int constant for compatibility with // std::numeric_limits. if (!AT::is_specialized) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("! AT::is_specialized\n"); -#else Kokkos::printf("! AT::is_specialized\n"); -#endif FAILURE(); } @@ -206,21 +187,11 @@ class ArithTraitsTesterBase { // function, just not to its class methods (which are not marked // as device functions). if (AT::is_integer != std::numeric_limits::is_integer) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "AT::is_integer not same as numeric_limits\n"); -#else Kokkos::printf("AT::is_integer not same as numeric_limits\n"); -#endif FAILURE(); } if (AT::is_exact != std::numeric_limits::is_exact) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "AT::is_exact not same as numeric_limits\n"); -#else Kokkos::printf("AT::is_exact not same as numeric_limits\n"); -#endif FAILURE(); } @@ -229,62 +200,34 @@ class ArithTraitsTesterBase { // Test properties of the arithmetic and multiplicative identities. if (zero + zero != zero) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("0 + 0 != 0\n"); -#else Kokkos::printf("0 + 0 != 0\n"); -#endif FAILURE(); } if (zero + one != one) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("0 + 1 != 1\n"); -#else Kokkos::printf("0 + 1 != 1\n"); -#endif FAILURE(); } if (one - one != zero) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("1 - 1 != 0\n"); -#else Kokkos::printf("1 - 1 != 0\n"); -#endif FAILURE(); } // This is technically 1 even of Z_2, since in that field, one // is its own inverse (so -one == one). if ((one + one) - one != one) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("(1 + 1) - 1 != 1\n"); -#else Kokkos::printf("(1 + 1) - 1 != 1\n"); -#endif FAILURE(); } if (AT::abs(zero) != zero) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::abs(0) != 0\n"); -#else Kokkos::printf("AT::abs(0) != 0\n"); -#endif FAILURE(); } if (AT::abs(one) != one) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::abs(1) != 1\n"); -#else Kokkos::printf("AT::abs(1) != 1\n"); -#endif FAILURE(); } if (AT::is_signed && AT::abs(-one) != one) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::is_signed and AT::abs(-1) != 1\n"); -#else Kokkos::printf("AT::is_signed and AT::abs(-1) != 1\n"); -#endif FAILURE(); } // Need enable_if to test whether T can be compared using <=. @@ -293,11 +236,7 @@ class ArithTraitsTesterBase { // These are very mild ordering properties. // They should work even for a set only containing zero. if (AT::abs(zero) > AT::abs(AT::max())) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::abs(0) > AT::abs (AT::max ())\n"); -#else Kokkos::printf("AT::abs(0) > AT::abs (AT::max ())\n"); -#endif FAILURE(); } @@ -621,36 +560,20 @@ class ArithTraitsTesterTranscendentalBase if (!AT::is_complex) { result = AT::pow(two, three); if (!equal(result, eight)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::pow(2,3) != 8\n"); -#else Kokkos::printf("AT::pow(2,3) != 8\n"); -#endif FAILURE(); } } if (!equal(AT::pow(three, zero), one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::pow(3,0) != 1\n"); -#else Kokkos::printf("AT::pow(3,0) != 1\n"); -#endif FAILURE(); } if (!equal(AT::pow(three, one), three)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::pow(3,1) != 3\n"); -#else Kokkos::printf("AT::pow(3,1) != 3\n"); -#endif FAILURE(); } if (!equal(AT::pow(three, two), nine)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::pow(3,2) != 9\n"); -#else Kokkos::printf("AT::pow(3,2) != 9\n"); -#endif FAILURE(); } @@ -658,11 +581,7 @@ class ArithTraitsTesterTranscendentalBase if (!AT::is_complex) { result = AT::pow(three, three); if (!equal(result, twentySeven)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::pow(3,3) != 27\n"); -#else Kokkos::printf("AT::pow(3,3) != 27\n"); -#endif FAILURE(); } } @@ -671,170 +590,93 @@ class ArithTraitsTesterTranscendentalBase if (AT::is_signed && !AT::is_complex) { result = AT::pow(-three, one); if (!equal(result, -three)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::pow(-3,1) != -3\n"); -#else Kokkos::printf("AT::pow(-3,1) != -3\n"); -#endif FAILURE(); } result = AT::pow(-three, two); if (!equal(result, nine)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::pow(-3,2) != 9\n"); -#else Kokkos::printf("AT::pow(-3,2) != 9\n"); -#endif FAILURE(); } result = AT::pow(-three, three); if (!equal(result, -twentySeven)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::pow(-3,3) != 27\n"); -#else Kokkos::printf("AT::pow(-3,3) != 27\n"); -#endif FAILURE(); } } if (!equal(AT::sqrt(zero), zero)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::sqrt(0) != 0\n"); -#else Kokkos::printf("AT::sqrt(0) != 0\n"); -#endif FAILURE(); } if (!equal(AT::sqrt(one), one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::sqrt(1) != 1\n"); -#else Kokkos::printf("AT::sqrt(1) != 1\n"); -#endif FAILURE(); } if (!equal(AT::sqrt(thirtySix), six)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::sqrt(36) != 6\n"); -#else Kokkos::printf("AT::sqrt(36) != 6\n"); -#endif FAILURE(); } if (!equal(AT::sqrt(sixtyFour), eight)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::sqrt(64) != 8\n"); -#else Kokkos::printf("AT::sqrt(64) != 8\n"); -#endif FAILURE(); } if (AT::is_integer) { if (!equal(AT::sqrt(fortyTwo), six)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT:sqrt(42) != 6\n"); -#else Kokkos::printf("AT:sqrt(42) != 6\n"); -#endif FAILURE(); } if (!equal(AT::sqrt(oneTwentySeven), eleven)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::sqrt(127) != 11\n"); -#else Kokkos::printf("AT::sqrt(127) != 11\n"); -#endif FAILURE(); } } if (!equal(AT::cbrt(zero), zero)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::cbrt(0) != 0\n"); -#else Kokkos::printf("AT::cbrt(0) != 0\n"); -#endif FAILURE(); } if (!equal(AT::cbrt(one), one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::cbrt(1) != 1\n"); -#else Kokkos::printf("AT::cbrt(1) != 1\n"); -#endif FAILURE(); } if (!equal(AT::cbrt(twentySeven), three)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::cbrt(27) != 3\n"); -#else Kokkos::printf("AT::cbrt(27) != 3\n"); -#endif FAILURE(); } if (!equal(AT::cbrt(sixtyFour), four)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::cbrt(64) != 4\n"); -#else Kokkos::printf("AT::cbrt(64) != 4\n"); -#endif FAILURE(); } if (AT::is_integer) { if (!equal(AT::cbrt(fortyTwo), three)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT:cbrt(42) != 3\n"); -#else Kokkos::printf("AT:cbrt(42) != 3\n"); -#endif FAILURE(); } if (!equal(AT::cbrt(oneTwentySeven), five)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::cbrt(127) != 5\n"); -#else Kokkos::printf("AT::cbrt(127) != 5\n"); -#endif FAILURE(); } } if (!equal(AT::exp(zero), one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::cbrt(0) != 1\n"); -#else Kokkos::printf("AT::cbrt(0) != 1\n"); -#endif FAILURE(); } if (AT::is_complex) { const ScalarType val = two; //(two.real(), two.real()); if (!equal(AT::conj(AT::exp(val)), AT::exp(AT::conj(val)))) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "AT::conj(exp(complex(2,2))) != AT::exp(conj(complex(2,2)))\n"); -#else Kokkos::printf( "AT::conj(exp(complex(2,2))) != AT::exp(conj(complex(2,2)))\n"); -#endif FAILURE(); } } if (!equal(AT::log(one), zero)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::log(1) != 0\n"); -#else Kokkos::printf("AT::log(1) != 0\n"); -#endif FAILURE(); } if (!equal(AT::log10(one), zero)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::log10(1) != 0\n"); -#else Kokkos::printf("AT::log10(1) != 0\n"); -#endif FAILURE(); } @@ -843,23 +685,13 @@ class ArithTraitsTesterTranscendentalBase const auto val_sin = AT::sin(val); const auto val_cos = AT::cos(val); if (!equal(val_sin * val_sin + val_cos * val_cos, one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "AT(complex):: sin(val)*sin(val) + cos(val)*cos(val) != 1\n"); -#else Kokkos::printf( "AT(complex):: sin(val)*sin(val) + cos(val)*cos(val) != 1\n"); -#endif FAILURE(); } if (!equal(val_sin / val_cos, AT::tan(val))) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "AT(complex):: sin(val)/cos(val) != AT(real)::tan(val)\n"); -#else Kokkos::printf( "AT(complex):: sin(val)/cos(val) != AT(real)::tan(val)\n"); -#endif FAILURE(); } } else { @@ -867,47 +699,25 @@ class ArithTraitsTesterTranscendentalBase const auto val_sin = AT::sin(val); const auto val_cos = AT::cos(val); if (!equal(val_sin * val_sin + val_cos * val_cos, one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "AT(real):: sin(val)*sin(val) + cos(a)*cos(a) != 1\n"); -#else Kokkos::printf("AT(real):: sin(val)*sin(val) + cos(a)*cos(a) != 1\n"); -#endif FAILURE(); } if (!equal(val_sin / val_cos, AT::tan(val))) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "AT(real):: sin(val)/cos(val) != AT(real)::tan(val)\n"); -#else Kokkos::printf("AT(real):: sin(val)/cos(val) != AT(real)::tan(val)\n"); -#endif FAILURE(); } } if (!equal(AT::asin(AT::sin(one)), one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::asin(sin(1)) != 1\n"); -#else Kokkos::printf("AT::asin(sin(1)) != 1\n"); -#endif FAILURE(); } if (!equal(AT::acos(AT::cos(one)), one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::acos(cos(1)) != 1\n"); -#else Kokkos::printf("AT::acos(cos(1)) != 1\n"); -#endif FAILURE(); } if (!equal(AT::atan(AT::tan(one)), one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::atan(tan(1)) != 1\n"); -#else Kokkos::printf("AT::atan(tan(1)) != 1\n"); -#endif FAILURE(); } @@ -1034,74 +844,41 @@ class ArithTraitsTesterTranscendentalBase } if (!equal(AT::cbrt(zero), zero)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::cbrt(0) != 0\n"); -#else Kokkos::printf("AT::cbrt(0) != 0\n"); -#endif FAILURE(); } if (!equal(AT::cbrt(one), one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::cbrt(1) != 1\n"); -#else Kokkos::printf("AT::cbrt(1) != 1\n"); -#endif FAILURE(); } if (!equal(AT::cbrt(twentySeven), three)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::cbrt(27) != 3\n"); -#else Kokkos::printf("AT::cbrt(27) != 3\n"); -#endif FAILURE(); } if (!equal(AT::cbrt(sixtyFour), four)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::cbrt(64) != 4\n"); -#else Kokkos::printf("AT::cbrt(64) != 4\n"); -#endif FAILURE(); } if (AT::is_integer) { if (!equal(AT::cbrt(fortyTwo), three)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT:cbrt(42) != 3\n"); -#else Kokkos::printf("AT:cbrt(42) != 3\n"); -#endif FAILURE(); } if (!equal(AT::cbrt(oneTwentySeven), five)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::cbrt(127) != 5\n"); -#else Kokkos::printf("AT::cbrt(127) != 5\n"); -#endif FAILURE(); } } if (!equal(AT::exp(zero), one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::cbrt(0) != 1\n"); -#else Kokkos::printf("AT::cbrt(0) != 1\n"); -#endif FAILURE(); } if (AT::is_complex) { const ScalarType val = two; //(two.real(), two.real()); if (!equal(AT::conj(AT::exp(val)), AT::exp(AT::conj(val)))) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "AT::conj(exp(complex(2,0))) != AT::exp(conj(complex(2,0)))\n"); -#else Kokkos::printf( "AT::conj(exp(complex(2,0))) != AT::exp(conj(complex(2,0)))\n"); -#endif FAILURE(); } } @@ -1119,23 +896,13 @@ class ArithTraitsTesterTranscendentalBase const auto val_sin = AT::sin(val); const auto val_cos = AT::cos(val); if (!equal(val_sin * val_sin + val_cos * val_cos, one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "AT(complex):: sin(val)*sin(val) + cos(val)*cos(val) != 1\n"); -#else Kokkos::printf( "AT(complex):: sin(val)*sin(val) + cos(val)*cos(val) != 1\n"); -#endif FAILURE(); } if (!equal(val_sin / val_cos, AT::tan(val))) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "AT(complex):: sin(val)/cos(val) != AT(real)::tan(val)\n"); -#else Kokkos::printf( "AT(complex):: sin(val)/cos(val) != AT(real)::tan(val)\n"); -#endif FAILURE(); } } else { @@ -1143,47 +910,25 @@ class ArithTraitsTesterTranscendentalBase const auto val_sin = AT::sin(val); const auto val_cos = AT::cos(val); if (!equal(val_sin * val_sin + val_cos * val_cos, one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "AT(real):: sin(val)*sin(val) + cos(a)*cos(a) != 1\n"); -#else Kokkos::printf("AT(real):: sin(val)*sin(val) + cos(a)*cos(a) != 1\n"); -#endif FAILURE(); } if (!equal(val_sin / val_cos, AT::tan(val))) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "AT(real):: sin(val)/cos(val) != AT(real)::tan(val)\n"); -#else Kokkos::printf("AT(real):: sin(val)/cos(val) != AT(real)::tan(val)\n"); -#endif FAILURE(); } } if (!equal(AT::asin(AT::sin(three)), three)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::asin(sin(3)) != 3\n"); -#else Kokkos::printf("AT::asin(sin(3)) != 3\n"); -#endif FAILURE(); } if (!equal(AT::acos(AT::cos(three)), three)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::acos(cos(3)) != 3\n"); -#else Kokkos::printf("AT::acos(cos(3)) != 3\n"); -#endif FAILURE(); } if (!equal(AT::atan(AT::tan(three)), three)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::atan(tan(3)) != 3\n"); -#else Kokkos::printf("AT::atan(tan(3)) != 3\n"); -#endif FAILURE(); } @@ -1275,17 +1020,10 @@ class ArithTraitsTesterComplexBase #else { if (AT::is_signed != std::numeric_limits::is_signed) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "AT::is_signed = 0x%x, std::numeric_limits::is_signed " - "= 0x%x\n", - AT::is_signed, std::numeric_limits::is_signed); -#else Kokkos::printf( "AT::is_signed = 0x%x, std::numeric_limits::is_signed " "= 0x%x\n", AT::is_signed, std::numeric_limits::is_signed); -#endif FAILURE(); } } @@ -1498,11 +1236,7 @@ class ArithTraitsTesterFloatingPointBase int success = 1; if (AT::is_exact) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("AT::is_exact is 1\n"); -#else Kokkos::printf("AT::is_exact is 1\n"); -#endif FAILURE(); } @@ -1517,11 +1251,7 @@ class ArithTraitsTesterFloatingPointBase { #endif // KOKKOS_ENABLE_CUDA || KOKKOS_ENABLE_SYCL || KOKKOS_ENABLE_HIP if (!AT::isNan(AT::nan())) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("NaN is not NaN\n"); -#else Kokkos::printf("NaN is not NaN\n"); -#endif FAILURE(); } } @@ -1530,56 +1260,32 @@ class ArithTraitsTesterFloatingPointBase const ScalarType one = AT::one(); if (AT::isInf(zero)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("0 is Inf\n"); -#else Kokkos::printf("0 is Inf\n"); -#endif FAILURE(); } if (AT::isInf(one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("1 is Inf\n"); -#else Kokkos::printf("1 is Inf\n"); -#endif FAILURE(); } #if defined(KOKKOS_ENABLE_SYCL) || \ defined(KOKKOS_ENABLE_HIP) // FIXME_SYCL, FIXME_HIP if constexpr (!std::is_same_v) { if (AT::isNan(zero)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("0 is NaN\n"); -#else Kokkos::printf("0 is NaN\n"); -#endif FAILURE(); } if (AT::isNan(one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("1 is NaN\n"); -#else Kokkos::printf("1 is NaN\n"); -#endif FAILURE(); } } #else if (AT::isNan(zero)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("0 is NaN\n"); -#else Kokkos::printf("0 is NaN\n"); -#endif FAILURE(); } if (AT::isNan(one)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("1 is NaN\n"); -#else Kokkos::printf("1 is NaN\n"); -#endif FAILURE(); } #endif @@ -1696,11 +1402,7 @@ class ArithTraitsTesterFloatingPointBase int success = 1; if (!AT::is_exact) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("! AT:is_exact\n"); -#else Kokkos::printf("! AT:is_exact\n"); -#endif FAILURE(); } diff --git a/common/unit_test/Test_Common_LowerBound.hpp b/common/unit_test/Test_Common_LowerBound.hpp index 6ca28b8be1..23574087ff 100644 --- a/common/unit_test/Test_Common_LowerBound.hpp +++ b/common/unit_test/Test_Common_LowerBound.hpp @@ -43,14 +43,8 @@ struct ThreadLowerBoundFunctor { if (0 == i) { hv_size_type idx = KokkosKernels::lower_bound_thread(haystack_, needle_); if (idx != expected_) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("%s:%d thread %d expected %d got %d\n", - __FILE__, __LINE__, int(i), - int(expected_), int(idx)); -#else Kokkos::printf("%s:%d thread %d expected %d got %d\n", __FILE__, __LINE__, int(i), int(expected_), int(idx)); -#endif ++lerrCount; } } @@ -105,14 +99,8 @@ struct TeamLowerBoundFunctor { hv_size_type idx = KokkosKernels::lower_bound_team(handle, haystack_, needle_); if (idx != expected_) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("%s:%d thread %d expected %d got %d\n", - __FILE__, __LINE__, int(handle.team_rank()), - int(expected_), int(idx)); -#else Kokkos::printf("%s:%d thread %d expected %d got %d\n", __FILE__, __LINE__, int(handle.team_rank()), int(expected_), int(idx)); -#endif ++lerrCount; } } diff --git a/common/unit_test/Test_Common_UpperBound.hpp b/common/unit_test/Test_Common_UpperBound.hpp index 113b76c3ad..aace02a738 100644 --- a/common/unit_test/Test_Common_UpperBound.hpp +++ b/common/unit_test/Test_Common_UpperBound.hpp @@ -43,14 +43,8 @@ struct ThreadUpperBoundFunctor { if (0 == i) { hv_size_type idx = KokkosKernels::upper_bound_thread(haystack_, needle_); if (idx != expected_) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("%s:%d thread %d expected %d got %d\n", - __FILE__, __LINE__, int(i), - int(expected_), int(idx)); -#else Kokkos::printf("%s:%d thread %d expected %d got %d\n", __FILE__, __LINE__, int(i), int(expected_), int(idx)); -#endif ++lerrCount; } } @@ -105,14 +99,8 @@ struct TeamUpperBoundFunctor { hv_size_type idx = KokkosKernels::upper_bound_team(handle, haystack_, needle_); if (idx != expected_) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF("%s:%d thread %d expected %d got %d\n", - __FILE__, __LINE__, int(handle.team_rank()), - int(expected_), int(idx)); -#else Kokkos::printf("%s:%d thread %d expected %d got %d\n", __FILE__, __LINE__, int(handle.team_rank()), int(expected_), int(idx)); -#endif ++lerrCount; } } diff --git a/ode/impl/KokkosODE_Newton_impl.hpp b/ode/impl/KokkosODE_Newton_impl.hpp index d5000a74ab..554a85f961 100644 --- a/ode/impl/KokkosODE_Newton_impl.hpp +++ b/ode/impl/KokkosODE_Newton_impl.hpp @@ -74,12 +74,7 @@ KOKKOS_FUNCTION KokkosODE::Experimental::newton_solver_status NewtonSolve( KokkosBlas::SerialScale::invoke(-1, update); if (linSolverStat == 1) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "NewtonFunctor: Linear solve gesv returned failure! \n"); -#else Kokkos::printf("NewtonFunctor: Linear solve gesv returned failure! \n"); -#endif return newton_solver_status::LIN_SOLVE_FAIL; } diff --git a/sparse/src/KokkosSparse_spmv_team.hpp b/sparse/src/KokkosSparse_spmv_team.hpp index 5c9e843669..6c68478501 100644 --- a/sparse/src/KokkosSparse_spmv_team.hpp +++ b/sparse/src/KokkosSparse_spmv_team.hpp @@ -55,32 +55,18 @@ int KOKKOS_INLINE_FUNCTION team_spmv( // Check compatibility of dimensions at run time. if (values.extent(0) != colIndices.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosSparse::spmv: Dimensions of values and colIndices do not match: " - "values: %d, colIndices: %d", - (int)values.extent(0), (int)colIndices.extent(0)); -#else Kokkos::printf( "KokkosSparse::spmv: Dimensions of values and colIndices do not match: " "values: %d, colIndices: %d", (int)values.extent(0), (int)colIndices.extent(0)); -#endif return 1; } if (x.extent(0) != y.extent(0) || (x.extent(0) + 1) != row_ptr.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosSparse::spmv: Dimensions of x, y, and row_ptr do not match: " - "x: %d, y: %d, row_ptr: %d", - (int)x.extent(0), (int)y.extent(0), (int)row_ptr.extent(0)); -#else Kokkos::printf( "KokkosSparse::spmv: Dimensions of x, y, and row_ptr do not match: " "x: %d, y: %d, row_ptr: %d", (int)x.extent(0), (int)y.extent(0), (int)row_ptr.extent(0)); -#endif return 1; } #endif // KOKKOSKERNELS_DEBUG_LEVEL @@ -123,32 +109,18 @@ int KOKKOS_INLINE_FUNCTION team_vector_spmv( // Check compatibility of dimensions at run time. if (values.extent(0) != colIndices.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosSparse::spmv: Dimensions of values and colIndices do not match: " - "values: %d, colIndices: %d", - (int)values.extent(0), (int)colIndices.extent(0)); -#else Kokkos::printf( "KokkosSparse::spmv: Dimensions of values and colIndices do not match: " "values: %d, colIndices: %d", (int)values.extent(0), (int)colIndices.extent(0)); -#endif return 1; } if (x.extent(0) != y.extent(0) || (x.extent(0) + 1) != row_ptr.extent(0)) { -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "KokkosSparse::spmv: Dimensions of x, y, and row_ptr do not match: " - "x: %d, y: %d, row_ptr: %d", - (int)x.extent(0), (int)y.extent(0), (int)row_ptr.extent(0)); -#else Kokkos::printf( "KokkosSparse::spmv: Dimensions of x, y, and row_ptr do not match: " "x: %d, y: %d, row_ptr: %d", (int)x.extent(0), (int)y.extent(0), (int)row_ptr.extent(0)); -#endif return 1; } #endif // KOKKOSKERNELS_DEBUG_LEVEL diff --git a/sparse/unit_test/Test_Sparse_spmv.hpp b/sparse/unit_test/Test_Sparse_spmv.hpp index b377806928..9cdd49c9ff 100644 --- a/sparse/unit_test/Test_Sparse_spmv.hpp +++ b/sparse/unit_test/Test_Sparse_spmv.hpp @@ -88,15 +88,9 @@ struct fSPMV { if (error > eps * max_val) { err++; -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "expected_y(%d)=%f, y(%d)=%f err=%e, max_error=%e\n", i, - AT::abs(expected_y(i)), i, AT::abs(y(i)), error, eps * max_val); -#else Kokkos::printf("expected_y(%d)=%f, y(%d)=%f err=%e, max_error=%e\n", i, AT::abs(expected_y(i)), i, AT::abs(y(i)), error, eps * max_val); -#endif } } @@ -106,16 +100,9 @@ struct fSPMV { if (error > eps * max_val) { err++; -#if KOKKOS_VERSION < 40199 - KOKKOS_IMPL_DO_NOT_USE_PRINTF( - "expected_y(%d,%d)=%f, y(%d,%d)=%f err=%e, max_error=%e\n", i, j, - AT::abs(expected_y(i, j)), i, j, AT::abs(y(i, j)), error, - eps * max_val); -#else Kokkos::printf("expected_y(%d,%d)=%f, y(%d,%d)=%f err=%e, max_error=%e\n", i, j, AT::abs(expected_y(i, j)), i, j, AT::abs(y(i, j)), error, eps * max_val); -#endif } } }; diff --git a/test_common/KokkosKernels_TestUtils.hpp b/test_common/KokkosKernels_TestUtils.hpp index 232b66242a..421f9855db 100644 --- a/test_common/KokkosKernels_TestUtils.hpp +++ b/test_common/KokkosKernels_TestUtils.hpp @@ -411,26 +411,6 @@ class epsilon { constexpr static double value = std::numeric_limits::epsilon(); }; -#if KOKKOS_VERSION < 40199 -// explicit epsilon specializations -#if defined(KOKKOS_HALF_T_IS_FLOAT) && !KOKKOS_HALF_T_IS_FLOAT -template <> -class epsilon { - public: - constexpr static double value = 0.0009765625F; -}; -#endif // KOKKOS_HALF_T_IS_FLOAT - -// explicit epsilon specializations -#if defined(KOKKOS_BHALF_T_IS_FLOAT) && !KOKKOS_BHALF_T_IS_FLOAT -template <> -class epsilon { - public: - constexpr static double value = 0.0078125F; -}; -#endif // KOKKOS_HALF_T_IS_FLOAT -#endif // KOKKOS_VERSION < 40199 - using KokkosKernels::Impl::getRandomBounds; template