![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
#include <config/config.hpp>#include "Particle.hpp"#include "cell_system/CellStructure.hpp"#include <Kokkos_Core.hpp>#include <concepts>#include <utility>
Include dependency graph for particle_reduction.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| class | Reduction::KokkosReducer< ResultType, Kernel, Reduction > |
| Custom reduction in the form required by Kokkos. More... | |
Namespaces | |
| namespace | Reduction |
Functions | |
| template<typename ResultType , class Kernel , class Reduction > | |
| KokkosReducer< ResultType, Kernel, Reduction > | Reduction::make_kokkos_reducer (Kernel k, Reduction reduce_op) |
| template<typename ResultType > | |
| 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. | |
| 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.
| cs | cell structure to iterate over |
| add_partial | function that accumulates a result from a single particle |
| reduce_op | function that joins two reduction results |
both functions have to implement the same reduction.
Definition at line 81 of file particle_reduction.hpp.
References CellStructure::decomposition(), ParticleDecomposition::local_cells(), ParticleRange::size(), and stream.