Skip to content

Commit

Permalink
spadd: add APIs without an execution space argument (#2090)
Browse files Browse the repository at this point in the history
  • Loading branch information
jczhang07 authored Jan 20, 2024
1 parent aa12597 commit 0b1d20f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sparse/src/KokkosSparse_spadd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ void spadd_symbolic(
}
}

// one without an execution space arg
template <typename KernelHandle, typename... Args>
void spadd_symbolic(KernelHandle *handle, Args... args) {
spadd_symbolic(typename KernelHandle::HandleExecSpace{}, handle, args...);
}

template <typename ExecSpace, typename KernelHandle, typename alno_row_view_t_,
typename alno_nnz_view_t_, typename ascalar_t_,
typename ascalar_nnz_view_t_, typename blno_row_view_t_,
Expand Down Expand Up @@ -220,6 +226,12 @@ void spadd_numeric(const ExecSpace &exec, KernelHandle *handle,
Internal_c_values(c_values.data(), c_values.extent(0)));
}
}

// one without an execution space arg
template <typename KernelHandle, typename... Args>
void spadd_numeric(KernelHandle *handle, Args... args) {
spadd_numeric(typename KernelHandle::HandleExecSpace{}, handle, args...);
}
} // namespace Experimental

// Symbolic: count entries in each row in C to produce rowmap
Expand Down

0 comments on commit 0b1d20f

Please sign in to comment.