Skip to content

Commit

Permalink
Use Kokkos::is_view_v
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokop committed Jan 19, 2024
1 parent bbfe353 commit 1b12bb6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions src/details/ArborX_DetailsDistributedTreeImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ struct DistributedTreeImpl
// spatial queries
template <typename DistributedTree, typename ExecutionSpace,
typename Predicates, typename IndicesAndRanks, typename Offset>
static std::enable_if_t<Kokkos::is_view<IndicesAndRanks>{} &&
Kokkos::is_view<Offset>{}>
static std::enable_if_t<Kokkos::is_view_v<IndicesAndRanks> &&
Kokkos::is_view_v<Offset>>
queryDispatch(SpatialPredicateTag, DistributedTree const &tree,
ExecutionSpace const &space, Predicates const &queries,
IndicesAndRanks &values, Offset &offset);

template <typename DistributedTree, typename ExecutionSpace,
typename Predicates, typename OutputView, typename OffsetView,
typename Callback>
static std::enable_if_t<Kokkos::is_view<OutputView>{} &&
Kokkos::is_view<OffsetView>{}>
static std::enable_if_t<Kokkos::is_view_v<OutputView> &&
Kokkos::is_view_v<OffsetView>>
queryDispatch(SpatialPredicateTag, DistributedTree const &tree,
ExecutionSpace const &space, Predicates const &queries,
Callback const &callback, OutputView &out, OffsetView &offset);
Expand All @@ -44,16 +44,16 @@ struct DistributedTreeImpl
template <typename DistributedTree, typename ExecutionSpace,
typename Predicates, typename Indices, typename Offset,
typename Ranks>
static std::enable_if_t<Kokkos::is_view<Indices>{} &&
Kokkos::is_view<Offset>{} && Kokkos::is_view<Ranks>{}>
static std::enable_if_t<Kokkos::is_view_v<Indices> &&
Kokkos::is_view_v<Offset> && Kokkos::is_view_v<Ranks>>
queryDispatchImpl(NearestPredicateTag, DistributedTree const &tree,
ExecutionSpace const &space, Predicates const &queries,
Indices &indices, Offset &offset, Ranks &ranks);

template <typename DistributedTree, typename ExecutionSpace,
typename Predicates, typename IndicesAndRanks, typename Offset>
static std::enable_if_t<Kokkos::is_view<IndicesAndRanks>{} &&
Kokkos::is_view<Offset>{}>
static std::enable_if_t<Kokkos::is_view_v<IndicesAndRanks> &&
Kokkos::is_view_v<Offset>>
queryDispatch(NearestPredicateTag tag, DistributedTree const &tree,
ExecutionSpace const &space, Predicates const &queries,
IndicesAndRanks &values, Offset &offset);
Expand Down
6 changes: 3 additions & 3 deletions src/details/ArborX_DetailsDistributedTreeNearest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ void DistributedTreeImpl::reassessStrategy(

template <typename Tree, typename ExecutionSpace, typename Predicates,
typename Values, typename Offset, typename Ranks>
std::enable_if_t<Kokkos::is_view<Values>{} && Kokkos::is_view<Offset>{} &&
Kokkos::is_view<Ranks>{}>
std::enable_if_t<Kokkos::is_view_v<Values> && Kokkos::is_view_v<Offset> &&
Kokkos::is_view_v<Ranks>>
DistributedTreeImpl::queryDispatchImpl(NearestPredicateTag, Tree const &tree,
ExecutionSpace const &space,
Predicates const &queries,
Expand Down Expand Up @@ -405,7 +405,7 @@ DistributedTreeImpl::queryDispatchImpl(NearestPredicateTag, Tree const &tree,

template <typename Tree, typename ExecutionSpace, typename Predicates,
typename Values, typename Offset>
std::enable_if_t<Kokkos::is_view<Values>{} && Kokkos::is_view<Offset>{}>
std::enable_if_t<Kokkos::is_view_v<Values> && Kokkos::is_view_v<Offset>>
DistributedTreeImpl::queryDispatch(NearestPredicateTag tag, Tree const &tree,
ExecutionSpace const &space,
Predicates const &queries, Values &values,
Expand Down
4 changes: 2 additions & 2 deletions src/details/ArborX_DetailsDistributedTreeSpatial.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace ArborX::Details

template <typename Tree, typename ExecutionSpace, typename Predicates,
typename Values, typename Offset, typename Callback>
std::enable_if_t<Kokkos::is_view<Values>{} && Kokkos::is_view<Offset>{}>
std::enable_if_t<Kokkos::is_view_v<Values> && Kokkos::is_view_v<Offset>>
DistributedTreeImpl::queryDispatch(SpatialPredicateTag, Tree const &tree,
ExecutionSpace const &space,
Predicates const &predicates,
Expand Down Expand Up @@ -88,7 +88,7 @@ DistributedTreeImpl::queryDispatch(SpatialPredicateTag, Tree const &tree,

template <typename Tree, typename ExecutionSpace, typename Predicates,
typename Values, typename Offset>
std::enable_if_t<Kokkos::is_view<Values>{} && Kokkos::is_view<Offset>{}>
std::enable_if_t<Kokkos::is_view_v<Values> && Kokkos::is_view_v<Offset>>
DistributedTreeImpl::queryDispatch(SpatialPredicateTag, Tree const &tree,
ExecutionSpace const &space,
Predicates const &predicates, Values &values,
Expand Down

0 comments on commit 1b12bb6

Please sign in to comment.