![]() |
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 <functional>#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 > |
| Custom reduction in the form required by Kokkos. More... | |
Namespaces | |
| namespace | Reduction |
Typedefs | |
| template<typename ResultType > | |
| using | Reduction::AddPartialResultKernel = std::function< void(ResultType &, Particle const &)> |
| Kernel that adds the result from a single particle to a reduction. | |
| template<typename ResultType > | |
| using | Reduction::ReductionOp = std::function< void(ResultType &, ResultType const &)> |
| Join two partial reduction results. | |
Functions | |
| template<typename ResultType , typename Kernel > | |
| KokkosReducer< ResultType, Kernel > | Reduction::make_kokkos_reducer (Kernel k, ReductionOp< ResultType > reduce_op) |
| template<typename ResultType > | |
| ResultType | reduce_over_local_particles (CellStructure const &cs, Reduction::AddPartialResultKernel< ResultType > add_partial, Reduction::ReductionOp< ResultType > reduce_op) |
| performs a reduction over all particles | |
| ResultType reduce_over_local_particles | ( | CellStructure const & | cs, |
| Reduction::AddPartialResultKernel< ResultType > | add_partial, | ||
| Reduction::ReductionOp< ResultType > | reduce_op | ||
| ) |
performs a reduction over all particles
| cs | cell structure to iterate over |
| add_partial | is a function that adds a reduction result from a single particle |
| reduce_op | is a function that joins two reduction results |
both functions have to implement the same reduction.
Definition at line 101 of file particle_reduction.hpp.
References CellStructure::decomposition(), ParticleDecomposition::local_cells(), CellStructure::local_particles(), and ParticleRange::size().
Referenced by CellStructure::check_resort_required(), and CoulombP3MHeffte< FloatType, Architecture, FFTConfig >::count_charged_particles().