ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
#include <concepts>
#include <cstddef>
Go to the source code of this file.
Functions | |
template<class Kernel , class Projector = decltype(detail::noop_projector)> requires std::invocable<Kernel> | |
and std::invocable< Projector, unsigned, int > void | for_each_3d (detail::IndexVectorConcept auto &&start, detail::IndexVectorConcept auto &&stop, detail::IndexVectorConcept auto &&counters, Kernel &&kernel, Projector &&projector=detail::noop_projector) |
Repeat an operation on every element of a 3D grid. | |
and std::invocable< Projector, unsigned, int > void for_each_3d | ( | detail::IndexVectorConcept auto && | start, |
detail::IndexVectorConcept auto && | stop, | ||
detail::IndexVectorConcept auto && | counters, | ||
Kernel && | kernel, | ||
Projector && | projector = detail::noop_projector |
||
) |
Repeat an operation on every element of a 3D grid.
Intermediate values that depend on the iterated coordinates are calculated and stored once per iteration. This is useful when the operation is costly.
start | Initial values for the loop counters. |
stop | Final values (one-past-the-end) for the loop counters. |
counters | Loop counters. |
kernel | Functor to execute. |
projector | Projection of the current loop counter. |
Kernel | Nullary function. |
Projector | Binary function that takes a nesting depth and a loop counter as arguments and projects a value. |
Definition at line 54 of file for_each_3d.hpp.
Referenced by dp3m_k_space_error(), dp3m_tune_aliasing_sums(), G_opt(), G_opt_dipolar(), G_opt_dipolar_self_energy(), grid_influence_function(), grid_influence_function(), grid_influence_function_self_energy(), CoulombP3MImpl< FloatType, Architecture >::long_range_kernel(), DipolarP3MImpl< FloatType, Architecture >::long_range_kernel(), CoulombP3MImpl< FloatType, Architecture >::long_range_pressure(), p3m_k_space_error(), and p3m_tune_aliasing_sums().