Skip to content

Commit

Permalink
Get rid of distances arg in communicateResultsBack
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokop committed May 3, 2024
1 parent 3279a65 commit 8c17cd7
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions src/details/ArborX_DetailsDistributedTreeUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,10 @@ void forwardQueries(MPI_Comm comm, ExecutionSpace const &space,
}

template <typename ExecutionSpace, typename OutputView, typename Offset,
typename Ranks, typename Ids,
typename Distances =
Kokkos::View<float *, typename OutputView::memory_space>>
typename Ranks, typename Ids>
void communicateResultsBack(MPI_Comm comm, ExecutionSpace const &space,
OutputView &out, Offset const &offset, Ranks &ranks,
Ids &ids, Distances *distances_ptr = nullptr)
Ids &ids)
{
Kokkos::Profiling::ScopedRegion guard(
"ArborX::DistributedTree::communicateResultsBack");
Expand Down Expand Up @@ -318,18 +316,6 @@ void communicateResultsBack(MPI_Comm comm, ExecutionSpace const &space,
sendAcrossNetwork(space, distributor, export_out, import_out);
out = import_out;
}

if (distances_ptr)
{
auto &distances = *distances_ptr;
Kokkos::View<float *, MemorySpace> export_distances = distances;
Kokkos::View<float *, MemorySpace> import_distances(
Kokkos::view_alloc(space, Kokkos::WithoutInitializing,
distances.label()),
n_imports);
sendAcrossNetwork(space, distributor, export_distances, import_distances);
distances = import_distances;
}
}

template <
Expand Down

0 comments on commit 8c17cd7

Please sign in to comment.