ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
for_each_3d.hpp File Reference
#include <concepts>
#include <cstddef>
+ Include dependency graph for for_each_3d.hpp:
+ This graph shows which files directly or indirectly include this file:

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.
 

Function Documentation

◆ for_each_3d()

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.

Intermediate values that depend on the iterated coordinates are calculated and stored once per iteration. This is useful when the operation is costly.

Parameters
startInitial values for the loop counters.
stopFinal values (one-past-the-end) for the loop counters.
countersLoop counters.
kernelFunctor to execute.
projectorProjection of the current loop counter.
Template Parameters
KernelNullary function.
ProjectorBinary 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().