This class performs numerical integration over a d-dimensional hypercube using quadrature rules.
More...
|
| | QuadratureIntegrator (QuadratureProvider &quadrature_provider, const std::array< size_t, dim > &_grid_size, const std::array< ctype, dim > &grid_min, const std::array< ctype, dim > &grid_max, const std::array< QuadratureType, dim > &quadrature_type) |
| |
| void | set_grid_extents (const std::array< ctype, dim > &grid_min, const std::array< ctype, dim > &grid_max) |
| |
template<typename... T>
requires is_valid_kernel<NT, KERNEL, ctype, dim, T...> |
| void | get (NT &dest, const T &...t) const |
| |
template<typename OT , typename... T>
requires (!std::is_same_v<OT, NT> && is_valid_kernel<NT, KERNEL, ctype, dim, T...>) |
| void | get (OT &dest, const T &...t) const |
| |
template<typename OT , typename... T>
requires (!std::is_same_v<OT, NT> && is_valid_kernel<NT, KERNEL, ctype, dim, T...>) |
| void | get (ExecutionSpace &space, OT &dest, const T &...t) const |
| |
| template<typename view_type , typename Coordinates , typename... Args> |
| void | map (ExecutionSpace &space, const view_type integral_view, const Coordinates &coordinates, const Args &...args) |
| |
| size_t | quadrature_volume () const |
| | Points evaluated per external grid point. Half of the scheduler's cost score.
|
| |
| template<typename Coordinates , typename... Args> |
| auto | map (NT *dest, const Coordinates &coordinates, const Args &...args) |
| |
| template<typename Coordinates , typename... Args> |
| auto | map_dist (NT *dest, const Coordinates &coordinates, const Args &...args) |
| |
| | AbstractIntegrator () |
| |
| KOKKOS_FORCEINLINE_FUNCTION size_t | integrator_id () const |
| | Stable, rank-independent identity of this integrator.
|
| |
|
| device::array< size_t, dim > | grid_size |
| |
| ExecutionSpace | space |
| |
| QuadratureProvider & | quadrature_provider |
| |
| device::array< device::array< ctype, dim >, 2 > | grid_extents |
| |
| device::array< ctype, dim > | grid_start |
| |
| device::array< ctype, dim > | grid_scale |
| |
| device::array< Kokkos::View< const ctype *, typename ExecutionSpace::memory_space >, dim > | nodes |
| |
| device::array< Kokkos::View< const ctype *, typename ExecutionSpace::memory_space >, dim > | weights |
| |
| KokkosNDView< 1+dim, NT, ExecutionSpace > | m_cache |
| |
| device::array< size_t, 1+dim > | m_cache_extents {} |
| |
| Kokkos::View< ctype *, typename ExecutionSpace::memory_space > | m_positions |
| |
| std::string | m_positions_key |
| |
| Kokkos::View< NT *, ExecutionSpace > | m_dest_device |
| |
| size_t | m_dest_device_size = 0 |
| |
| Kokkos::View< NT *, PinnedHost_memory > | m_dest_pinned |
| |
| size_t | m_dest_pinned_size = 0 |
| |
| Kokkos::View< NT, typename ExecutionSpace::memory_space > | m_result_view |
| |
| Kokkos::View< NT, typenameExecutionSpace::memory_space >::host_mirror_type | m_result_host |
| |
| bool | m_result_views_initialized = false |
| |
| size_t | m_integrator_id |
| |
template<int dim, typename NT, typename KERNEL, typename ExecutionSpace>
requires (dim > 0)
class DiFfRG::QuadratureIntegrator< dim, NT, KERNEL, ExecutionSpace >
This class performs numerical integration over a d-dimensional hypercube using quadrature rules.
- Template Parameters
-
| dim | The dimension of the hypercube, which can be between 1 and 5. |
| NT | numerical type of the result |
| KERNEL | kernel to be integrated, which must provide the static methods kernel and constant |
| ExecutionSpace | can be any execution space, e.g. GPU_exec, TBB_exec. |
template<int dim, typename NT , typename KERNEL , typename ExecutionSpace >
template<typename Coordinates , typename... Args>
| void DiFfRG::QuadratureIntegrator< dim, NT, KERNEL, ExecutionSpace >::run_host |
( |
NT * | dest, |
|
|
const Coordinates & | coordinates, |
|
|
const Args &... | args ) |
|
inlineprivate |
The host-backend body of map_dist(). Queued jobs run one after another, so the shared m_dest_device scratch is written and drained before the next job touches it.
template<int dim, typename NT , typename KERNEL , typename ExecutionSpace >
template<typename Coordinates , typename... Args>
| void DiFfRG::QuadratureIntegrator< dim, NT, KERNEL, ExecutionSpace >::run_or_queue_host |
( |
NT * | dest, |
|
|
const Coordinates & | coordinates, |
|
|
const Args &... | args ) |
|
inlineprivate |
Run a host-backend map now, or queue it for flush time if a deferral scope is open.
A host kernel is synchronous, so running it inline blocks the host thread and delays the launch of any device map issued after it. Queuing makes the call order inside a DeferredMaps scope irrelevant: flush() runs the queue before it fences, i.e. while the device work already launched is still running. See MapCompletion::record_work.
Compiled out entirely in a CUDA-less build, where there is no device to overlap with.