diff --git a/packages/tpetra/core/src/Tpetra_BlockCrsMatrix_Helpers_def.hpp b/packages/tpetra/core/src/Tpetra_BlockCrsMatrix_Helpers_def.hpp index ea3e076158c2..ed5b3fcba0d5 100644 --- a/packages/tpetra/core/src/Tpetra_BlockCrsMatrix_Helpers_def.hpp +++ b/packages/tpetra/core/src/Tpetra_BlockCrsMatrix_Helpers_def.hpp @@ -575,9 +575,13 @@ namespace Tpetra { } Ordinal nnz_block_count = 0; +#if KOKKOSKERNELS_VERSION >= 40199 + KokkosKernels::Impl::kk_exclusive_parallel_prefix_sum< + execution_space>(active_block_row_map.extent(0), active_block_row_map, nnz_block_count); +#else KokkosKernels::Impl::kk_exclusive_parallel_prefix_sum< dev_row_view_t, execution_space>(active_block_row_map.extent(0), active_block_row_map, nnz_block_count); - +#endif dev_col_view_t block_col_ids("block_col_ids", nnz_block_count); // Find active blocks @@ -685,9 +689,13 @@ namespace Tpetra { }); Ordinal new_nnz_count = 0; +#if KOKKOSKERNELS_VERSION >= 40199 + KokkosKernels::Impl::kk_exclusive_parallel_prefix_sum< + execution_space>(new_rowmap.extent(0), new_rowmap, new_nnz_count); +#else KokkosKernels::Impl::kk_exclusive_parallel_prefix_sum< dev_row_view_t, execution_space>(new_rowmap.extent(0), new_rowmap, new_nnz_count); - +#endif // Now populate cols and vals dev_col_view_t new_col_ids("new_col_ids", new_nnz_count); dev_val_view_t new_vals("new_vals", new_nnz_count); @@ -761,9 +769,13 @@ namespace Tpetra { }); Ordinal real_nnzs = 0; +#if KOKKOSKERNELS_VERSION >= 40199 + KokkosKernels::Impl::kk_exclusive_parallel_prefix_sum< + execution_space>(new_rowmap.extent(0), new_rowmap, real_nnzs); +#else KokkosKernels::Impl::kk_exclusive_parallel_prefix_sum< dev_row_view_t, execution_space>(new_rowmap.extent(0), new_rowmap, real_nnzs); - +#endif // Now populate cols and vals dev_col_view_t new_col_ids("new_col_ids", real_nnzs); dev_val_view_t new_vals("new_vals", real_nnzs);