48 std::vector<std::size_t>
cell_offsets(local_cells.size(), std::size_t{0});
49 std::exclusive_scan(local_cells.begin(), local_cells.end(),
51 [](
auto acc,
auto const &cell) {
52 return acc + cell->particles().size();
56 "enumerate_local_particles", std::size_t{0}, local_cells.size(),
69 std::size_t index = 0;
virtual std::span< Cell *const > local_cells() const =0
Get pointer to local cells.
ESPRESSO_ATTR_ALWAYS_INLINE void kokkos_parallel_range_for(auto const &name, auto start, auto end, auto const &kernel)
Wrapper for Kokkos::parallel_for that skips fork/join when the number of threads is 1.
void enumerate_local_particles(CellStructure const &cs, Kernel &&kernel)
Run a kernel on all local particles with enumeration.