diff --git a/packages/stokhos/src/sacado/kokkos/pce/linalg/Kokkos_CrsMatrix_UQ_PCE.hpp b/packages/stokhos/src/sacado/kokkos/pce/linalg/Kokkos_CrsMatrix_UQ_PCE.hpp index bd951d700755..6031d6fc4d2d 100644 --- a/packages/stokhos/src/sacado/kokkos/pce/linalg/Kokkos_CrsMatrix_UQ_PCE.hpp +++ b/packages/stokhos/src/sacado/kokkos/pce/linalg/Kokkos_CrsMatrix_UQ_PCE.hpp @@ -1470,6 +1470,9 @@ namespace KokkosSparse { template < #if KOKKOSKERNELS_VERSION >= 40199 typename ExecutionSpace, +#endif +#if KOKKOSKERNELS_VERSION >= 40299 + typename Handle, #endif typename AlphaType, typename BetaType, @@ -1482,9 +1485,8 @@ typename std::enable_if< Kokkos::is_view_uq_pce< Kokkos::View< InputType, InputP... > >::value && Kokkos::is_view_uq_pce< Kokkos::View< OutputType, OutputP... > >::value #if KOKKOSKERNELS_VERSION >= 40299 - // TODO what is an alternative compile-time option to determine the rank? - // Is rank appropriate here, or is additional checking based on specialize trait needed? - && (Kokkos::View< OutputType, OutputP... >().rank() == 1) + && KokkosSparse::is_crs_matrix_v + && (Kokkos::View< OutputType, OutputP... >::rank() == 1) #endif >::type spmv( @@ -1494,7 +1496,7 @@ spmv( #if KOKKOSKERNELS_VERSION < 40299 KokkosKernels::Experimental::Controls, #else - KokkosSparse::SPMVHandle, Kokkos::View< OutputType, OutputP... >>* handle, + Handle* handle, #endif const char mode[], const AlphaType& a, @@ -1507,7 +1509,6 @@ spmv( #endif ) { - std::cout << " STOKHOS UQPCE SPMV R1" << std::endl; typedef Kokkos::View< OutputType, OutputP... > OutputVectorType; typedef Kokkos::View< InputType, InputP... > InputVectorType; typedef Stokhos::Multiply= 40199 typename ExecutionSpace, +#endif +#if KOKKOSKERNELS_VERSION >= 40299 + typename Handle, #endif typename AlphaType, typename BetaType, @@ -1556,9 +1560,8 @@ typename std::enable_if< Kokkos::is_view_uq_pce< Kokkos::View< InputType, InputP... > >::value && Kokkos::is_view_uq_pce< Kokkos::View< OutputType, OutputP... > >::value #if KOKKOSKERNELS_VERSION >= 40299 - // TODO what is an alternative compile-time option to determine the rank? - // Is rank appropriate here, or is additional checking based on specialize trait needed? - && (Kokkos::View< OutputType, OutputP... >().rank() == 2) + && KokkosSparse::is_crs_matrix_v + && (Kokkos::View< OutputType, OutputP... >::rank() == 2) #endif >::type spmv( @@ -1568,7 +1571,7 @@ spmv( #if KOKKOSKERNELS_VERSION < 40299 KokkosKernels::Experimental::Controls, #else - KokkosSparse::SPMVHandle, Kokkos::View< OutputType, OutputP... >>* handle, + Handle* handle, #endif const char mode[], const AlphaType& a, @@ -1581,7 +1584,6 @@ spmv( #endif ) { - std::cout << " STOKHOS UQPCE SPMV R2" << std::endl; #if KOKKOSKERNELS_VERSION >= 40199 if(space != ExecutionSpace()) { Kokkos::Impl::raise_error( diff --git a/packages/stokhos/src/sacado/kokkos/vector/linalg/Kokkos_CrsMatrix_MP_Vector.hpp b/packages/stokhos/src/sacado/kokkos/vector/linalg/Kokkos_CrsMatrix_MP_Vector.hpp index c276b9d62757..2fd9472604c8 100644 --- a/packages/stokhos/src/sacado/kokkos/vector/linalg/Kokkos_CrsMatrix_MP_Vector.hpp +++ b/packages/stokhos/src/sacado/kokkos/vector/linalg/Kokkos_CrsMatrix_MP_Vector.hpp @@ -532,6 +532,9 @@ namespace KokkosSparse { template < #if KOKKOSKERNELS_VERSION >= 40199 typename ExecutionSpace, +#endif +#if KOKKOSKERNELS_VERSION >= 40299 + typename Handle, #endif typename AlphaType, typename BetaType, @@ -544,9 +547,8 @@ typename std::enable_if< Kokkos::is_view_mp_vector< Kokkos::View< InputType, InputP... > >::value && Kokkos::is_view_mp_vector< Kokkos::View< OutputType, OutputP... > >::value #if KOKKOSKERNELS_VERSION >= 40299 - // TODO what is an alternative compile-time option to determine the rank? - // Is rank appropriate here, or is additional checking based on specialize trait needed? - && (Kokkos::View< OutputType, OutputP... >().rank() == 1) + && KokkosSparse::is_crs_matrix_v + && (Kokkos::View< OutputType, OutputP... >::rank() == 1) #endif >::type spmv( @@ -556,7 +558,7 @@ spmv( #if KOKKOSKERNELS_VERSION < 40299 KokkosKernels::Experimental::Controls, #else - KokkosSparse::SPMVHandle, Kokkos::View< OutputType, OutputP... >>* handle, + Handle* handle, #endif const char mode[], const AlphaType& a, @@ -567,9 +569,8 @@ spmv( #if KOKKOSKERNELS_VERSION < 40299 , const RANK_ONE #endif - ) +) { - std::cout << " STOKHOS MPVEC SPMV R1" << std::endl; typedef Kokkos::View< OutputType, OutputP... > OutputVectorType; typedef Kokkos::View< InputType, InputP... > InputVectorType; using input_vector_type = const_type_t; @@ -642,6 +643,9 @@ spmv( template < #if KOKKOSKERNELS_VERSION >= 40199 typename ExecutionSpace, +#endif +#if KOKKOSKERNELS_VERSION >= 40299 + typename Handle, #endif typename AlphaType, typename BetaType, @@ -654,9 +658,8 @@ typename std::enable_if< Kokkos::is_view_mp_vector< Kokkos::View< InputType, InputP... > >::value && Kokkos::is_view_mp_vector< Kokkos::View< OutputType, OutputP... > >::value #if KOKKOSKERNELS_VERSION >= 40299 - // TODO what is an alternative compile-time option to determine the rank? - // Is rank appropriate here, or is additional checking based on specialize trait needed? - && (Kokkos::View< OutputType, OutputP... >().rank() == 2) + && KokkosSparse::is_crs_matrix_v + && (Kokkos::View< OutputType, OutputP... >::rank() == 2) #endif >::type spmv( @@ -666,7 +669,7 @@ spmv( #if KOKKOSKERNELS_VERSION < 40299 KokkosKernels::Experimental::Controls, #else - KokkosSparse::SPMVHandle, Kokkos::View< OutputType, OutputP... >>* handle, + Handle* handle, #endif const char mode[], const AlphaType& a, @@ -679,7 +682,6 @@ spmv( #endif ) { - std::cout << " STOKHOS MPVEC SPMV R2" << std::endl; #if KOKKOSKERNELS_VERSION >= 40199 if(space != ExecutionSpace()) { Kokkos::Impl::raise_error(