![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
#include <config/config.hpp>#include <utils/index.hpp>#include <Kokkos_Core.hpp>#include <concepts>#include <cstddef>#include <type_traits>
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.
Typedefs | |
| template<Utils::MemoryOrder Order> | |
| using | LayoutIterate = std::conditional_t< Order==Utils::MemoryOrder::COLUMN_MAJOR, std::integral_constant< Kokkos::Iterate, Kokkos::Iterate::Left >, std::integral_constant< Kokkos::Iterate, Kokkos::Iterate::Right > > |
| Mapping between ESPResSo and Kokkos tags for memory order. | |
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. | |
| template<Utils::MemoryOrder Order, class Kernel , class Projector = decltype(detail::noop_projector)> requires std::invocable<Kernel> | |
| and std::invocable< Projector, unsigned, int > void | for_each_3d_order (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. | |
| template<Utils::MemoryOrder memory_order, class Kernel > | |
| void | for_each_3d_lin (detail::IndexVectorConcept auto &&start, detail::IndexVectorConcept auto &&stop, Kernel &&kernel) |
| Run a kernel(index_3d, linear_index) over the given 3d range with given memory order. | |
| using LayoutIterate = std::conditional_t< Order == Utils::MemoryOrder::COLUMN_MAJOR, std::integral_constant<Kokkos::Iterate, Kokkos::Iterate::Left>, std::integral_constant<Kokkos::Iterate, Kokkos::Iterate::Right> > |
Mapping between ESPResSo and Kokkos tags for memory order.
Definition at line 129 of file for_each_3d.hpp.
| 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 63 of file for_each_3d.hpp.
References stream.
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_dipolar(), grid_influence_function_self_energy(), DipolarP3MHeffte< FloatType, Architecture, FFTConfig >::long_range_kernel(), p3m_k_space_error(), and p3m_tune_aliasing_sums().
| void for_each_3d_lin | ( | detail::IndexVectorConcept auto && | start, |
| detail::IndexVectorConcept auto && | stop, | ||
| Kernel && | kernel | ||
| ) |
Run a kernel(index_3d, linear_index) over the given 3d range with given memory order.
Definition at line 140 of file for_each_3d.hpp.
References Utils::ROW_MAJOR, and stream.
| and std::invocable< Projector, unsigned, int > void for_each_3d_order | ( | 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. |
| Order | Data layout. |
| Kernel | Nullary function. |
| Projector | Binary function that takes a nesting depth and a loop counter as arguments and projects a value. |
Definition at line 102 of file for_each_3d.hpp.
References Utils::ROW_MAJOR, and stream.