Skip to content

Commit

Permalink
Get rid of the Distances template argument
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokop committed Jan 9, 2024
1 parent f07bea6 commit ce3bc3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
9 changes: 3 additions & 6 deletions src/details/ArborX_DetailsDistributedTreeImpl.hpp
Expand Up @@ -43,12 +43,9 @@ struct DistributedTreeImpl
// nearest neighbors queries
template <typename DistributedTree, typename ExecutionSpace,
typename Predicates, typename Indices, typename Offset,
typename Ranks,
typename Distances =
Kokkos::View<float *, typename DistributedTree::memory_space>>
static std::enable_if_t<
Kokkos::is_view<Indices>{} && Kokkos::is_view<Offset>{} &&
Kokkos::is_view<Ranks>{} && Kokkos::is_view<Distances>{}>
typename Ranks>
static std::enable_if_t<Kokkos::is_view<Indices>{} &&
Kokkos::is_view<Offset>{} && Kokkos::is_view<Ranks>{}>
queryDispatchImpl(NearestPredicateTag, DistributedTree const &tree,
ExecutionSpace const &space, Predicates const &queries,
Indices &indices, Offset &offset, Ranks &ranks);
Expand Down
5 changes: 3 additions & 2 deletions src/details/ArborX_DetailsDistributedTreeNearest.hpp
Expand Up @@ -303,9 +303,9 @@ void DistributedTreeImpl::reassessStrategy(
}

template <typename Tree, typename ExecutionSpace, typename Predicates,
typename Values, typename Offset, typename Ranks, typename Distances>
typename Values, typename Offset, typename Ranks>
std::enable_if_t<Kokkos::is_view<Values>{} && Kokkos::is_view<Offset>{} &&
Kokkos::is_view<Ranks>{} && Kokkos::is_view<Distances>{}>
Kokkos::is_view<Ranks>{}>
DistributedTreeImpl::queryDispatchImpl(NearestPredicateTag, Tree const &tree,
ExecutionSpace const &space,
Predicates const &queries,
Expand All @@ -322,6 +322,7 @@ DistributedTreeImpl::queryDispatchImpl(NearestPredicateTag, Tree const &tree,
auto const &bottom_tree = tree._bottom_tree;
auto comm = tree.getComm();

using Distances = Kokkos::View<float *, MemorySpace>;
Distances distances("ArborX::DistributedTree::query::nearest::distances", 0);

// "Strategy" is used to determine what ranks to forward queries to. In
Expand Down

0 comments on commit ce3bc3f

Please sign in to comment.