Skip to content

Commit

Permalink
Merge pull request kokkos#2147 from lucbv/KK_Utils_cleanup
Browse files Browse the repository at this point in the history
KokkosKernels Utils: cleaning the zero_vector interface
  • Loading branch information
ndellingwood authored Mar 26, 2024
2 parents ccc4be5 + 44b4418 commit 363868e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions common/src/KokkosKernels_Utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ void permute_block_vector(typename idx_array_type::value_type num_elements,
// TODO BMK: clean this up by removing 1st argument. It is unused but
// its name gives the impression that only num_elements of the vector are
// zeroed, when really it's always the whole thing.
template <class ExecSpaceIn, typename value_array_type, typename MyExecSpace>
template <class ExecSpaceIn, typename value_array_type>
void zero_vector(ExecSpaceIn &exec_space_in,
typename value_array_type::value_type /* num_elements */,
value_array_type &vector) {
Expand All @@ -906,8 +906,7 @@ void zero_vector(typename value_array_type::value_type /* num_elements */,
using ne_tmp_t = typename value_array_type::value_type;
ne_tmp_t ne_tmp = ne_tmp_t(0);
MyExecSpace my_exec_space;
zero_vector<MyExecSpace, value_array_type, MyExecSpace>(my_exec_space, ne_tmp,
vector);
zero_vector(my_exec_space, ne_tmp, vector);
}

template <typename v1, typename v2, typename v3>
Expand Down
8 changes: 4 additions & 4 deletions sparse/impl/KokkosSparse_gauss_seidel_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1547,8 +1547,8 @@ class PointGaussSeidel {
Permuted_Yvector);
}
if (init_zero_x_vector) {
KokkosKernels::Impl::zero_vector<
MyExecSpace, scalar_persistent_work_view2d_t, MyExecSpace>(
KokkosKernels::Impl::zero_vector<MyExecSpace,
scalar_persistent_work_view2d_t>(
my_exec_space, num_cols * block_size, Permuted_Xvector);
} else {
KokkosKernels::Impl::permute_block_vector<
Expand Down Expand Up @@ -1664,8 +1664,8 @@ class PointGaussSeidel {
Permuted_Yvector);
}
if (init_zero_x_vector) {
KokkosKernels::Impl::zero_vector<
MyExecSpace, scalar_persistent_work_view2d_t, MyExecSpace>(
KokkosKernels::Impl::zero_vector<MyExecSpace,
scalar_persistent_work_view2d_t>(
my_exec_space, num_cols, Permuted_Xvector);
} else {
KokkosKernels::Impl::permute_vector<
Expand Down

0 comments on commit 363868e

Please sign in to comment.