diff --git a/benchmarks/dbscan/ArborX_DBSCANVerification.hpp b/benchmarks/dbscan/ArborX_DBSCANVerification.hpp index 7dd73a325..16f3face7 100644 --- a/benchmarks/dbscan/ArborX_DBSCANVerification.hpp +++ b/benchmarks/dbscan/ArborX_DBSCANVerification.hpp @@ -273,7 +273,7 @@ bool verifyClusters(ExecutionSpace const &exec_space, IndicesView indices, { int n = labels.size(); if ((int)offset.size() != n + 1 || - KokkosBlah::lastElement(exec_space, offset) != (int)indices.size()) + KokkosExt::lastElement(exec_space, offset) != (int)indices.size()) return false; using Verify = bool (*)(ExecutionSpace const &, IndicesView, OffsetView, diff --git a/benchmarks/dbscan/dbscan_timpl.hpp b/benchmarks/dbscan/dbscan_timpl.hpp index 963a4d151..ed5985a2b 100644 --- a/benchmarks/dbscan/dbscan_timpl.hpp +++ b/benchmarks/dbscan/dbscan_timpl.hpp @@ -50,6 +50,8 @@ void sortAndFilterClusters(ExecutionSpace const &exec_space, { Kokkos::Profiling::pushRegion("ArborX::DBSCAN::sortAndFilterClusters"); + namespace KokkosExt = ArborX::Details::KokkosExt; + static_assert(Kokkos::is_view{}); static_assert(Kokkos::is_view{}); static_assert(Kokkos::is_view{}); @@ -93,7 +95,7 @@ void sortAndFilterClusters(ExecutionSpace const &exec_space, auto &map_cluster_to_offset_position = cluster_sizes; constexpr int IGNORED_CLUSTER = -1; int num_clusters; - KokkosBlah::reallocWithoutInitializing(exec_space, cluster_offset, n + 1); + KokkosExt::reallocWithoutInitializing(exec_space, cluster_offset, n + 1); Kokkos::parallel_scan( "ArborX::DBSCAN::compute_cluster_offset_with_filter", Kokkos::RangePolicy(exec_space, 0, n), @@ -118,10 +120,10 @@ void sortAndFilterClusters(ExecutionSpace const &exec_space, Kokkos::resize(Kokkos::WithoutInitializing, cluster_offset, num_clusters + 1); ArborX::exclusivePrefixSum(exec_space, cluster_offset); - auto cluster_starts = KokkosBlah::clone(exec_space, cluster_offset); - KokkosBlah::reallocWithoutInitializing( + auto cluster_starts = KokkosExt::clone(exec_space, cluster_offset); + KokkosExt::reallocWithoutInitializing( exec_space, cluster_indices, - KokkosBlah::lastElement(exec_space, cluster_offset)); + KokkosExt::lastElement(exec_space, cluster_offset)); Kokkos::parallel_for( "ArborX::DBSCAN::compute_cluster_indices", Kokkos::RangePolicy(exec_space, 0, n), diff --git a/src/details/ArborX_Dendrogram.hpp b/src/details/ArborX_Dendrogram.hpp index ad69309df..3a3e06c60 100644 --- a/src/details/ArborX_Dendrogram.hpp +++ b/src/details/ArborX_Dendrogram.hpp @@ -49,13 +49,15 @@ struct Dendrogram { Kokkos::Profiling::pushRegion("ArborX::Dendrogram::Dendrogram"); + namespace KokkosExt = ArborX::Details::KokkosExt; + auto const num_edges = edges.size(); auto const num_vertices = num_edges + 1; - KokkosBlah::reallocWithoutInitializing(exec_space, _parents, - num_edges + num_vertices); - KokkosBlah::reallocWithoutInitializing(exec_space, _parent_heights, - num_edges); + KokkosExt::reallocWithoutInitializing(exec_space, _parents, + num_edges + num_vertices); + KokkosExt::reallocWithoutInitializing(exec_space, _parent_heights, + num_edges); Kokkos::View unweighted_edges( Kokkos::view_alloc(exec_space, Kokkos::WithoutInitializing, @@ -64,8 +66,7 @@ struct Dendrogram splitEdges(exec_space, edges, unweighted_edges, _parent_heights); Kokkos::Profiling::pushRegion("ArborX::Dendrogram::sort_edges"); - Details::KokkosExt::sortByKey(exec_space, _parent_heights, - unweighted_edges); + KokkosExt::sortByKey(exec_space, _parent_heights, unweighted_edges); Kokkos::Profiling::popRegion(); using ConstEdges = diff --git a/src/details/ArborX_DetailsCrsGraphWrapperImpl.hpp b/src/details/ArborX_DetailsCrsGraphWrapperImpl.hpp index 480c5d3da..582d87105 100644 --- a/src/details/ArborX_DetailsCrsGraphWrapperImpl.hpp +++ b/src/details/ArborX_DetailsCrsGraphWrapperImpl.hpp @@ -198,7 +198,7 @@ void queryImpl(ExecutionSpace const &space, Tree const &tree, if (underflow) { // Store a copy of the original offset. We'll need it for compression. - preallocated_offset = KokkosBlah::clone(space, offset); + preallocated_offset = KokkosExt::clone(space, offset); } Kokkos::parallel_for( @@ -207,7 +207,7 @@ void queryImpl(ExecutionSpace const &space, Tree const &tree, KOKKOS_LAMBDA(int const i) { permuted_offset(i) = counts(i); }); exclusivePrefixSum(space, offset); - int const n_results = KokkosBlah::lastElement(space, offset); + int const n_results = KokkosExt::lastElement(space, offset); Kokkos::Profiling::popRegion(); @@ -238,7 +238,7 @@ void queryImpl(ExecutionSpace const &space, Tree const &tree, Kokkos::RangePolicy(space, 0, n_queries), KOKKOS_LAMBDA(int const i) { counts(i) = permuted_offset(i); }); - KokkosBlah::reallocWithoutInitializing(space, out, n_results); + KokkosExt::reallocWithoutInitializing(space, out, n_results); tree.query( space, permuted_predicates, @@ -293,7 +293,7 @@ allocateAndInitializeStorage(Tag, ExecutionSpace const &space, OutView &out, int buffer_size) { auto const n_queries = predicates.size(); - KokkosBlah::reallocWithoutInitializing(space, offset, n_queries + 1); + KokkosExt::reallocWithoutInitializing(space, offset, n_queries + 1); buffer_size = std::abs(buffer_size); @@ -305,7 +305,7 @@ allocateAndInitializeStorage(Tag, ExecutionSpace const &space, // Use calculation for the size to avoid calling lastElement(space, offset) // as it will launch an extra kernel to copy to host. - KokkosBlah::reallocWithoutInitializing(space, out, n_queries * buffer_size); + KokkosExt::reallocWithoutInitializing(space, out, n_queries * buffer_size); } } @@ -317,7 +317,7 @@ allocateAndInitializeStorage(Tag, ExecutionSpace const &space, OutView &out, int /*buffer_size*/) { auto const n_queries = predicates.size(); - KokkosBlah::reallocWithoutInitializing(space, offset, n_queries + 1); + KokkosExt::reallocWithoutInitializing(space, offset, n_queries + 1); Kokkos::parallel_for( "ArborX::CrsGraphWrapper::query::nearest::" @@ -326,8 +326,8 @@ allocateAndInitializeStorage(Tag, ExecutionSpace const &space, KOKKOS_LAMBDA(int i) { offset(i) = getK(predicates(i)); }); exclusivePrefixSum(space, offset); - KokkosBlah::reallocWithoutInitializing( - space, out, KokkosBlah::lastElement(space, offset)); + KokkosExt::reallocWithoutInitializing(space, out, + KokkosExt::lastElement(space, offset)); } // Views are passed by reference here because internally Kokkos::realloc() diff --git a/src/details/ArborX_DetailsDistributedTreeImpl.hpp b/src/details/ArborX_DetailsDistributedTreeImpl.hpp index 21c8ed099..1ca6c2762 100644 --- a/src/details/ArborX_DetailsDistributedTreeImpl.hpp +++ b/src/details/ArborX_DetailsDistributedTreeImpl.hpp @@ -176,7 +176,7 @@ struct DistributedTreeImpl "ArborX::DistributedTree::query::nearest::ranks", 0); queryDispatchImpl(tag, tree, space, queries, indices, offset, ranks); auto const n = indices.extent(0); - KokkosBlah::reallocWithoutInitializing(space, values, n); + KokkosExt::reallocWithoutInitializing(space, values, n); Kokkos::parallel_for( "ArborX::DistributedTree::query::zip_indices_and_ranks", Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i) { @@ -358,7 +358,7 @@ void DistributedTreeImpl::deviseStrategy( // trees as necessary to find k neighbors. Kokkos::View new_indices( Kokkos::view_alloc(space, indices.label()), - KokkosBlah::lastElement(space, new_offset)); + KokkosExt::lastElement(space, new_offset)); Kokkos::parallel_for( "ArborX::DistributedTree::query::truncate_before_forwarding", Kokkos::RangePolicy(space, 0, n_queries), @@ -548,8 +548,8 @@ DistributedTreeImpl::queryDispatchImpl( // Unzip auto const n = out.extent(0); - KokkosBlah::reallocWithoutInitializing(space, indices, n); - KokkosBlah::reallocWithoutInitializing(space, distances, n); + KokkosExt::reallocWithoutInitializing(space, indices, n); + KokkosExt::reallocWithoutInitializing(space, distances, n); Kokkos::parallel_for( "ArborX::DistributedTree::query::nearest::split_" "index_distance_pairs", @@ -706,7 +706,7 @@ void DistributedTreeImpl::forwardQueries( Distributor distributor(comm); int const n_queries = queries.size(); - int const n_exports = KokkosBlah::lastElement(space, offset); + int const n_exports = KokkosExt::lastElement(space, offset); int const n_imports = distributor.createFromSends(space, indices); static_assert(std::is_same_v); @@ -795,7 +795,7 @@ void DistributedTreeImpl::communicateResultsBack( MPI_Comm_rank(comm, &comm_rank); int const n_fwd_queries = offset.extent_int(0) - 1; - int const n_exports = KokkosBlah::lastElement(space, offset); + int const n_exports = KokkosExt::lastElement(space, offset); // We are assuming here that if the same rank is related to multiple batches // these batches appear consecutively. Hence, no reordering is necessary. @@ -894,7 +894,7 @@ void DistributedTreeImpl::filterResults( exclusivePrefixSum(space, new_offset); - int const n_truncated_results = KokkosBlah::lastElement(space, new_offset); + int const n_truncated_results = KokkosExt::lastElement(space, new_offset); Kokkos::View new_indices( Kokkos::view_alloc(space, indices.label()), n_truncated_results); Kokkos::View new_ranks( @@ -911,7 +911,7 @@ void DistributedTreeImpl::filterResults( } }; - int const n_results = KokkosBlah::lastElement(space, offset); + int const n_results = KokkosExt::lastElement(space, offset); Kokkos::View buffer( Kokkos::view_alloc( space, Kokkos::WithoutInitializing, diff --git a/src/details/ArborX_DetailsDistributor.hpp b/src/details/ArborX_DetailsDistributor.hpp index 6c17fd4c0..d1acf893d 100644 --- a/src/details/ArborX_DetailsDistributor.hpp +++ b/src/details/ArborX_DetailsDistributor.hpp @@ -59,7 +59,7 @@ determineBufferLayout(ExecutionSpace const &space, InputView batched_ranks, auto const n_batched_ranks = batched_ranks.size(); if (n_batched_ranks == 0 || - KokkosBlah::lastElement(space, batched_offsets) == 0) + KokkosExt::lastElement(space, batched_offsets) == 0) return; using DeviceType = typename InputView::traits::device_type; @@ -242,8 +242,8 @@ class Distributor // The next two function calls are the only difference to the other // overload. - KokkosBlah::reallocWithoutInitializing(space, _permute, - destination_ranks.size()); + KokkosExt::reallocWithoutInitializing(space, _permute, + destination_ranks.size()); sortAndDetermineBufferLayout(space, destination_ranks, _permute, _destinations, _dest_counts, _dest_offsets); diff --git a/src/details/ArborX_DetailsExpandHalfToFull.hpp b/src/details/ArborX_DetailsExpandHalfToFull.hpp index ac7b3ced7..cad1353de 100644 --- a/src/details/ArborX_DetailsExpandHalfToFull.hpp +++ b/src/details/ArborX_DetailsExpandHalfToFull.hpp @@ -29,7 +29,7 @@ void expandHalfToFull(ExecutionSpace const &space, Offsets &offsets, typename Indices::const_type const indices_orig = indices; auto const n = offsets.extent(0) - 1; - offsets = KokkosBlah::cloneWithoutInitializingNorCopying(space, offsets_orig); + offsets = KokkosExt::cloneWithoutInitializingNorCopying(space, offsets_orig); Kokkos::deep_copy(space, offsets, 0); Kokkos::parallel_for( "ArborX::Experimental::HalfToFull::count", @@ -43,11 +43,11 @@ void expandHalfToFull(ExecutionSpace const &space, Offsets &offsets, }); exclusivePrefixSum(space, offsets); - auto const m = KokkosBlah::lastElement(space, offsets); - KokkosBlah::reallocWithoutInitializing(space, indices, m); + auto const m = KokkosExt::lastElement(space, offsets); + KokkosExt::reallocWithoutInitializing(space, indices, m); - auto counts = KokkosBlah::clone(space, offsets, - "ArborX::Experimental::HalfToFull::counts"); + auto counts = KokkosExt::clone(space, offsets, + "ArborX::Experimental::HalfToFull::counts"); Kokkos::parallel_for( "ArborX::Experimental::HalfToFull::rewrite", Kokkos::TeamPolicy(space, n, Kokkos::AUTO, 1), diff --git a/src/details/ArborX_DetailsFDBSCANDenseBox.hpp b/src/details/ArborX_DetailsFDBSCANDenseBox.hpp index f9e53bd06..698a7df87 100644 --- a/src/details/ArborX_DetailsFDBSCANDenseBox.hpp +++ b/src/details/ArborX_DetailsFDBSCANDenseBox.hpp @@ -118,7 +118,7 @@ struct FDBSCANDenseBoxCallback , _dense_cell_offsets(dense_cell_offsets) , _num_dense_cells(dense_cell_offsets.size() - 1) , _num_points_in_dense_cells( - KokkosBlah::lastElement(exec_space, _dense_cell_offsets)) + KokkosExt::lastElement(exec_space, _dense_cell_offsets)) , _permute(permute) , eps(eps_in) {} @@ -244,8 +244,8 @@ int reorderDenseAndSparseCells(ExecutionSpace const &exec_space, Kokkos::deep_copy(exec_space, sparse_offset, num_points_in_dense_cells); auto reordered_permute = - KokkosBlah::cloneWithoutInitializingNorCopying(exec_space, permute); - auto reordered_cell_indices = KokkosBlah::cloneWithoutInitializingNorCopying( + KokkosExt::cloneWithoutInitializingNorCopying(exec_space, permute); + auto reordered_cell_indices = KokkosExt::cloneWithoutInitializingNorCopying( exec_space, sorted_cell_indices); Kokkos::parallel_for( "ArborX::DBSCAN::reorder_cell_indices_and_permutation", diff --git a/src/details/ArborX_DetailsSortUtils.hpp b/src/details/ArborX_DetailsSortUtils.hpp index 686cb10ef..0250b84b9 100644 --- a/src/details/ArborX_DetailsSortUtils.hpp +++ b/src/details/ArborX_DetailsSortUtils.hpp @@ -131,7 +131,7 @@ void applyPermutation(ExecutionSpace const &space, PermutationView const &permutation, View &view) { static_assert(std::is_integral::value); - auto scratch_view = KokkosBlah::clone(space, view); + auto scratch_view = KokkosExt::clone(space, view); applyPermutation(space, permutation, scratch_view, view); } diff --git a/src/details/ArborX_DetailsTreeTraversal.hpp b/src/details/ArborX_DetailsTreeTraversal.hpp index 67beda805..f4bfcbced 100644 --- a/src/details/ArborX_DetailsTreeTraversal.hpp +++ b/src/details/ArborX_DetailsTreeTraversal.hpp @@ -159,7 +159,7 @@ struct TreeTraversal Kokkos::RangePolicy(space, 0, n_queries), KOKKOS_CLASS_LAMBDA(int i) { offset(i) = getK(_predicates(i)); }); exclusivePrefixSum(space, offset); - int const buffer_size = KokkosBlah::lastElement(space, offset); + int const buffer_size = KokkosExt::lastElement(space, offset); // Allocate buffer over which to perform heap operations in // TreeTraversal::nearestQuery() to store nearest leaf nodes found so far. // It is not possible to anticipate how much memory to allocate since the diff --git a/src/details/ArborX_DetailsUtils.hpp b/src/details/ArborX_DetailsUtils.hpp index 6c9690e03..c0d524122 100644 --- a/src/details/ArborX_DetailsUtils.hpp +++ b/src/details/ArborX_DetailsUtils.hpp @@ -268,7 +268,7 @@ template lastElement(Kokkos::View const &v) { using ExecutionSpace = typename Kokkos::View::execution_space; - return KokkosBlah::lastElement(ExecutionSpace{}, v); + return Details::KokkosExt::lastElement(ExecutionSpace{}, v); } /** \brief Fills the view with a sequence of numbers @@ -540,8 +540,8 @@ reallocWithoutInitializing(View &v, size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG, size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG) { using ExecutionSpace = typename View::execution_space; - KokkosBlah::reallocWithoutInitializing(ExecutionSpace{}, v, n0, n1, n2, n3, - n4, n5, n6, n7); + Details::KokkosExt::reallocWithoutInitializing(ExecutionSpace{}, v, n0, n1, + n2, n3, n4, n5, n6, n7); } template @@ -549,7 +549,7 @@ template reallocWithoutInitializing(View &v, const typename View::array_layout &layout) { using ExecutionSpace = typename View::execution_space; - KokkosBlah::reallocWithoutInitializing(ExecutionSpace{}, v, layout); + Details::KokkosExt::reallocWithoutInitializing(ExecutionSpace{}, v, layout); } template @@ -557,21 +557,22 @@ template cloneWithoutInitializingNorCopying(View &v) { using ExecutionSpace = typename View::execution_space; - return KokkosBlah::cloneWithoutInitializingNorCopying(ExecutionSpace{}, v); + return Details::KokkosExt::cloneWithoutInitializingNorCopying( + ExecutionSpace{}, v); } template [[deprecated]] typename View::non_const_type clone(ExecutionSpace const &space, View &v) { - return KokkosBlah::clone(space, v); + return Details::KokkosExt::clone(space, v); } template [[deprecated]] inline typename View::non_const_type clone(View &v) { using ExecutionSpace = typename View::execution_space; - return KokkosBlah::clone(ExecutionSpace{}, v); + return Details::KokkosExt::clone(ExecutionSpace{}, v); } namespace Details @@ -589,7 +590,7 @@ void computeOffsetsInOrderedView(ExecutionSpace const &exec_space, View view, auto const n = view.extent_int(0); int num_offsets; - KokkosBlah::reallocWithoutInitializing(exec_space, offsets, n + 1); + KokkosExt::reallocWithoutInitializing(exec_space, offsets, n + 1); Kokkos::parallel_scan( "ArborX::Algorithms::compute_offsets_in_sorted_view", Kokkos::RangePolicy(exec_space, 0, n + 1), diff --git a/src/details/ArborX_MinimumSpanningTree.hpp b/src/details/ArborX_MinimumSpanningTree.hpp index 25a4c892b..623856449 100644 --- a/src/details/ArborX_MinimumSpanningTree.hpp +++ b/src/details/ArborX_MinimumSpanningTree.hpp @@ -153,7 +153,7 @@ struct MinimumSpanningTree if constexpr (use_lower_bounds) { - KokkosBlah::reallocWithoutInitializing(space, lower_bounds, n); + KokkosExt::reallocWithoutInitializing(space, lower_bounds, n); Kokkos::deep_copy(space, lower_bounds, 0); } @@ -168,10 +168,10 @@ struct MinimumSpanningTree 0); if constexpr (Mode == BoruvkaMode::HDBSCAN) { - KokkosBlah::reallocWithoutInitializing(space, edges_mapping, n - 1); - KokkosBlah::reallocWithoutInitializing(space, sided_parents, n - 1); - KokkosBlah::reallocWithoutInitializing(space, dendrogram_parents, - 2 * n - 1); + KokkosExt::reallocWithoutInitializing(space, edges_mapping, n - 1); + KokkosExt::reallocWithoutInitializing(space, sided_parents, n - 1); + KokkosExt::reallocWithoutInitializing(space, dendrogram_parents, + 2 * n - 1); } // Boruvka iterations @@ -276,8 +276,8 @@ struct MinimumSpanningTree computeParents(space, edges, sided_parents, dendrogram_parents); - KokkosBlah::reallocWithoutInitializing(space, dendrogram_parent_heights, - n - 1); + KokkosExt::reallocWithoutInitializing(space, dendrogram_parent_heights, + n - 1); Kokkos::parallel_for( "ArborX::MST::assign_dendrogram_parent_heights", Kokkos::RangePolicy(space, 0, n - 1), diff --git a/src/details/ArborX_NeighborList.hpp b/src/details/ArborX_NeighborList.hpp index 5fda683ca..bff32298e 100644 --- a/src/details/ArborX_NeighborList.hpp +++ b/src/details/ArborX_NeighborList.hpp @@ -40,6 +40,7 @@ void findHalfNeighborList(ExecutionSpace const &space, { Kokkos::Profiling::pushRegion("ArborX::Experimental::HalfNeighborList"); + namespace KokkosExt = ArborX::Details::KokkosExt; using Details::HalfTraversal; using MemorySpace = @@ -50,22 +51,22 @@ void findHalfNeighborList(ExecutionSpace const &space, Kokkos::Profiling::pushRegion( "ArborX::Experimental::HalfNeighborList::Count"); - KokkosBlah::reallocWithoutInitializing(space, offsets, n + 1); + KokkosExt::reallocWithoutInitializing(space, offsets, n + 1); Kokkos::deep_copy(space, offsets, 0); HalfTraversal( space, bvh, KOKKOS_LAMBDA(int, int j) { Kokkos::atomic_increment(&offsets(j)); }, NeighborListPredicateGetter{radius}); exclusivePrefixSum(space, offsets); - KokkosBlah::reallocWithoutInitializing( - space, indices, KokkosBlah::lastElement(space, offsets)); + KokkosExt::reallocWithoutInitializing(space, indices, + KokkosExt::lastElement(space, offsets)); Kokkos::Profiling::popRegion(); Kokkos::Profiling::pushRegion("ArborX::Experimental::HalfNeighborList::Fill"); auto counts = - KokkosBlah::clone(space, Kokkos::subview(offsets, std::make_pair(0, n)), - "ArborX::Experimental::HalfNeighborList::counts"); + KokkosExt::clone(space, Kokkos::subview(offsets, std::make_pair(0, n)), + "ArborX::Experimental::HalfNeighborList::counts"); HalfTraversal( space, bvh, KOKKOS_LAMBDA(int i, int j) { @@ -84,6 +85,7 @@ void findFullNeighborList(ExecutionSpace const &space, { Kokkos::Profiling::pushRegion("ArborX::Experimental::FullNeighborList"); + namespace KokkosExt = ArborX::Details::KokkosExt; using Details::HalfTraversal; using MemorySpace = @@ -94,7 +96,7 @@ void findFullNeighborList(ExecutionSpace const &space, Kokkos::Profiling::pushRegion( "ArborX::Experimental::FullNeighborList::Count"); - KokkosBlah::reallocWithoutInitializing(space, offsets, n + 1); + KokkosExt::reallocWithoutInitializing(space, offsets, n + 1); Kokkos::deep_copy(space, offsets, 0); HalfTraversal( space, bvh, @@ -104,15 +106,15 @@ void findFullNeighborList(ExecutionSpace const &space, }, NeighborListPredicateGetter{radius}); exclusivePrefixSum(space, offsets); - KokkosBlah::reallocWithoutInitializing( - space, indices, KokkosBlah::lastElement(space, offsets)); + KokkosExt::reallocWithoutInitializing(space, indices, + KokkosExt::lastElement(space, offsets)); Kokkos::Profiling::popRegion(); Kokkos::Profiling::pushRegion("ArborX::Experimental::FullNeighborList::Fill"); auto counts = - KokkosBlah::clone(space, Kokkos::subview(offsets, std::make_pair(0, n)), - "ArborX::Experimental::FullNeighborList::counts"); + KokkosExt::clone(space, Kokkos::subview(offsets, std::make_pair(0, n)), + "ArborX::Experimental::FullNeighborList::counts"); HalfTraversal( space, bvh, KOKKOS_LAMBDA(int i, int j) { @@ -123,7 +125,7 @@ void findFullNeighborList(ExecutionSpace const &space, Kokkos::Profiling::popRegion(); Kokkos::Profiling::pushRegion("ArborX::Experimental::FullNeighborList::Copy"); - auto counts_copy = KokkosBlah::clone(space, counts, counts.label() + "_copy"); + auto counts_copy = KokkosExt::clone(space, counts, counts.label() + "_copy"); Kokkos::parallel_for( "ArborX::Experimental::FullNeighborList::Copy", Kokkos::TeamPolicy(space, n, Kokkos::AUTO, 1), diff --git a/src/interpolation/ArborX_InterpMovingLeastSquares.hpp b/src/interpolation/ArborX_InterpMovingLeastSquares.hpp index d3d360b31..d540d675a 100644 --- a/src/interpolation/ArborX_InterpMovingLeastSquares.hpp +++ b/src/interpolation/ArborX_InterpMovingLeastSquares.hpp @@ -238,7 +238,7 @@ class MovingLeastSquares int const num_targets = _values_indices.extent(0); int const num_neighbors = _values_indices.extent(1); - KokkosBlah::reallocWithoutInitializing(space, approx_values, num_targets); + KokkosExt::reallocWithoutInitializing(space, approx_values, num_targets); Kokkos::parallel_for( "ArborX::MovingLeastSquares::target_interpolation", diff --git a/src/kokkos_ext/ArborX_DetailsKokkosExtViewHelpers.hpp b/src/kokkos_ext/ArborX_DetailsKokkosExtViewHelpers.hpp index 925feef2d..765f19f9b 100644 --- a/src/kokkos_ext/ArborX_DetailsKokkosExtViewHelpers.hpp +++ b/src/kokkos_ext/ArborX_DetailsKokkosExtViewHelpers.hpp @@ -16,7 +16,7 @@ #include -namespace KokkosBlah +namespace ArborX::Details::KokkosExt { /** \brief Get a copy of the last element. @@ -38,7 +38,7 @@ lastElement(ExecutionSpace const &space, Kokkos::View const &v) auto v_subview = Kokkos::subview(v, n - 1); typename Kokkos::ViewTraits::non_const_value_type v_host; Kokkos::deep_copy(space, v_host, v_subview); - space.fence("ArborX::KokkosBlah::lastElement (copy to host)"); + space.fence("ArborX::KokkosExt::lastElement (copy to host)"); return v_host; } @@ -99,6 +99,6 @@ cloneWithoutInitializingNorCopying(ExecutionSpace const &space, View const &v) v); } -} // namespace KokkosBlah +} // namespace ArborX::Details::KokkosExt #endif diff --git a/test/ArborX_BoostRTreeHelpers.hpp b/test/ArborX_BoostRTreeHelpers.hpp index bf4754867..52307a917 100644 --- a/test/ArborX_BoostRTreeHelpers.hpp +++ b/test/ArborX_BoostRTreeHelpers.hpp @@ -188,8 +188,9 @@ template performQueries(RTree const &rtree, InputView const &queries) { - static_assert( - ArborX::Details::KokkosExt::is_accessible_from_host::value); + namespace KokkosExt = ArborX::Details::KokkosExt; + + static_assert(KokkosExt::is_accessible_from_host::value); using Value = typename RTree::value_type; auto const n_queries = queries.extent_int(0); @@ -201,7 +202,7 @@ performQueries(RTree const &rtree, InputView const &queries) using ExecutionSpace = typename InputView::execution_space; ExecutionSpace space; ArborX::exclusivePrefixSum(space, offset); - auto const n_results = KokkosBlah::lastElement(space, offset); + auto const n_results = KokkosExt::lastElement(space, offset); OutputView indices("indices", n_results); for (int i = 0; i < n_queries; ++i) for (int j = offset(i); j < offset(i + 1); ++j) @@ -217,8 +218,9 @@ template performQueries(ParallelRTree const &rtree, InputView const &queries) { - static_assert( - ArborX::Details::KokkosExt::is_accessible_from_host::value); + namespace KokkosExt = ArborX::Details::KokkosExt; + + static_assert(KokkosExt::is_accessible_from_host::value); using Value = typename ParallelRTree::value_type; auto const n_queries = queries.extent_int(0); OutputView2 offset("offset", n_queries + 1); @@ -229,7 +231,7 @@ performQueries(ParallelRTree const &rtree, InputView const &queries) using ExecutionSpace = typename InputView::execution_space; ExecutionSpace space; ArborX::exclusivePrefixSum(space, offset); - auto const n_results = KokkosBlah::lastElement(space, offset); + auto const n_results = KokkosExt::lastElement(space, offset); OutputView1 values("values", n_results); for (int i = 0; i < n_queries; ++i) for (int j = offset(i); j < offset(i + 1); ++j) diff --git a/test/tstDendrogram.cpp b/test/tstDendrogram.cpp index 6b0342be0..c660314ea 100644 --- a/test/tstDendrogram.cpp +++ b/test/tstDendrogram.cpp @@ -126,9 +126,9 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(dendrogram_boruvka, DeviceType, // Because the dendrogram in the MST is permuted, we need to reorder it in the // increasing edge order to compare with union-find - auto parents_boruvka_device = KokkosBlah::cloneWithoutInitializingNorCopying( + auto parents_boruvka_device = KokkosExt::cloneWithoutInitializingNorCopying( space, mst.dendrogram_parents); - auto heights_boruvka_device = KokkosBlah::cloneWithoutInitializingNorCopying( + auto heights_boruvka_device = KokkosExt::cloneWithoutInitializingNorCopying( space, mst.dendrogram_parent_heights); { Kokkos::View weights( diff --git a/test/tstDetailsCrsGraphWrapperImpl.cpp b/test/tstDetailsCrsGraphWrapperImpl.cpp index 56a3a1465..e948c8eb8 100644 --- a/test/tstDetailsCrsGraphWrapperImpl.cpp +++ b/test/tstDetailsCrsGraphWrapperImpl.cpp @@ -70,7 +70,8 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(query_impl, DeviceType, ARBORX_DEVICE_TYPES) ArborX::iota(space, permute); ArborX::exclusivePrefixSum(space, offset); - Kokkos::realloc(indices, KokkosBlah::lastElement(space, offset)); + Kokkos::realloc(indices, + ArborX::Details::KokkosExt::lastElement(space, offset)); ArborX::Details::CrsGraphWrapperImpl::queryImpl( space, Test1{}, predicates, ArborX::Details::DefaultCallback{}, indices, offset, permute, ArborX::Details::BufferStatus::PreallocationHard); diff --git a/test/tstDetailsKokkosExtViewHelpers.cpp b/test/tstDetailsKokkosExtViewHelpers.cpp index 749f9e2cf..11dca7dfb 100644 --- a/test/tstDetailsKokkosExtViewHelpers.cpp +++ b/test/tstDetailsKokkosExtViewHelpers.cpp @@ -18,13 +18,13 @@ #include "BoostTest_CUDA_clang_workarounds.hpp" #include -#define BOOST_TEST_MODULE KokkosBlahViewHelpers +#define BOOST_TEST_MODULE KokkosExtViewHelpers namespace tt = boost::test_tools; BOOST_AUTO_TEST_CASE_TEMPLATE(last_element, DeviceType, ARBORX_DEVICE_TYPES) { - using KokkosBlah::lastElement; + using ArborX::Details::KokkosExt::lastElement; using ExecutionSpace = typename DeviceType::execution_space; ExecutionSpace execution_space; Kokkos::View v("v", 2); diff --git a/test/tstQueryTreeDegenerate.cpp b/test/tstQueryTreeDegenerate.cpp index 3bfb5d093..74c193df2 100644 --- a/test/tstQueryTreeDegenerate.cpp +++ b/test/tstQueryTreeDegenerate.cpp @@ -366,7 +366,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(not_exceeding_stack_capacity_spatial_predicate, {{{0., 0., 0.}}, {{n, n, n}}}, }), indices, offset)); - BOOST_TEST(KokkosBlah::lastElement(space, offset) == n); + BOOST_TEST(ArborX::Details::KokkosExt::lastElement(space, offset) == n); } #ifndef ARBORX_TEST_DISABLE_NEAREST_QUERY @@ -398,7 +398,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(not_exceeding_stack_capacity_nearest_predicate, {{{0., 0., 0.}}, n}, }), indices, offset)); - BOOST_TEST(KokkosBlah::lastElement(space, offset) == n); + BOOST_TEST(ArborX::Details::KokkosExt::lastElement(space, offset) == n); } #endif diff --git a/test/tstQueryTreeTraversalPolicy.cpp b/test/tstQueryTreeTraversalPolicy.cpp index 4a6c8085b..771857364 100644 --- a/test/tstQueryTreeTraversalPolicy.cpp +++ b/test/tstQueryTreeTraversalPolicy.cpp @@ -66,8 +66,8 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(buffer_optimization, DeviceType, checkResultsAreFine(); // compute number of results per query - auto counts = - KokkosBlah::cloneWithoutInitializingNorCopying(ExecutionSpace{}, offset); + auto counts = ArborX::Details::KokkosExt::cloneWithoutInitializingNorCopying( + ExecutionSpace{}, offset); ArborX::adjacentDifference(ExecutionSpace{}, offset, counts); // extract optimal buffer size auto const max_results_per_query = ArborX::max(ExecutionSpace{}, counts);