83 std::invocable<ResultType &, Particle const &>
auto add_partial,
84 [[
maybe_unused]] std::invocable<ResultType &, ResultType const &>
auto
94 if (cells.size() > 1) {
95 auto reducer = Reduction::make_kokkos_reducer<ResultType>(
97 for (
auto const &p : cells[
c_index]->particles()) {
102 Kokkos::parallel_reduce(
103 "reduce_on_local_particle",
104 Kokkos::RangePolicy<Kokkos::DefaultHostExecutionSpace>(std::size_t{0},
110 auto const &particles = cells.front()->particles();
111 auto reducer = Reduction::make_kokkos_reducer<ResultType>(
116 Kokkos::parallel_reduce(
117 "reduce_on_local_particle",
118 Kokkos::RangePolicy<Kokkos::DefaultHostExecutionSpace>(std::size_t{0},
virtual std::span< Cell *const > local_cells() const =0
Get pointer to local cells.
base_type::size_type size() const
ResultType reduce_over_local_particles(CellStructure const &cs, std::invocable< ResultType &, Particle const & > auto add_partial, std::invocable< ResultType &, ResultType const & > auto reduce_op)
Run a reduction over all particles.
Struct holding all information for one particle.