Skip to content

Commit

Permalink
Migrate Sort
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokop committed Dec 26, 2023
1 parent e8f3835 commit 835ab9a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/details/ArborX_Dendrogram.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ struct Dendrogram
splitEdges(exec_space, edges, unweighted_edges, _parent_heights);

Kokkos::Profiling::pushRegion("ArborX::Dendrogram::sort_edges");
KokkosBlah::sortByKey(exec_space, _parent_heights, unweighted_edges);
Details::KokkosExt::sortByKey(exec_space, _parent_heights,
unweighted_edges);
Kokkos::Profiling::popRegion();

using ConstEdges =
Expand Down
2 changes: 1 addition & 1 deletion src/details/ArborX_DetailsSortUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ auto sortObjects(ExecutionSpace const &space, ViewType &view)
view.extent(0));
ArborX::iota(space, permute);

KokkosBlah::sortByKey(space, view, permute);
KokkosExt::sortByKey(space, view, permute);

Kokkos::Profiling::popRegion();

Expand Down
13 changes: 5 additions & 8 deletions src/kokkos_ext/ArborX_DetailsKokkosExtSort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,13 @@
#include <oneapi/dpl/iterator>
#endif

namespace KokkosBlah
namespace ArborX::Details::KokkosExt
{

template <typename ExecutionSpace, typename Keys, typename Values>
void sortByKey(ExecutionSpace const &space, Keys &keys, Values &values)
{
Kokkos::Profiling::ScopedRegion guard(
"ArborX::KokkosBlah::sortByKey::Kokkos");
Kokkos::Profiling::ScopedRegion guard("ArborX::KokkosExt::sortByKey::Kokkos");

static_assert(Kokkos::is_view<Keys>::value);
static_assert(Kokkos::is_view<Values>::value);
Expand Down Expand Up @@ -121,8 +120,7 @@ void sortByKey(
#endif
Keys &keys, Values &values)
{
Kokkos::Profiling::ScopedRegion guard(
"ArborX::KokkosBlah::sortByKey::Thrust");
Kokkos::Profiling::ScopedRegion guard("ArborX::KokkosExt::sortByKey::Thrust");

using ExecutionSpace = std::decay_t<decltype(space)>;
static_assert(Kokkos::is_view<Keys>::value);
Expand Down Expand Up @@ -155,8 +153,7 @@ template <typename Keys, typename Values>
void sortByKey(Kokkos::Experimental::SYCL const &space, Keys &keys,
Values &values)
{
Kokkos::Profiling::ScopedRegion guard(
"ArborX::KokkosBlah::sortByKey::OneDPL");
Kokkos::Profiling::ScopedRegion guard("ArborX::KokkosExt::sortByKey::OneDPL");

using ExecutionSpace = std::decay_t<decltype(space)>;
static_assert(Kokkos::is_view<Keys>::value);
Expand Down Expand Up @@ -188,6 +185,6 @@ void sortByKey(Kokkos::Experimental::SYCL const &space, Keys &keys,
}
#endif

} // namespace KokkosBlah
} // namespace ArborX::Details::KokkosExt

#endif

0 comments on commit 835ab9a

Please sign in to comment.