Skip to content

Commit

Permalink
tpetra: compatibility update with kokkos-kernels
Browse files Browse the repository at this point in the history
Update for compatibility following kokkos/kokkos-kernels#1974
  • Loading branch information
ndellingwood committed Sep 27, 2023
1 parent 8f2db99 commit a86e6bb
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions packages/tpetra/core/src/Tpetra_BlockCrsMatrix_Helpers_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a86e6bb

Please sign in to comment.