Skip to content

Commit

Permalink
Stream support for Gauss-Seidel: Symbolic, Numeric, Apply (Twostage)
Browse files Browse the repository at this point in the history
  - Note: everything except for KokkosGraph and sptrsv runs on streams.
  • Loading branch information
e10harvey committed Sep 26, 2023
1 parent 043376f commit dd098a3
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 146 deletions.
5 changes: 2 additions & 3 deletions common/src/KokkosKernels_Utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,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 @@ -908,8 +908,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
10 changes: 4 additions & 6 deletions sparse/impl/KokkosSparse_gauss_seidel_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1547,9 +1547,8 @@ class PointGaussSeidel {
Permuted_Yvector);
}
if (init_zero_x_vector) {
KokkosKernels::Impl::zero_vector<
MyExecSpace, scalar_persistent_work_view2d_t, MyExecSpace>(
my_exec_space, num_cols * block_size, Permuted_Xvector);
KokkosKernels::Impl::zero_vector(my_exec_space, num_cols * block_size,
Permuted_Xvector);
} else {
KokkosKernels::Impl::permute_block_vector<
x_value_array_type, scalar_persistent_work_view2d_t,
Expand Down Expand Up @@ -1664,9 +1663,8 @@ class PointGaussSeidel {
Permuted_Yvector);
}
if (init_zero_x_vector) {
KokkosKernels::Impl::zero_vector<
MyExecSpace, scalar_persistent_work_view2d_t, MyExecSpace>(
my_exec_space, num_cols, Permuted_Xvector);
KokkosKernels::Impl::zero_vector(my_exec_space, num_cols,
Permuted_Xvector);
} else {
KokkosKernels::Impl::permute_vector<
x_value_array_type, scalar_persistent_work_view2d_t,
Expand Down
Loading

0 comments on commit dd098a3

Please sign in to comment.