Skip to content

Commit

Permalink
Warn about the correct usage of discrete_space (#325)
Browse files Browse the repository at this point in the history
* Warn about the correct usage of

* Review from Yuuichi
  • Loading branch information
tpadioleau authored Mar 6, 2024
1 parent 665fd3e commit 5fc335c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/ddc/discrete_space.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ std::enable_if_t<2 <= sizeof...(Args), std::tuple<Args...>> init_discrete_space(
return detail::extract_after(std::move(a), std::index_sequence_for<Args...>());
}

/**
* @tparam DDim a discrete dimension
* @return the discrete space instance associated with `DDim`.
* This function must be called from a `KOKKOS_FUNCTION`.
* Call `ddc::host_discrete_space` for a host-only function instead.
*/
template <class DDim, class MemorySpace = DDC_CURRENT_KOKKOS_SPACE>
KOKKOS_FORCEINLINE_FUNCTION detail::ddim_impl_t<DDim, MemorySpace> const& discrete_space()
{
Expand Down

0 comments on commit 5fc335c

Please sign in to comment.