diff --git a/benchmarks/dbscan/ArborX_DBSCANVerification.hpp b/benchmarks/dbscan/ArborX_DBSCANVerification.hpp index 5d2128ad7..b63fd1dbc 100644 --- a/benchmarks/dbscan/ArborX_DBSCANVerification.hpp +++ b/benchmarks/dbscan/ArborX_DBSCANVerification.hpp @@ -40,7 +40,7 @@ bool verifyCorePointsNonnegativeIndex(ExecutionSpace const &exec_space, int num_incorrect; Kokkos::parallel_reduce( "ArborX::DBSCAN::verify_core_points_nonnegative", - Kokkos::RangePolicy(exec_space, 0, n), + Kokkos::RangePolicy(exec_space, 0, n), KOKKOS_LAMBDA(int i, int &update) { bool self_is_core_point = (offset(i + 1) - offset(i) >= core_min_size); if (self_is_core_point && labels(i) < 0) @@ -66,7 +66,7 @@ bool verifyConnectedCorePointsShareIndex(ExecutionSpace const &exec_space, int num_incorrect; Kokkos::parallel_reduce( "ArborX::DBSCAN::verify_connected_core_points", - Kokkos::RangePolicy(exec_space, 0, n), + Kokkos::RangePolicy(exec_space, 0, n), KOKKOS_LAMBDA(int i, int &update) { bool self_is_core_point = (offset(i + 1) - offset(i) >= core_min_size); if (self_is_core_point) @@ -105,7 +105,7 @@ bool verifyBorderAndNoisePoints(ExecutionSpace const &exec_space, int num_incorrect; Kokkos::parallel_reduce( "ArborX::DBSCAN::verify_connected_border_points", - Kokkos::RangePolicy(exec_space, 0, n), + Kokkos::RangePolicy(exec_space, 0, n), KOKKOS_LAMBDA(int i, int &update) { bool self_is_core_point = (offset(i + 1) - offset(i) >= core_min_size); if (!self_is_core_point) diff --git a/benchmarks/dbscan/dbscan_timpl.hpp b/benchmarks/dbscan/dbscan_timpl.hpp index 577d7f9e0..d3d6f5678 100644 --- a/benchmarks/dbscan/dbscan_timpl.hpp +++ b/benchmarks/dbscan/dbscan_timpl.hpp @@ -78,8 +78,7 @@ void sortAndFilterClusters(ExecutionSpace const &exec_space, "ArborX::DBSCAN::cluster_sizes", n); Kokkos::parallel_for( "ArborX::DBSCAN::compute_cluster_sizes", - Kokkos::RangePolicy(exec_space, 0, n), - KOKKOS_LAMBDA(int const i) { + Kokkos::RangePolicy(exec_space, 0, n), KOKKOS_LAMBDA(int const i) { // Ignore noise points if (labels(i) < 0) return; @@ -100,7 +99,7 @@ void sortAndFilterClusters(ExecutionSpace const &exec_space, KokkosExt::reallocWithoutInitializing(exec_space, cluster_offset, n + 1); Kokkos::parallel_scan( "ArborX::DBSCAN::compute_cluster_offset_with_filter", - Kokkos::RangePolicy(exec_space, 0, n), + Kokkos::RangePolicy(exec_space, 0, n), KOKKOS_LAMBDA(int const i, int &update, bool final_pass) { bool is_cluster_too_small = (cluster_sizes(i) < cluster_min_size); if (!is_cluster_too_small) @@ -128,8 +127,7 @@ void sortAndFilterClusters(ExecutionSpace const &exec_space, KokkosExt::lastElement(exec_space, cluster_offset)); Kokkos::parallel_for( "ArborX::DBSCAN::compute_cluster_indices", - Kokkos::RangePolicy(exec_space, 0, n), - KOKKOS_LAMBDA(int const i) { + Kokkos::RangePolicy(exec_space, 0, n), KOKKOS_LAMBDA(int const i) { // Ignore noise points if (labels(i) < 0) return; diff --git a/benchmarks/develop/develop.cpp b/benchmarks/develop/develop.cpp index 37fd188a0..8edfe7dca 100644 --- a/benchmarks/develop/develop.cpp +++ b/benchmarks/develop/develop.cpp @@ -30,8 +30,7 @@ void BM_benchmark(benchmark::State &state) { // This code gets timed Kokkos::parallel_for( - "Benchmark::iota", - Kokkos::RangePolicy(exec_space, 0, n), + "Benchmark::iota", Kokkos::RangePolicy(exec_space, 0, n), KOKKOS_LAMBDA(int i) { view(i) = i; }); exec_space.fence(); } diff --git a/benchmarks/execution_space_instances/execution_space_instances_driver.cpp b/benchmarks/execution_space_instances/execution_space_instances_driver.cpp index d83a5575d..0c80cc9dc 100644 --- a/benchmarks/execution_space_instances/execution_space_instances_driver.cpp +++ b/benchmarks/execution_space_instances/execution_space_instances_driver.cpp @@ -173,8 +173,8 @@ int main(int argc, char *argv[]) Kokkos::subview(points, Kokkos::make_pair(0, num_primitives))); Kokkos::parallel_for( "Benchmark::construct_predicates", - Kokkos::RangePolicy( - ExecutionSpace{}, p * num_predicates, (p + 1) * num_predicates), + Kokkos::RangePolicy(ExecutionSpace{}, p * num_predicates, + (p + 1) * num_predicates), KOKKOS_LAMBDA(int i) { predicates(i) = ArborX::attach( ArborX::intersects(Sphere{points(i - p * num_predicates), r}), i); diff --git a/benchmarks/triangulated_surface_distance/generator.hpp b/benchmarks/triangulated_surface_distance/generator.hpp index 1b46a0a57..4ba6c8a8e 100644 --- a/benchmarks/triangulated_surface_distance/generator.hpp +++ b/benchmarks/triangulated_surface_distance/generator.hpp @@ -117,8 +117,7 @@ void convertTriangles2VertexForm( { int const num_triangles = triangles.size(); Kokkos::parallel_for( - "Benchmark::to_vertex_form", - Kokkos::RangePolicy(space, 0, num_triangles), + "Benchmark::to_vertex_form", Kokkos::RangePolicy(space, 0, num_triangles), KOKKOS_LAMBDA(int i) { auto const &e0 = edges(triangles(i)[0]); auto const &e1 = edges(triangles(i)[1]); @@ -160,8 +159,7 @@ void subdivide(ExecutionSpace const &space, "Benchmark::edges"), 2 * num_edges + 3 * num_triangles); Kokkos::parallel_for( - "Benchmark::split_edges", - Kokkos::RangePolicy(space, 0, num_edges), + "Benchmark::split_edges", Kokkos::RangePolicy(space, 0, num_edges), KOKKOS_LAMBDA(int i) { int v = edges(i)[0]; int w = edges(i)[1]; @@ -180,8 +178,7 @@ void subdivide(ExecutionSpace const &space, 4 * num_triangles); Kokkos::parallel_for( "Benchmark::split_triangles", - Kokkos::RangePolicy(space, 0, num_triangles), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(space, 0, num_triangles), KOKKOS_LAMBDA(int i) { int e[3] = {triangles(i)[0], triangles(i)[1], triangles(i)[2]}; int new_edges_offset = 2 * num_edges + 3 * i; @@ -219,8 +216,7 @@ void projectVerticesToSphere( { Kokkos::parallel_for( "Benchmark::project_to_surface", - Kokkos::RangePolicy(space, 0, points.size()), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(space, 0, points.size()), KOKKOS_LAMBDA(int i) { auto &v = points(i); auto norm = std::sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); v[0] *= radius / norm; diff --git a/benchmarks/union_find/union_find.cpp b/benchmarks/union_find/union_find.cpp index 07995a356..6e3ae4a57 100644 --- a/benchmarks/union_find/union_find.cpp +++ b/benchmarks/union_find/union_find.cpp @@ -49,8 +49,7 @@ buildEdges(AllowLoops, ExecutionSpace const &exec_space, int num_edges) Kokkos::Random_XorShift1024_Pool rand_pool(1984); Kokkos::parallel_for( - "Benchmark::init_edges", - Kokkos::RangePolicy(exec_space, 0, num_edges), + "Benchmark::init_edges", Kokkos::RangePolicy(exec_space, 0, num_edges), KOKKOS_LAMBDA(unsigned i) { auto rand_gen = rand_pool.get_state(); do @@ -77,8 +76,7 @@ buildEdges(DisallowLoops, ExecutionSpace const &exec_space, int num_edges) num_edges); Kokkos::parallel_for( "Benchmark::init_random_values", - Kokkos::RangePolicy(exec_space, 0, num_edges), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(exec_space, 0, num_edges), KOKKOS_LAMBDA(int i) { auto rand_gen = rand_pool.get_state(); random_values(i) = rand_gen.rand(); rand_pool.free_state(rand_gen); @@ -91,8 +89,7 @@ buildEdges(DisallowLoops, ExecutionSpace const &exec_space, int num_edges) "Benchmark::edges"), num_edges); Kokkos::parallel_for( - "Benchmark::init_edges", - Kokkos::RangePolicy(exec_space, 0, num_edges), + "Benchmark::init_edges", Kokkos::RangePolicy(exec_space, 0, num_edges), KOKKOS_LAMBDA(unsigned i) { auto rand_gen = rand_pool.get_state(); edges(permute(i)) = {rand_gen.urand() % (i + 1), i + 1}; @@ -137,8 +134,7 @@ void BM_union_find(benchmark::State &state) Kokkos::parallel_for( "Benchmark::union-find", - Kokkos::RangePolicy(exec_space, 0, edges.size()), - KOKKOS_LAMBDA(int e) { + Kokkos::RangePolicy(exec_space, 0, edges.size()), KOKKOS_LAMBDA(int e) { int i = edges(e).source; int j = edges(e).target; diff --git a/benchmarks/utils/ArborXBenchmark_PointClouds.hpp b/benchmarks/utils/ArborXBenchmark_PointClouds.hpp index a5275e915..756355719 100644 --- a/benchmarks/utils/ArborXBenchmark_PointClouds.hpp +++ b/benchmarks/utils/ArborXBenchmark_PointClouds.hpp @@ -207,8 +207,7 @@ void generatePointCloud(ExecutionSpace const &exec, unsigned int const n = random_points.extent(0); Kokkos::parallel_for( "ArborXBenchmark::generatePointCloud::generate", - Kokkos::RangePolicy(exec, 0, n / batch_size), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(exec, 0, n / batch_size), KOKKOS_LAMBDA(int i) { auto generator = random_pool.get_state(); auto begin = i * batch_size; diff --git a/examples/access_traits/example_cuda_access_traits.cpp b/examples/access_traits/example_cuda_access_traits.cpp index 8f7ee0f5d..e323f03ac 100644 --- a/examples/access_traits/example_cuda_access_traits.cpp +++ b/examples/access_traits/example_cuda_access_traits.cpp @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) ArborX::query(bvh, cuda, Spheres{d_a, d_a, d_a, d_a, N}, indices, offset); Kokkos::parallel_for( - "Example::print_indices", Kokkos::RangePolicy(cuda, 0, N), + "Example::print_indices", Kokkos::RangePolicy(cuda, 0, N), KOKKOS_LAMBDA(int i) { for (int j = offset(i); j < offset(i + 1); ++j) { diff --git a/examples/molecular_dynamics/example_molecular_dynamics.cpp b/examples/molecular_dynamics/example_molecular_dynamics.cpp index 7e9ae8fcb..03014c969 100644 --- a/examples/molecular_dynamics/example_molecular_dynamics.cpp +++ b/examples/molecular_dynamics/example_molecular_dynamics.cpp @@ -83,8 +83,7 @@ int main(int argc, char *argv[]) n); Kokkos::parallel_for( "Example::make_particles", - Kokkos::MDRangePolicy, ExecutionSpace>( - execution_space, {0, 0, 0}, {nx, ny, nz}), + Kokkos::MDRangePolicy(execution_space, {0, 0, 0}, {nx, ny, nz}), KOKKOS_LAMBDA(int i, int j, int k) { int const id = i * ny * nz + j * nz + k; // face-centered cubic arrangement of particles @@ -104,8 +103,7 @@ int main(int argc, char *argv[]) Kokkos::parallel_for( "Example::assign_velocities", - Kokkos::RangePolicy(execution_space, 0, n), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(execution_space, 0, n), KOKKOS_LAMBDA(int i) { RandomPool::generator_type generator = random_pool.get_state(); for (int d = 0; d < 3; ++d) { @@ -130,8 +128,7 @@ int main(int argc, char *argv[]) Kokkos::View forces( Kokkos::view_alloc(execution_space, "Example::forces"), n); Kokkos::parallel_for( - "Example::compute_forces", - Kokkos::RangePolicy(execution_space, 0, n), + "Example::compute_forces", Kokkos::RangePolicy(execution_space, 0, n), KOKKOS_LAMBDA(int i) { auto const x_i = particles(i)[0]; auto const y_i = particles(i)[1]; @@ -170,7 +167,7 @@ int main(int argc, char *argv[]) float potential_energy; Kokkos::parallel_reduce( "Example::compute_potential_energy", - Kokkos::RangePolicy(execution_space, 0, n), + Kokkos::RangePolicy(execution_space, 0, n), KOKKOS_LAMBDA(int i, float &local_energy) { auto const x_i = particles(i)[0]; auto const y_i = particles(i)[1]; @@ -198,8 +195,7 @@ int main(int argc, char *argv[]) Kokkos::parallel_for( "Example::update_particles_position_and_velocity", - Kokkos::RangePolicy(execution_space, 0, n), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(execution_space, 0, n), KOKKOS_LAMBDA(int i) { auto const mass_i = 1.f; auto const dt_m = dt / mass_i; for (int d = 0; d < 3; ++d) diff --git a/examples/moving_least_squares/moving_least_squares.cpp b/examples/moving_least_squares/moving_least_squares.cpp index 2bebc1711..0614c2430 100644 --- a/examples/moving_least_squares/moving_least_squares.cpp +++ b/examples/moving_least_squares/moving_least_squares.cpp @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) Kokkos::View tgt_points("Example::tgt_points", num_targets); Kokkos::parallel_for( - "Example::make_points", Kokkos::RangePolicy(space, 0, 1), + "Example::make_points", Kokkos::RangePolicy(space, 0, 1), KOKKOS_LAMBDA(int const) { src_points(0) = {0., 0.}; src_points(1) = {1., 0.}; @@ -78,8 +78,7 @@ int main(int argc, char *argv[]) Kokkos::View ref_values("Example::ref_values", num_targets); Kokkos::parallel_for( - "Example::make_values", - Kokkos::RangePolicy(space, 0, num_sources), + "Example::make_values", Kokkos::RangePolicy(space, 0, num_sources), KOKKOS_LAMBDA(int const i) { src_values(i) = functionToApproximate(src_points(i)); if (i < num_targets) diff --git a/examples/raytracing/example_raytracing.cpp b/examples/raytracing/example_raytracing.cpp index b87a68d48..5535f2108 100644 --- a/examples/raytracing/example_raytracing.cpp +++ b/examples/raytracing/example_raytracing.cpp @@ -226,8 +226,7 @@ int main(int argc, char *argv[]) num_boxes); Kokkos::parallel_for( "Example::initialize_boxes", - Kokkos::MDRangePolicy, ExecutionSpace>( - exec_space, {0, 0, 0}, {nx, ny, nz}), + Kokkos::MDRangePolicy(exec_space, {0, 0, 0}, {nx, ny, nz}), KOKKOS_LAMBDA(int i, int j, int k) { int const box_id = i + nx * j + nx * ny * k; boxes(box_id) = {{i * dx, j * dy, k * dz}, @@ -248,8 +247,7 @@ int main(int argc, char *argv[]) Kokkos::parallel_for( "Example::initialize_rays", - Kokkos::MDRangePolicy, ExecutionSpace>( - exec_space, {0, 0}, {num_boxes, rays_per_box}), + Kokkos::MDRangePolicy(exec_space, {0, 0}, {num_boxes, rays_per_box}), KOKKOS_LAMBDA(size_t const i, size_t const j) { // The origins of rays are uniformly distributed in the boxes. The // direction vectors are uniformly sampling of a full sphere. @@ -326,7 +324,7 @@ int main(int argc, char *argv[]) values.size()); Kokkos::parallel_for( "Example::copy sort_array", - Kokkos::RangePolicy(exec_space, 0, values.size()), + Kokkos::RangePolicy(exec_space, 0, values.size()), KOKKOS_LAMBDA(int i) { sort_array(i) = values(i); }); Kokkos::Profiling::pushRegion("Example::sorting by key"); // FIXME Users should not need to reach into the Details namespace. @@ -355,8 +353,7 @@ int main(int argc, char *argv[]) "Example::energy_intersects", num_boxes); Kokkos::parallel_for( "Example::deposit_energy", - Kokkos::RangePolicy(exec_space, 0, - rays_per_box * num_boxes), + Kokkos::RangePolicy(exec_space, 0, rays_per_box * num_boxes), KOKKOS_LAMBDA(int i) { float ray_energy = (total_energy * dx * dy * dz) / rays_per_box; for (int j = offsets(i); j < offsets(i + 1); ++j) @@ -377,8 +374,7 @@ int main(int argc, char *argv[]) int n_errors; float rel_tol = 1.e-5; Kokkos::parallel_reduce( - "Example::compare", - Kokkos::RangePolicy(exec_space, 0, num_boxes), + "Example::compare", Kokkos::RangePolicy(exec_space, 0, num_boxes), KOKKOS_LAMBDA(int i, int &error) { using Kokkos::fabs; float const abs_error = diff --git a/examples/viz/tree_visualization.cpp b/examples/viz/tree_visualization.cpp index a73007719..36b53537b 100644 --- a/examples/viz/tree_visualization.cpp +++ b/examples/viz/tree_visualization.cpp @@ -117,7 +117,8 @@ void viz(std::string const &prefix, std::string const &infile, int n_neighbors) n_queries); Kokkos::parallel_for( "Example::inititialize_queries", - Kokkos::RangePolicy(0, n_queries), KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(ExecutionSpace{}, 0, n_queries), + KOKKOS_LAMBDA(int i) { queries(i) = ArborX::nearest(points(i), n_neighbors); }); diff --git a/src/ArborX_DBSCAN.hpp b/src/ArborX_DBSCAN.hpp index 3762b631b..c9dea6c3f 100644 --- a/src/ArborX_DBSCAN.hpp +++ b/src/ArborX_DBSCAN.hpp @@ -406,8 +406,7 @@ dbscan(ExecutionSpace const &exec_space, Primitives const &primitives, // automatically core points Kokkos::parallel_for( "ArborX::DBSCAN::mark_dense_cells_core_points", - Kokkos::RangePolicy(exec_space, 0, - num_points_in_dense_cells), + Kokkos::RangePolicy(exec_space, 0, num_points_in_dense_cells), KOKKOS_LAMBDA(int i) { num_neigh(permute(i)) = INT_MAX; }); // Count neighbors for points in sparse cells auto sparse_permute = Kokkos::subview( @@ -449,8 +448,7 @@ dbscan(ExecutionSpace const &exec_space, Primitives const &primitives, Kokkos::View cluster_sizes( Kokkos::view_alloc(exec_space, "ArborX::DBSCAN::cluster_sizes"), n); Kokkos::parallel_for( - "ArborX::DBSCAN::finalize_labels", - Kokkos::RangePolicy(exec_space, 0, n), + "ArborX::DBSCAN::finalize_labels", Kokkos::RangePolicy(exec_space, 0, n), KOKKOS_LAMBDA(int const i) { // ##### ECL license (see LICENSE.ECL) ##### int next; @@ -474,8 +472,7 @@ dbscan(ExecutionSpace const &exec_space, Primitives const &primitives, // - DBSCANCorePoints cannot be used either as num_neigh is not initialized // in the special case. Kokkos::parallel_for( - "ArborX::DBSCAN::mark_noise", - Kokkos::RangePolicy(exec_space, 0, n), + "ArborX::DBSCAN::mark_noise", Kokkos::RangePolicy(exec_space, 0, n), KOKKOS_LAMBDA(int const i) { if (cluster_sizes(labels(i)) == 1) labels(i) = -1; @@ -485,8 +482,7 @@ dbscan(ExecutionSpace const &exec_space, Primitives const &primitives, { Details::DBSCANCorePoints is_core{num_neigh, core_min_size}; Kokkos::parallel_for( - "ArborX::DBSCAN::mark_noise", - Kokkos::RangePolicy(exec_space, 0, n), + "ArborX::DBSCAN::mark_noise", Kokkos::RangePolicy(exec_space, 0, n), KOKKOS_LAMBDA(int const i) { if (cluster_sizes(labels(i)) == 1 && !is_core(i)) labels(i) = -1; diff --git a/src/details/ArborX_Dendrogram.hpp b/src/details/ArborX_Dendrogram.hpp index 42ccf5ffe..34228691e 100644 --- a/src/details/ArborX_Dendrogram.hpp +++ b/src/details/ArborX_Dendrogram.hpp @@ -87,7 +87,7 @@ struct Dendrogram { Kokkos::parallel_for( "ArborX::Dendrogram::copy_weights_and_edges", - Kokkos::RangePolicy(exec_space, 0, edges.size()), + Kokkos::RangePolicy(exec_space, 0, edges.size()), KOKKOS_LAMBDA(int const e) { weights(e) = edges(e).weight; unweighted_edges(e) = {edges(e).source, edges(e).target}; diff --git a/src/details/ArborX_DetailsBatchedQueries.hpp b/src/details/ArborX_DetailsBatchedQueries.hpp index dd3a5826b..6c4b07f5d 100644 --- a/src/details/ArborX_DetailsBatchedQueries.hpp +++ b/src/details/ArborX_DetailsBatchedQueries.hpp @@ -61,8 +61,7 @@ struct BatchedQueries n_queries); Kokkos::parallel_for( "ArborX::BatchedQueries::project_predicates_onto_space_filling_curve", - Kokkos::RangePolicy(space, 0, n_queries), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(space, 0, n_queries), KOKKOS_LAMBDA(int i) { linear_ordering_indices(i) = curve( scene_bounding_box, returnCentroid(getGeometry(predicates(i)))); }); @@ -89,7 +88,7 @@ struct BatchedQueries n); Kokkos::parallel_for( "ArborX::BatchedQueries::permute_entries", - Kokkos::RangePolicy(space, 0, n), + Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i) { w(i) = v(permute(i)); }); return w; diff --git a/src/details/ArborX_DetailsBruteForceImpl.hpp b/src/details/ArborX_DetailsBruteForceImpl.hpp index c8f46348d..5abcac0e0 100644 --- a/src/details/ArborX_DetailsBruteForceImpl.hpp +++ b/src/details/ArborX_DetailsBruteForceImpl.hpp @@ -38,7 +38,7 @@ struct BruteForceImpl Kokkos::parallel_reduce( "ArborX::BruteForce::BruteForce::" "initialize_values_and_reduce_bounds", - Kokkos::RangePolicy(space, 0, values.size()), + Kokkos::RangePolicy(space, 0, values.size()), KOKKOS_LAMBDA(int i, Bounds &update) { using Details::expand; nodes(i) = values(i); @@ -158,8 +158,7 @@ struct BruteForceImpl Kokkos::parallel_for( "ArborX::BruteForce::query::nearest::" "check_all_predicates_against_all_indexables", - Kokkos::RangePolicy(space, 0, n_predicates), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(space, 0, n_predicates), KOKKOS_LAMBDA(int i) { auto const &predicate = predicates(i); auto const k = getK(predicate); auto const buffer = buffer_provider(i); diff --git a/src/details/ArborX_DetailsCrsGraphWrapperImpl.hpp b/src/details/ArborX_DetailsCrsGraphWrapperImpl.hpp index 9f961301e..3281cf924 100644 --- a/src/details/ArborX_DetailsCrsGraphWrapperImpl.hpp +++ b/src/details/ArborX_DetailsCrsGraphWrapperImpl.hpp @@ -156,7 +156,7 @@ void queryImpl(ExecutionSpace const &space, Tree const &tree, int overflow_int; Kokkos::parallel_reduce( "ArborX::CrsGraphWrapper::compute_overflow", - Kokkos::RangePolicy(space, 0, n_queries), + Kokkos::RangePolicy(space, 0, n_queries), KOKKOS_LAMBDA(int i, int &update) { auto const *const offset_ptr = &permuted_offset(i); if (counts(i) > *(offset_ptr + 1) - *offset_ptr) @@ -170,7 +170,7 @@ void queryImpl(ExecutionSpace const &space, Tree const &tree, int n_results; Kokkos::parallel_reduce( "ArborX::CrsGraphWrapper::compute_underflow", - Kokkos::RangePolicy(space, 0, n_queries), + Kokkos::RangePolicy(space, 0, n_queries), KOKKOS_LAMBDA(int i, int &update) { update += counts(i); }, n_results); underflow = (n_results < out.extent_int(0)); @@ -203,7 +203,7 @@ void queryImpl(ExecutionSpace const &space, Tree const &tree, Kokkos::parallel_for( "ArborX::CrsGraphWrapper::copy_counts_to_offsets", - Kokkos::RangePolicy(space, 0, n_queries), + Kokkos::RangePolicy(space, 0, n_queries), KOKKOS_LAMBDA(int const i) { permuted_offset(i) = counts(i); }); KokkosExt::exclusive_scan(space, offset, offset, 0); @@ -236,7 +236,7 @@ void queryImpl(ExecutionSpace const &space, Tree const &tree, Kokkos::parallel_for( "ArborX::CrsGraphWrapper::copy_offsets_to_counts", - Kokkos::RangePolicy(space, 0, n_queries), + Kokkos::RangePolicy(space, 0, n_queries), KOKKOS_LAMBDA(int const i) { counts(i) = permuted_offset(i); }); KokkosExt::reallocWithoutInitializing(space, out, n_results); @@ -261,8 +261,7 @@ void queryImpl(ExecutionSpace const &space, Tree const &tree, Kokkos::parallel_for( "ArborX::CrsGraphWrapper::copy_valid_values", - Kokkos::RangePolicy(space, 0, n_queries), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(space, 0, n_queries), KOKKOS_LAMBDA(int i) { int count = offset(i + 1) - offset(i); for (int j = 0; j < count; ++j) { @@ -323,7 +322,7 @@ allocateAndInitializeStorage(Tag, ExecutionSpace const &space, Kokkos::parallel_for( "ArborX::CrsGraphWrapper::query::nearest::" "scan_queries_for_numbers_of_nearest_neighbors", - Kokkos::RangePolicy(space, 0, n_queries), + Kokkos::RangePolicy(space, 0, n_queries), KOKKOS_LAMBDA(int i) { offset(i) = getK(predicates(i)); }); KokkosExt::exclusive_scan(space, offset, offset, 0); diff --git a/src/details/ArborX_DetailsDistributedTreeNearest.hpp b/src/details/ArborX_DetailsDistributedTreeNearest.hpp index b25ac9870..241584376 100644 --- a/src/details/ArborX_DetailsDistributedTreeNearest.hpp +++ b/src/details/ArborX_DetailsDistributedTreeNearest.hpp @@ -65,8 +65,7 @@ void DistributedTreeImpl::phaseI(ExecutionSpace const &space, Tree const &tree, Kokkos::parallel_for( "ArborX::DistributedTree::query::nearest::" "bottom_trees_with_required_cumulated_leaves_count", - Kokkos::RangePolicy(space, 0, n_predicates), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(space, 0, n_predicates), KOKKOS_LAMBDA(int i) { int leaves_count = 0; int const n_nearest_neighbors = getK(predicates(i)); for (int j = offset(i); j < offset(i + 1); ++j) @@ -88,8 +87,7 @@ void DistributedTreeImpl::phaseI(ExecutionSpace const &space, Tree const &tree, KokkosExt::lastElement(space, new_offset)); Kokkos::parallel_for( prefix + "::truncate_before_forwarding", - Kokkos::RangePolicy(space, 0, n_predicates), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(space, 0, n_predicates), KOKKOS_LAMBDA(int i) { for (int j = 0; j < new_offset(i + 1) - new_offset(i); ++j) new_nearest_ranks(new_offset(i) + j) = nearest_ranks(offset(i) + j); }); @@ -111,8 +109,7 @@ void DistributedTreeImpl::phaseI(ExecutionSpace const &space, Tree const &tree, // Postprocess distances to find the k-th farthest Kokkos::parallel_for( prefix + "::compute_farthest_distances", - Kokkos::RangePolicy(space, 0, predicates.size()), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(space, 0, predicates.size()), KOKKOS_LAMBDA(int i) { auto const num_distances = offset(i + 1) - offset(i); if (num_distances == 0) return; @@ -162,8 +159,8 @@ void DistributedTreeImpl::phaseII(ExecutionSpace const &space, Tree const &tree, KokkosExt::reallocWithoutInitializing(space, values, n); KokkosExt::reallocWithoutInitializing(space, distances, n); Kokkos::parallel_for( - prefix + "::split_index_distance_pairs", - Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i) { + prefix + "::split_index_distance_pairs", Kokkos::RangePolicy(space, 0, n), + KOKKOS_LAMBDA(int i) { values(i) = out(i).value; distances(i) = out(i).distance; }); diff --git a/src/details/ArborX_DetailsDistributedTreeUtils.hpp b/src/details/ArborX_DetailsDistributedTreeUtils.hpp index 4bf31a3aa..512d0333e 100644 --- a/src/details/ArborX_DetailsDistributedTreeUtils.hpp +++ b/src/details/ArborX_DetailsDistributedTreeUtils.hpp @@ -38,7 +38,7 @@ void countResults(ExecutionSpace const &space, int n_queries, Kokkos::parallel_for( "ArborX::DistributedTree::query::count_results_per_query", - Kokkos::RangePolicy(space, 0, nnz), KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(space, 0, nnz), KOKKOS_LAMBDA(int i) { Kokkos::atomic_increment(&offset(query_ids(i))); }); @@ -75,8 +75,7 @@ void forwardQueries(MPI_Comm comm, ExecutionSpace const &space, n_exports); Kokkos::parallel_for( prefix + "::forward_queries_fill_buffer", - Kokkos::RangePolicy(space, 0, n_queries), - KOKKOS_LAMBDA(int q) { + Kokkos::RangePolicy(space, 0, n_queries), KOKKOS_LAMBDA(int q) { for (int i = offset(q); i < offset(q + 1); ++i) export_queries(i) = queries(q); }); @@ -103,8 +102,7 @@ void forwardQueries(MPI_Comm comm, ExecutionSpace const &space, n_exports); Kokkos::parallel_for( prefix + "::forward_queries_fill_ids", - Kokkos::RangePolicy(space, 0, n_queries), - KOKKOS_LAMBDA(int q) { + Kokkos::RangePolicy(space, 0, n_queries), KOKKOS_LAMBDA(int q) { for (int i = offset(q); i < offset(q + 1); ++i) export_ids(i) = q; }); @@ -139,8 +137,7 @@ void forwardQueries(MPI_Comm comm, ExecutionSpace const &space, n_exports); Kokkos::parallel_for( prefix + "::forward_queries_fill_buffer", - Kokkos::RangePolicy(space, 0, queries.size()), - KOKKOS_LAMBDA(int q) { + Kokkos::RangePolicy(space, 0, queries.size()), KOKKOS_LAMBDA(int q) { for (int i = offset(q); i < offset(q + 1); ++i) export_queries(i) = queries(q); }); @@ -197,8 +194,7 @@ void communicateResultsBack(MPI_Comm comm, ExecutionSpace const &space, n_exports); Kokkos::parallel_for( "ArborX::DistributedTree::query::fill_buffer", - Kokkos::RangePolicy(space, 0, n_fwd_queries), - KOKKOS_LAMBDA(int q) { + Kokkos::RangePolicy(space, 0, n_fwd_queries), KOKKOS_LAMBDA(int q) { for (int i = offset(q); i < offset(q + 1); ++i) { export_ids(i) = ids(q); @@ -281,8 +277,7 @@ void filterResults(ExecutionSpace const &space, Predicates const &queries, Kokkos::parallel_for( "ArborX::DistributedTree::query::discard_results", - Kokkos::RangePolicy(space, 0, n_queries), - KOKKOS_LAMBDA(int q) { + Kokkos::RangePolicy(space, 0, n_queries), KOKKOS_LAMBDA(int q) { using Kokkos::min; new_offset(q) = min(offset(q + 1) - offset(q), getK(queries(q))); }); @@ -316,8 +311,7 @@ void filterResults(ExecutionSpace const &space, Predicates const &queries, Kokkos::parallel_for( "ArborX::DistributedTree::query::truncate_results", - Kokkos::RangePolicy(space, 0, n_queries), - KOKKOS_LAMBDA(int q) { + Kokkos::RangePolicy(space, 0, n_queries), KOKKOS_LAMBDA(int q) { if (offset(q) == offset(q + 1)) return; diff --git a/src/details/ArborX_DetailsDistributor.hpp b/src/details/ArborX_DetailsDistributor.hpp index 459c61ad9..c90685a12 100644 --- a/src/details/ArborX_DetailsDistributor.hpp +++ b/src/details/ArborX_DetailsDistributor.hpp @@ -80,7 +80,7 @@ determineBufferLayout(ExecutionSpace const &space, InputView batched_ranks, int n_unique_ranks; Kokkos::parallel_scan( "ArborX::Distributor::compact_offsets_and_ranks", - Kokkos::RangePolicy(space, 0, n_batched_ranks), + Kokkos::RangePolicy(space, 0, n_batched_ranks), KOKKOS_LAMBDA(unsigned int i, int &update, bool last_pass) { if (i == batched_ranks.size() - 1 || batched_ranks(i + 1) != batched_ranks(i)) @@ -175,7 +175,7 @@ static void sortAndDetermineBufferLayout(ExecutionSpace const &space, int result = 0; Kokkos::parallel_scan( "ArborX::Distributor::process_biggest_rank_items", - Kokkos::RangePolicy(space, 0, n), + Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i, int &update, bool last_pass) { bool const is_largest_rank = (device_ranks_duplicate(i) == largest_rank); diff --git a/src/details/ArborX_DetailsExpandHalfToFull.hpp b/src/details/ArborX_DetailsExpandHalfToFull.hpp index 10cf9e413..2b945c477 100644 --- a/src/details/ArborX_DetailsExpandHalfToFull.hpp +++ b/src/details/ArborX_DetailsExpandHalfToFull.hpp @@ -33,7 +33,7 @@ void expandHalfToFull(ExecutionSpace const &space, Offsets &offsets, Kokkos::deep_copy(space, offsets, 0); Kokkos::parallel_for( "ArborX::Experimental::HalfToFull::count", - Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i) { for (int j = offsets_orig(i); j < offsets_orig(i + 1); ++j) { int const k = indices_orig(j); diff --git a/src/details/ArborX_DetailsFDBSCANDenseBox.hpp b/src/details/ArborX_DetailsFDBSCANDenseBox.hpp index 5dae2e26d..54da9abd4 100644 --- a/src/details/ArborX_DetailsFDBSCANDenseBox.hpp +++ b/src/details/ArborX_DetailsFDBSCANDenseBox.hpp @@ -200,8 +200,7 @@ computeCellIndices(ExecutionSpace const &exec_space, n); Kokkos::parallel_for( "ArborX::DBSCAN::compute_cell_indices", - Kokkos::RangePolicy(exec_space, 0, n), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(exec_space, 0, n), KOKKOS_LAMBDA(int i) { auto const &xyz = primitives(i); cell_indices(i) = grid.cellIndex(xyz); }); @@ -226,7 +225,7 @@ int reorderDenseAndSparseCells(ExecutionSpace const &exec_space, int num_points_in_dense_cells; Kokkos::parallel_reduce( "ArborX::DBSCAN::count_points_in_dense_cells", - Kokkos::RangePolicy(exec_space, 0, num_nonempty_cells), + Kokkos::RangePolicy(exec_space, 0, num_nonempty_cells), KOKKOS_LAMBDA(int i, int &update) { int num_points_in_cell = cell_offsets(i + 1) - cell_offsets(i); if (num_points_in_cell >= core_min_size) @@ -248,7 +247,7 @@ int reorderDenseAndSparseCells(ExecutionSpace const &exec_space, exec_space, sorted_cell_indices); Kokkos::parallel_for( "ArborX::DBSCAN::reorder_cell_indices_and_permutation", - Kokkos::RangePolicy(exec_space, 0, num_nonempty_cells), + Kokkos::RangePolicy(exec_space, 0, num_nonempty_cells), KOKKOS_LAMBDA(int i) { auto const num_points_in_cell = cell_offsets(i + 1) - cell_offsets(i); bool const is_dense_cell = (num_points_in_cell >= core_min_size); @@ -287,8 +286,7 @@ void unionFindWithinEachDenseCell(ExecutionSpace const &exec_space, // dense cell, which would have required a linear scan. Kokkos::parallel_for( "ArborX::DBSCAN::union_find_within_each_dense_box", - Kokkos::RangePolicy(exec_space, 1, n), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(exec_space, 1, n), KOKKOS_LAMBDA(int i) { if (sorted_dense_cell_indices(i) == sorted_dense_cell_indices(i - 1)) union_find.merge(permute(i), permute(i - 1)); }); diff --git a/src/details/ArborX_DetailsHalfTraversal.hpp b/src/details/ArborX_DetailsHalfTraversal.hpp index de9e51f61..5c0b6eca0 100644 --- a/src/details/ArborX_DetailsHalfTraversal.hpp +++ b/src/details/ArborX_DetailsHalfTraversal.hpp @@ -44,9 +44,8 @@ struct HalfTraversal } else { - Kokkos::parallel_for( - "ArborX::Experimental::HalfTraversal", - Kokkos::RangePolicy(space, 0, _bvh.size()), *this); + Kokkos::parallel_for("ArborX::Experimental::HalfTraversal", + Kokkos::RangePolicy(space, 0, _bvh.size()), *this); } } diff --git a/src/details/ArborX_DetailsMinimumSpanningTree.hpp b/src/details/ArborX_DetailsMinimumSpanningTree.hpp index b0bb014ec..1c14a36e4 100644 --- a/src/details/ArborX_DetailsMinimumSpanningTree.hpp +++ b/src/details/ArborX_DetailsMinimumSpanningTree.hpp @@ -150,8 +150,7 @@ struct FindComponentNearestNeighbors #endif { Kokkos::parallel_for("ArborX::MST::find_component_nearest_neighbors", - Kokkos::RangePolicy(space, 0, n), - *this); + Kokkos::RangePolicy(space, 0, n), *this); } } @@ -351,8 +350,8 @@ void updateLowerBounds(ExecutionSpace const &space, Labels const &labels, { auto const n = lower_bounds.extent(0); Kokkos::parallel_for( - "ArborX::MST::update_lower_bounds", - Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i) { + "ArborX::MST::update_lower_bounds", Kokkos::RangePolicy(space, 0, n), + KOKKOS_LAMBDA(int i) { using Kokkos::max; auto component = labels(i); auto const &edge = component_out_edges(component); @@ -367,8 +366,8 @@ void retrieveEdges(ExecutionSpace const &space, Labels const &labels, { auto const n = weights.extent(0); Kokkos::parallel_for( - "ArborX::MST::reset_component_edges", - Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i) { + "ArborX::MST::reset_component_edges", Kokkos::RangePolicy(space, 0, n), + KOKKOS_LAMBDA(int i) { auto const component = labels(i); if (i != component) return; @@ -382,8 +381,8 @@ void retrieveEdges(ExecutionSpace const &space, Labels const &labels, } }); Kokkos::parallel_for( - "ArborX::MST::reduce_component_edges", - Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i) { + "ArborX::MST::reduce_component_edges", Kokkos::RangePolicy(space, 0, n), + KOKKOS_LAMBDA(int i) { auto const component = labels(i); auto const component_weight = weights(component); auto const &edge = edges(i); @@ -482,8 +481,7 @@ void finalizeEdges(ExecutionSpace const &space, BVH const &bvh, int const n = bvh.size(); ARBORX_ASSERT(edges.extent_int(0) == n - 1); Kokkos::parallel_for( - "ArborX::MST::finalize_edges", - Kokkos::RangePolicy(space, 0, n - 1), + "ArborX::MST::finalize_edges", Kokkos::RangePolicy(space, 0, n - 1), KOKKOS_LAMBDA(int i) { edges(i).source = HappyTreeFriends::getValue(bvh, edges(i).source).index; @@ -504,8 +502,7 @@ void updateSidedParents(ExecutionSpace const &space, Labels const &labels, // Same as dendrogram alpha's standalone "updateSidedParents" Kokkos::parallel_for( "ArborX::MST::update_sided_parents", - Kokkos::RangePolicy(space, edges_start, edges_end), - KOKKOS_LAMBDA(int e) { + Kokkos::RangePolicy(space, edges_start, edges_end), KOKKOS_LAMBDA(int e) { auto const &edge = edges(e); // As the edge is within the same alpha vertex, labels of its vertices @@ -540,8 +537,8 @@ void assignVertexParents(ExecutionSpace const &space, Labels const &labels, int const vertices_offset = n - 1; Kokkos::parallel_for( - "ArborX::MST::compute_vertex_parents", - Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int e) { + "ArborX::MST::compute_vertex_parents", Kokkos::RangePolicy(space, 0, n), + KOKKOS_LAMBDA(int e) { auto const &edge = out_edges(e); int i = labels(edge.source()); @@ -577,8 +574,7 @@ void computeParents(ExecutionSpace const &space, Edges const &edges, Kokkos::parallel_for( "ArborX::MST::compute_sided_alpha_parents", - Kokkos::RangePolicy(space, 0, num_edges), - KOKKOS_LAMBDA(int const e) { + Kokkos::RangePolicy(space, 0, num_edges), KOKKOS_LAMBDA(int const e) { long long key = sided_parents(e); auto const &edge = edges(e); if (key <= FOLLOW_CHAIN_VALUE) @@ -638,8 +634,7 @@ void computeParents(ExecutionSpace const &space, Edges const &edges, // want to avoid. Kokkos::parallel_for( "ArborX::MST::fix_same_weight_order", - Kokkos::RangePolicy(space, 0, num_edges - 1), - KOKKOS_LAMBDA(int const i) { + Kokkos::RangePolicy(space, 0, num_edges - 1), KOKKOS_LAMBDA(int const i) { auto key = keys(i); if (i == 0 || ((keys(i - 1) >> shift) != (key >> shift))) @@ -660,8 +655,7 @@ void computeParents(ExecutionSpace const &space, Edges const &edges, }); Kokkos::parallel_for( - "ArborX::MST::compute_parents", - Kokkos::RangePolicy(space, 0, num_edges), + "ArborX::MST::compute_parents", Kokkos::RangePolicy(space, 0, num_edges), KOKKOS_LAMBDA(int const i) { int e = permute(i); if (i == num_edges - 1) @@ -708,8 +702,7 @@ void resetSharedRadii(ExecutionSpace const &space, BVH const &bvh, // typically close to each other, this should provide a reasonably low bound. auto const n = bvh.size(); Kokkos::parallel_for( - "ArborX::MST::reset_shared_radii", - Kokkos::RangePolicy(space, 0, n - 1), + "ArborX::MST::reset_shared_radii", Kokkos::RangePolicy(space, 0, n - 1), KOKKOS_LAMBDA(int i) { int const j = i + 1; auto const label_i = labels(i); diff --git a/src/details/ArborX_DetailsNearestBufferProvider.hpp b/src/details/ArborX_DetailsNearestBufferProvider.hpp index dad8ca724..6e18d9912 100644 --- a/src/details/ArborX_DetailsNearestBufferProvider.hpp +++ b/src/details/ArborX_DetailsNearestBufferProvider.hpp @@ -60,7 +60,7 @@ struct NearestBufferProvider Kokkos::parallel_for( "ArborX::NearestBufferProvider::scan_queries_for_numbers_of_neighbors", - Kokkos::RangePolicy(space, 0, n_queries), + Kokkos::RangePolicy(space, 0, n_queries), KOKKOS_CLASS_LAMBDA(int i) { _offset(i) = getK(predicates(i)); }); KokkosExt::exclusive_scan(space, _offset, _offset, 0); int const buffer_size = KokkosExt::lastElement(space, _offset); diff --git a/src/details/ArborX_DetailsSortUtils.hpp b/src/details/ArborX_DetailsSortUtils.hpp index 94a44e68f..059fb9fb9 100644 --- a/src/details/ArborX_DetailsSortUtils.hpp +++ b/src/details/ArborX_DetailsSortUtils.hpp @@ -98,7 +98,7 @@ void applyInversePermutation(ExecutionSpace const &space, Kokkos::parallel_for( "ArborX::Sorting::inverse_permute", - Kokkos::RangePolicy(space, 0, input_view.extent(0)), + Kokkos::RangePolicy(space, 0, input_view.extent(0)), KOKKOS_LAMBDA(int i) { PermuteHelper::CopyOp::copy( output_view, permutation(i), input_view, i); @@ -118,7 +118,7 @@ void applyPermutation(ExecutionSpace const &space, Kokkos::parallel_for( "ArborX::Sorting::permute", - Kokkos::RangePolicy(space, 0, input_view.extent(0)), + Kokkos::RangePolicy(space, 0, input_view.extent(0)), KOKKOS_LAMBDA(int i) { PermuteHelper::CopyOp::copy( output_view, i, input_view, permutation(i)); diff --git a/src/details/ArborX_DetailsTreeConstruction.hpp b/src/details/ArborX_DetailsTreeConstruction.hpp index 96bdfab78..83e394883 100644 --- a/src/details/ArborX_DetailsTreeConstruction.hpp +++ b/src/details/ArborX_DetailsTreeConstruction.hpp @@ -29,7 +29,7 @@ inline void calculateBoundingBoxOfTheScene(ExecutionSpace const &space, { Kokkos::parallel_reduce( "ArborX::TreeConstruction::calculate_bounding_box_of_the_scene", - Kokkos::RangePolicy(space, 0, indexables.size()), + Kokkos::RangePolicy(space, 0, indexables.size()), KOKKOS_LAMBDA(int i, Box &update) { using Details::expand; expand(update, indexables(i)); @@ -53,7 +53,7 @@ inline void projectOntoSpaceFillingCurve(ExecutionSpace const &space, Kokkos::parallel_for( "ArborX::TreeConstruction::project_primitives_onto_space_filling_curve", - Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i) { linear_ordering_indices(i) = curve(scene_bounding_box, indexables(i)); }); } @@ -74,7 +74,7 @@ initializeSingleLeafTree(ExecutionSpace const &space, Values const &values, "ArborX::BVH::getSingleLeafBounds::bounding_volume")); Kokkos::parallel_for( "ArborX::TreeConstruction::initialize_single_leaf_tree", - Kokkos::RangePolicy(space, 0, 1), KOKKOS_LAMBDA(int) { + Kokkos::RangePolicy(space, 0, 1), KOKKOS_LAMBDA(int) { leaf_nodes(0) = makeLeafNode(values(0)); BoundingVolume bv; expand(bv, indexable_getter(leaf_nodes(0).value)); @@ -121,10 +121,9 @@ class GenerateHierarchy { Kokkos::deep_copy(space, _ranges, UNTOUCHED_NODE); - Kokkos::parallel_for( - "ArborX::TreeConstruction::generate_hierarchy", - Kokkos::RangePolicy(space, 0, leaf_nodes.extent(0)), - *this); + Kokkos::parallel_for("ArborX::TreeConstruction::generate_hierarchy", + Kokkos::RangePolicy(space, 0, leaf_nodes.extent(0)), + *this); Kokkos::deep_copy( space, diff --git a/src/details/ArborX_DetailsTreeNodeLabeling.hpp b/src/details/ArborX_DetailsTreeNodeLabeling.hpp index e4f059094..858db298f 100644 --- a/src/details/ArborX_DetailsTreeNodeLabeling.hpp +++ b/src/details/ArborX_DetailsTreeNodeLabeling.hpp @@ -33,8 +33,7 @@ void findParents(ExecutionSpace const &exec_space, BVH const &bvh, Kokkos::parallel_for( "ArborX::recompute_internal_and_leaf_node_parents", - Kokkos::RangePolicy(exec_space, n, 2 * n - 1), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(exec_space, n, 2 * n - 1), KOKKOS_LAMBDA(int i) { parents(HappyTreeFriends::getLeftChild(bvh, i)) = i; parents(HappyTreeFriends::getRightChild(bvh, i)) = i; }); @@ -59,8 +58,7 @@ void reduceLabels(ExecutionSpace const &exec_space, Parents const &parents, Kokkos::deep_copy(exec_space, internal_node_labels, untouched); Kokkos::parallel_for( "ArborX::reduce_internal_node_labels", - Kokkos::RangePolicy(exec_space, 0, n), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(exec_space, 0, n), KOKKOS_LAMBDA(int i) { KOKKOS_ASSERT(labels(i) != indeterminate); KOKKOS_ASSERT(labels(i) != untouched); KOKKOS_ASSERT(parents(i) >= 0); diff --git a/src/details/ArborX_DetailsTreeTraversal.hpp b/src/details/ArborX_DetailsTreeTraversal.hpp index b924a746a..19665a9fe 100644 --- a/src/details/ArborX_DetailsTreeTraversal.hpp +++ b/src/details/ArborX_DetailsTreeTraversal.hpp @@ -154,10 +154,9 @@ struct TreeTraversal { _buffer = NearestBufferProvider(space, predicates); - Kokkos::parallel_for( - "ArborX::TreeTraversal::nearest", - Kokkos::RangePolicy(space, 0, predicates.size()), - *this); + Kokkos::parallel_for("ArborX::TreeTraversal::nearest", + Kokkos::RangePolicy(space, 0, predicates.size()), + *this); } } diff --git a/src/details/ArborX_DetailsTreeVisualization.hpp b/src/details/ArborX_DetailsTreeVisualization.hpp index 1e046ddf4..91c866d12 100644 --- a/src/details/ArborX_DetailsTreeVisualization.hpp +++ b/src/details/ArborX_DetailsTreeVisualization.hpp @@ -190,8 +190,8 @@ struct TreeVisualization "ArborX::permute"), n); Kokkos::parallel_for( - "ArborX::Viz::compute_permutation", - Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i) { + "ArborX::Viz::compute_permutation", Kokkos::RangePolicy(space, 0, n), + KOKKOS_LAMBDA(int i) { permute(HappyTreeFriends::getValue(tree, i).index) = i; }); diff --git a/src/details/ArborX_DetailsUtils.hpp b/src/details/ArborX_DetailsUtils.hpp index fbaf71fad..e0f83c2b6 100644 --- a/src/details/ArborX_DetailsUtils.hpp +++ b/src/details/ArborX_DetailsUtils.hpp @@ -36,7 +36,7 @@ void computeOffsetsInOrderedView(ExecutionSpace const &exec_space, View view, KokkosExt::reallocWithoutInitializing(exec_space, offsets, n + 1); Kokkos::parallel_scan( "ArborX::Algorithms::compute_offsets_in_sorted_view", - Kokkos::RangePolicy(exec_space, 0, n + 1), + Kokkos::RangePolicy(exec_space, 0, n + 1), KOKKOS_LAMBDA(int i, int &update, bool final_pass) { bool const is_cell_first_index = (i == 0 || i == n || view(i) != view(i - 1)); diff --git a/src/details/ArborX_MinimumSpanningTree.hpp b/src/details/ArborX_MinimumSpanningTree.hpp index f6619c8e2..6795e0561 100644 --- a/src/details/ArborX_MinimumSpanningTree.hpp +++ b/src/details/ArborX_MinimumSpanningTree.hpp @@ -283,7 +283,7 @@ struct MinimumSpanningTree n - 1); Kokkos::parallel_for( "ArborX::MST::assign_dendrogram_parent_heights", - Kokkos::RangePolicy(space, 0, n - 1), + Kokkos::RangePolicy(space, 0, n - 1), KOKKOS_CLASS_LAMBDA(int const e) { dendrogram_parent_heights(e) = edges(e).weight; }); diff --git a/src/interpolation/ArborX_InterpMovingLeastSquares.hpp b/src/interpolation/ArborX_InterpMovingLeastSquares.hpp index 1143997f6..cb0c3db76 100644 --- a/src/interpolation/ArborX_InterpMovingLeastSquares.hpp +++ b/src/interpolation/ArborX_InterpMovingLeastSquares.hpp @@ -174,7 +174,7 @@ class MovingLeastSquares Kokkos::parallel_for( "ArborX::MovingLeastSquares::target_interpolation", - Kokkos::RangePolicy(space, 0, _num_targets), + Kokkos::RangePolicy(space, 0, _num_targets), KOKKOS_CLASS_LAMBDA(int const i) { Value tmp = 0; for (int j = 0; j < _num_neighbors; j++) diff --git a/src/interpolation/details/ArborX_InterpDetailsSymmetricPseudoInverseSVD.hpp b/src/interpolation/details/ArborX_InterpDetailsSymmetricPseudoInverseSVD.hpp index 3706ecdbb..e2d4d2808 100644 --- a/src/interpolation/details/ArborX_InterpDetailsSymmetricPseudoInverseSVD.hpp +++ b/src/interpolation/details/ArborX_InterpDetailsSymmetricPseudoInverseSVD.hpp @@ -260,7 +260,7 @@ void symmetricPseudoInverseSVD(ExecutionSpace const &space, Kokkos::parallel_for( "ArborX::SymmetricPseudoInverseSVD::computations", - Kokkos::RangePolicy(space, 0, matrices.extent(0)), + Kokkos::RangePolicy(space, 0, matrices.extent(0)), KOKKOS_LAMBDA(int const i) { auto mat = Kokkos::subview(matrices, i, Kokkos::ALL, Kokkos::ALL); auto diag = Kokkos::subview(diags, i, Kokkos::ALL); diff --git a/src/kokkos_ext/ArborX_DetailsKokkosExtMinMaxReduce.hpp b/src/kokkos_ext/ArborX_DetailsKokkosExtMinMaxReduce.hpp index 50d5978a6..aa891da5d 100644 --- a/src/kokkos_ext/ArborX_DetailsKokkosExtMinMaxReduce.hpp +++ b/src/kokkos_ext/ArborX_DetailsKokkosExtMinMaxReduce.hpp @@ -40,8 +40,7 @@ minmax_reduce(ExecutionSpace const &space, ViewType const &v) ValueType min_val; ValueType max_val; Kokkos::parallel_reduce( - "ArborX::Algorithms::minmax", - Kokkos::RangePolicy(space, 0, n), + "ArborX::Algorithms::minmax", Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i, ValueType &partial_min, ValueType &partial_max) { auto const &val = v(i); if (val < partial_min) @@ -75,8 +74,7 @@ typename ViewType::non_const_value_type min_reduce(ExecutionSpace const &space, ValueType result; Kokkos::parallel_reduce( - "ArborX::Algorithms::min", - Kokkos::RangePolicy(space, 0, n), + "ArborX::Algorithms::min", Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i, ValueType &update) { if (v(i) < update) update = v(i); @@ -103,8 +101,7 @@ typename ViewType::non_const_value_type max_reduce(ExecutionSpace const &space, ValueType result; Kokkos::parallel_reduce( - "ArborX::Algorithms::max", - Kokkos::RangePolicy(space, 0, n), + "ArborX::Algorithms::max", Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i, ValueType &update) { if (v(i) > update) update = v(i); diff --git a/src/kokkos_ext/ArborX_DetailsKokkosExtStdAlgorithms.hpp b/src/kokkos_ext/ArborX_DetailsKokkosExtStdAlgorithms.hpp index 9cb64c6ab..9fd251afa 100644 --- a/src/kokkos_ext/ArborX_DetailsKokkosExtStdAlgorithms.hpp +++ b/src/kokkos_ext/ArborX_DetailsKokkosExtStdAlgorithms.hpp @@ -44,8 +44,7 @@ void iota(ExecutionSpace const &space, ViewType const &v, "iota requires a View with non-const value type"); Kokkos::parallel_for( - "ArborX::Algorithms::iota", - Kokkos::RangePolicy(space, 0, v.extent(0)), + "ArborX::Algorithms::iota", Kokkos::RangePolicy(space, 0, v.extent(0)), KOKKOS_LAMBDA(int i) { v(i) = value + (ValueType)i; }); } diff --git a/test/ArborXTest_Cloud.hpp b/test/ArborXTest_Cloud.hpp index 73c2154be..763c26690 100644 --- a/test/ArborXTest_Cloud.hpp +++ b/test/ArborXTest_Cloud.hpp @@ -38,8 +38,8 @@ make_random_cloud(ExecutionSpace const &space, int n, float Lx = 1.f, using RandomPool = Kokkos::Random_XorShift64_Pool; RandomPool random_pool(seed); Kokkos::parallel_for( - "ArborXTest::generate_random_cloud", - Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i) { + "ArborXTest::generate_random_cloud", Kokkos::RangePolicy(space, 0, n), + KOKKOS_LAMBDA(int i) { typename RandomPool::generator_type generator = random_pool.get_state(); auto const x = generator.frand(0.f, Lx); auto const y = generator.frand(0.f, Ly); diff --git a/test/tstDendrogram.cpp b/test/tstDendrogram.cpp index aa75d256e..69013e137 100644 --- a/test/tstDendrogram.cpp +++ b/test/tstDendrogram.cpp @@ -137,7 +137,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(dendrogram_boruvka, DeviceType, n - 1); Kokkos::parallel_for( "ArborX::Testing::compute_weights", - Kokkos::RangePolicy(space, 0, n - 1), + Kokkos::RangePolicy(space, 0, n - 1), KOKKOS_LAMBDA(int i) { weights(i) = mst.edges(i).weight; }); auto permute = sortObjects(space, weights); @@ -147,14 +147,12 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(dendrogram_boruvka, DeviceType, "Testing::inv_permute"), n - 1); Kokkos::parallel_for( - "Testing::compute_inv_permute", - Kokkos::RangePolicy(space, 0, n - 1), + "Testing::compute_inv_permute", Kokkos::RangePolicy(space, 0, n - 1), KOKKOS_LAMBDA(int i) { inv_permute(permute(i)) = i; }); Kokkos::parallel_for( "Testing::reorder_mst_dendrogram", - Kokkos::RangePolicy(space, 0, 2 * n - 1), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(space, 0, 2 * n - 1), KOKKOS_LAMBDA(int i) { if (i < n - 1) { // Edge @@ -220,16 +218,14 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(dendrogram_boruvka_same_weights, DeviceType, Kokkos::view_alloc(space, "Testing::count"), 2 * n - 1); Kokkos::parallel_for( - "Testing::count_children", - Kokkos::RangePolicy(space, 0, 2 * n - 1), + "Testing::count_children", Kokkos::RangePolicy(space, 0, 2 * n - 1), KOKKOS_LAMBDA(int i) { Kokkos::atomic_inc(&counts(mst.dendrogram_parents(i))); }); int wrong_counts; Kokkos::parallel_reduce( - "Testing::check_counts", - Kokkos::RangePolicy(space, 0, 2 * n - 1), + "Testing::check_counts", Kokkos::RangePolicy(space, 0, 2 * n - 1), KOKKOS_LAMBDA(int i, int &update) { bool const is_edge = (i < n - 1); int const expected_num_children = (is_edge ? 2 : 0); diff --git a/test/tstDetailsCrsGraphWrapperImpl.cpp b/test/tstDetailsCrsGraphWrapperImpl.cpp index 3abfa8785..cca1af557 100644 --- a/test/tstDetailsCrsGraphWrapperImpl.cpp +++ b/test/tstDetailsCrsGraphWrapperImpl.cpp @@ -35,7 +35,7 @@ struct Test1 using Access = ArborX::AccessTraits; Kokkos::parallel_for( - Kokkos::RangePolicy(space, 0, Access::size(predicates)), + Kokkos::RangePolicy(space, 0, Access::size(predicates)), KOKKOS_LAMBDA(int predicate_index) { for (int primitive_index = 0; primitive_index < predicate_index; ++primitive_index) diff --git a/test/tstDetailsHalfTraversal.cpp b/test/tstDetailsHalfTraversal.cpp index 43dceb4ed..2bff51683 100644 --- a/test/tstDetailsHalfTraversal.cpp +++ b/test/tstDetailsHalfTraversal.cpp @@ -29,7 +29,7 @@ make_points(ExecutionSpace const &space, int n) n); Kokkos::parallel_for( - "Test::make_points", Kokkos::RangePolicy(space, 0, n), + "Test::make_points", Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i) { points(i) = {(float)i, (float)i, (float)i}; }); diff --git a/test/tstDetailsKokkosExtKernelStdAlgorithms.cpp b/test/tstDetailsKokkosExtKernelStdAlgorithms.cpp index 5b3331ec9..0bbc9a8c1 100644 --- a/test/tstDetailsKokkosExtKernelStdAlgorithms.cpp +++ b/test/tstDetailsKokkosExtKernelStdAlgorithms.cpp @@ -52,7 +52,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(nth_element, DeviceType, ARBORX_DEVICE_TYPES) { auto v_copy = ArborX::Details::KokkosExt::clone(space, v); Kokkos::parallel_for( - Kokkos::RangePolicy(space, 0, 1), KOKKOS_LAMBDA(int) { + Kokkos::RangePolicy(space, 0, 1), KOKKOS_LAMBDA(int) { nth_element(v_copy.data(), v_copy.data() + i, v_copy.data() + n); nth(i) = v_copy(i); }); diff --git a/test/tstDetailsKokkosExtUninitializedMemoryAlgorithms.cpp b/test/tstDetailsKokkosExtUninitializedMemoryAlgorithms.cpp index a40007793..85ada6f2b 100644 --- a/test/tstDetailsKokkosExtUninitializedMemoryAlgorithms.cpp +++ b/test/tstDetailsKokkosExtUninitializedMemoryAlgorithms.cpp @@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(construct_destroy_at, DeviceType, Kokkos::View view( Kokkos::view_alloc(exec, Kokkos::WithoutInitializing, "Test::view"), n); Kokkos::parallel_for( - "Test::construct", Kokkos::RangePolicy(exec, 0, n), + "Test::construct", Kokkos::RangePolicy(exec, 0, n), KOKKOS_LAMBDA(int i) { construct_at(&view(i), i); }); auto view_host = @@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(construct_destroy_at, DeviceType, BOOST_TEST(view_host(1).value == 1); Kokkos::parallel_for( - "Test::destroy", Kokkos::RangePolicy(exec, 0, n), + "Test::destroy", Kokkos::RangePolicy(exec, 0, n), KOKKOS_LAMBDA(int i) { destroy_at(&view(i)); }); Kokkos::deep_copy(view_host, view); BOOST_TEST(view_host(0).value == -1); diff --git a/test/tstDetailsMutualReachabilityDistance.cpp b/test/tstDetailsMutualReachabilityDistance.cpp index d0a3e3ab0..82f8db406 100644 --- a/test/tstDetailsMutualReachabilityDistance.cpp +++ b/test/tstDetailsMutualReachabilityDistance.cpp @@ -73,8 +73,7 @@ auto compute_mutual_reachability_distances( distance_mutual_reach{core_distances}; Kokkos::parallel_for( "Test::compute_mutual_reachability_distances", - Kokkos::RangePolicy(exec_space, 0, n), - KOKKOS_LAMBDA(int i) { + Kokkos::RangePolicy(exec_space, 0, n), KOKKOS_LAMBDA(int i) { mutual_reachability_distances(i) = distance_mutual_reach( edges(i).first, edges(i).second, distances(i)); }); diff --git a/test/tstIndexableGetter.cpp b/test/tstIndexableGetter.cpp index fd98b4aec..4bdce5c5a 100644 --- a/test/tstIndexableGetter.cpp +++ b/test/tstIndexableGetter.cpp @@ -75,7 +75,7 @@ inline void calculateBoundingBoxOfTheScene(ExecutionSpace const &space, { Kokkos::parallel_reduce( "ArborX::TreeConstruction::calculate_bounding_box_of_the_scene", - Kokkos::RangePolicy(space, 0, indexables.size()), + Kokkos::RangePolicy(space, 0, indexables.size()), KOKKOS_LAMBDA(int i, Box &update) { expand(update, indexables(i)); }, ArborX::Details::GeometryReducer{scene_bounding_box}); } diff --git a/test/tstInterpDetailsCompactRadialBasisFunction.cpp b/test/tstInterpDetailsCompactRadialBasisFunction.cpp index 36f24a021..5f2e594a8 100644 --- a/test/tstInterpDetailsCompactRadialBasisFunction.cpp +++ b/test/tstInterpDetailsCompactRadialBasisFunction.cpp @@ -39,7 +39,7 @@ void makeCase(ES const &es, std::function const &tf, T tol = 1e-5) View eval("Testing::eval", 4 * range); Kokkos::deep_copy(es, eval, input); Kokkos::parallel_for( - "Testing::eval_crbf", Kokkos::RangePolicy(es, 0, 4 * range), + "Testing::eval_crbf", Kokkos::RangePolicy(es, 0, 4 * range), KOKKOS_LAMBDA(int const i) { eval(i) = ArborX::Interpolation::CRBF::evaluate(Point{eval(i)}, 1); diff --git a/test/tstInterpDetailsMLSCoefficients.cpp b/test/tstInterpDetailsMLSCoefficients.cpp index 60205f760..9c64f7b9f 100644 --- a/test/tstInterpDetailsMLSCoefficients.cpp +++ b/test/tstInterpDetailsMLSCoefficients.cpp @@ -32,8 +32,7 @@ interpolate(ExecutionSpace const &space, SourceValues const &source_values, num_targets); Kokkos::parallel_for( "Testing::mls_coefficients::target_interpolation", - Kokkos::RangePolicy(space, 0, num_targets), - KOKKOS_LAMBDA(int const i) { + Kokkos::RangePolicy(space, 0, num_targets), KOKKOS_LAMBDA(int const i) { double tmp = 0; for (int j = 0; j < num_neighbors; j++) tmp += coeffs(i, j) * source_values(i, j); @@ -70,8 +69,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(mls_coefficients, DeviceType, ARBORX_DEVICE_TYPES) Kokkos::View srcv0("Testing::srcv0", 3, 2); Kokkos::View tgtv0("Testing::tgtv0", 3); Kokkos::parallel_for( - "Testing::mls_coefficients::for0", - Kokkos::RangePolicy(space, 0, 3), + "Testing::mls_coefficients::for0", Kokkos::RangePolicy(space, 0, 3), KOKKOS_LAMBDA(int const i) { srcp0(i, 0) = {{2. * i}}; srcp0(i, 1) = {{2. * i + 2}}; @@ -104,8 +102,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(mls_coefficients, DeviceType, ARBORX_DEVICE_TYPES) Kokkos::View srcv1("Testing::srcv1", 4, 8); Kokkos::View tgtv1("Testing::tgtv1", 4); Kokkos::parallel_for( - "Testing::mls_coefficients::for1", - Kokkos::RangePolicy(space, 0, 4), + "Testing::mls_coefficients::for1", Kokkos::RangePolicy(space, 0, 4), KOKKOS_LAMBDA(int const i) { int u = (i / 2) * 2 - 1; int v = (i % 2) * 2 - 1; @@ -160,8 +157,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(mls_coefficients_edge_cases, DeviceType, Kokkos::View tgtv0("Testing::tgtv0", 3); Kokkos::parallel_for( "Testing::mls_coefficients_edge_cases::for0", - Kokkos::RangePolicy(space, 0, 3), - KOKKOS_LAMBDA(int const i) { + Kokkos::RangePolicy(space, 0, 3), KOKKOS_LAMBDA(int const i) { srcp0(i, 0) = {{2. * i, 0.}}; srcp0(i, 1) = {{2. * i + 2, 0.}}; tgtp0(i) = {{2. * i + 1, 0.}}; @@ -186,8 +182,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(mls_coefficients_edge_cases, DeviceType, Kokkos::View tgtv1("Testing::tgtv1", 4); Kokkos::parallel_for( "Testing::mls_coefficients_edge_cases::for1", - Kokkos::RangePolicy(space, 0, 4), - KOKKOS_LAMBDA(int const i) { + Kokkos::RangePolicy(space, 0, 4), KOKKOS_LAMBDA(int const i) { int u = (i / 2) * 2 - 1; int v = (i % 2) * 2 - 1; for (int j = 0, k = 0; j < 9; j++) diff --git a/test/tstInterpMovingLeastSquares.cpp b/test/tstInterpMovingLeastSquares.cpp index ef5aafed6..1dd63d190 100644 --- a/test/tstInterpMovingLeastSquares.cpp +++ b/test/tstInterpMovingLeastSquares.cpp @@ -48,8 +48,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(moving_least_squares, DeviceType, Kokkos::View tgtv0("Testing::tgtv0", 3); Kokkos::View eval0("Testing::eval0", 3); Kokkos::parallel_for( - "Testing::moving_least_squares::for0", - Kokkos::RangePolicy(space, 0, 4), + "Testing::moving_least_squares::for0", Kokkos::RangePolicy(space, 0, 4), KOKKOS_LAMBDA(int const i) { auto f = [](const Point0 &) { return 3.; }; @@ -84,8 +83,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(moving_least_squares, DeviceType, Kokkos::View tgtv1("Testing::tgtv1", 4); Kokkos::View eval1("Testing::eval1", 4); Kokkos::parallel_for( - "Testing::moving_least_squares::for1", - Kokkos::RangePolicy(space, 0, 9), + "Testing::moving_least_squares::for1", Kokkos::RangePolicy(space, 0, 9), KOKKOS_LAMBDA(int const i) { int u = (i / 2) * 2 - 1; int v = (i % 2) * 2 - 1; @@ -136,8 +134,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(moving_least_squares_edge_cases, DeviceType, Kokkos::View eval0("Testing::eval0", 3); Kokkos::parallel_for( "Testing::moving_least_squares_edge_cases::for0", - Kokkos::RangePolicy(space, 0, 4), - KOKKOS_LAMBDA(int const i) { + Kokkos::RangePolicy(space, 0, 4), KOKKOS_LAMBDA(int const i) { auto f = [](const Point0 &) { return 3.; }; srcp0(i) = {{2. * i, 0.}}; @@ -164,8 +161,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(moving_least_squares_edge_cases, DeviceType, Kokkos::View eval1("Testing::eval1", 4); Kokkos::parallel_for( "Testing::moving_least_squares_edge_cases::for0", - Kokkos::RangePolicy(space, 0, 9), - KOKKOS_LAMBDA(int const i) { + Kokkos::RangePolicy(space, 0, 9), KOKKOS_LAMBDA(int const i) { int u = (i / 2) * 2 - 1; int v = (i % 2) * 2 - 1; int x = (i / 3) - 1; diff --git a/test/tstUnionFind.cpp b/test/tstUnionFind.cpp index cb8eb933b..f230d828e 100644 --- a/test/tstUnionFind.cpp +++ b/test/tstUnionFind.cpp @@ -34,8 +34,8 @@ build_representatives(ExecutionSpace const &space, UnionFind union_find) Kokkos::deep_copy(space, map2smallest, INT_MAX); Kokkos::parallel_for( - "Test::find_representatives", - Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i) { + "Test::find_representatives", Kokkos::RangePolicy(space, 0, n), + KOKKOS_LAMBDA(int i) { auto r = union_find.representative(i); Kokkos::atomic_min(&map2smallest(r), i); representatives(i) = r; @@ -44,8 +44,8 @@ build_representatives(ExecutionSpace const &space, UnionFind union_find) // implementation of the union-find (e.g., not relying them being equal to // the smallest index in the set), so we explicitly remap them. Kokkos::parallel_for( - "Test::remap_representatives", - Kokkos::RangePolicy(space, 0, n), KOKKOS_LAMBDA(int i) { + "Test::remap_representatives", Kokkos::RangePolicy(space, 0, n), + KOKKOS_LAMBDA(int i) { representatives(i) = map2smallest(representatives(i)); }); @@ -57,7 +57,7 @@ template void merge(ExecutionSpace const &space, UnionFind &union_find, int i, int j) { Kokkos::parallel_for( - "Test::merge", Kokkos::RangePolicy(space, 0, 1), + "Test::merge", Kokkos::RangePolicy(space, 0, 1), KOKKOS_LAMBDA(int) { union_find.merge(i, j); }); }