DASH
0.3.0
|
The StencilOperator provides stencil specific iterator and functions for a given HaloBlock and HaloMemory. More...
#include <StencilOperator.h>
Public Types | |
using | Inner_t = StencilOperatorInner< Self_t > |
using | Bnd_t = StencilOperatorBoundary< Self_t > |
using | Element_t = typename HaloBlockT::Element_t |
using | index_t = typename std::make_signed< typename Pattern_t::index_type >::type |
using | uindex_t = typename std::make_unsigned< index_t >::type |
using | StencilOffsets_t = std::array< index_t, NumStencilPoints > |
using | HaloBlock_t = HaloBlockT |
using | HaloMemory_t = HaloMemory< HaloBlock_t > |
using | ViewSpec_t = typename HaloBlockT::ViewSpec_t |
using | Coords_t = std::array< index_t, NumDimensions > |
using | StencilSpec_t = StencilSpecT |
using | StencilSpecViews_t = StencilSpecificViews< HaloBlock_t, StencilSpecT > |
using | stencil_index_t = typename StencilSpecT::stencil_index_t |
using | iterator = StencilIterator< Element_t, Pattern_t, typename HaloBlockT::GlobMem_t, StencilSpecT, StencilViewScope::ALL > |
using | const_iterator = const iterator |
using | CoordsIdxManagerInner_t = CoordsIdxManagerInner< Self_t > |
using | iterator_inner = StencilIteratorTest< CoordsIdxManagerInner_t > |
using | const_iterator_inner = const iterator |
using | CoordsIdxManagerBoundary_t = CoordsIdxManagerBoundary< Self_t > |
using | iterator_bnd = StencilIteratorTest< CoordsIdxManagerBoundary_t > |
using | const_iterator_bnd = const iterator |
Public Member Functions | |
StencilOperator (const HaloBlockT *haloblock, Element_t *local_memory, HaloMemory_t *halomemory, const StencilSpecT &stencil_spec) | |
Constructor that takes a HaloBlock, a HaloMemory, a StencilSpec and a local ViewSpec. More... | |
iterator | begin () noexcept |
Returns the begin iterator for all relevant elements (inner + boundary) More... | |
const_iterator | begin () const noexcept |
Returns the begin const iterator for all relevant elements (inner + boundary) More... | |
iterator | end () noexcept |
Returns the end iterator for all relevant elements (inner + boundary) More... | |
const_iterator | end () const noexcept |
Returns the end const iterator for all relevant elements (inner + boundary) More... | |
const HaloBlock_t & | halo_block () |
Returns the HaloBlock. More... | |
const StencilSpecT & | stencil_spec () const |
Returns the stencil specification StencilSpec. More... | |
HaloMemory_t & | halo_memory () |
Returns the halo memory management object HaloMemory. More... | |
Element_t * | local_memory () |
Returns the halo memory management object HaloMemory. More... | |
const StencilSpecViews_t & | spec_views () const |
Returns the StencilSpecificView. More... | |
const ViewSpec_t & | view () const |
Returns a SpecView including inner and boundary elements. More... | |
const ViewSpec_t & | view_local () const |
Returns the local SpecView. More... | |
const StencilOffsets_t & | stencil_offsets () const |
Returns the offsets for each stencil point. More... | |
const index_t | stencil_offset_at (std::size_t pos) const |
Returns the offset for specific stencil point. More... | |
index_t | get_offset (const Coords_t &coords) const |
Returns the local memory offset for a given coordinate. More... | |
Static Public Member Functions | |
static decltype(auto) constexpr | ndim () |
static decltype(auto) constexpr | memory_order () |
static decltype(auto) constexpr | num_stencil_points () |
Public Attributes | |
Inner_t | inner |
Bnd_t | boundary |
The StencilOperator provides stencil specific iterator and functions for a given HaloBlock and HaloMemory.
Provided StencilIterator are for the inner block, the boundary elements and both. The inner block iterator ensures that no stencil point accesses halo elements or not existing elements. The stencil points of the boundary iterator point at least to one halo element.
Example for an inner block boundary iteration space:
boundary region 1 : .-------------'------------. | | .-------.-------------------------.-------. | 0 1 | 2 3 4 5 6 7 8 9 | 10 11 | | 12 13 | 14 15 16 17 18 19 20 21 | 22 23 | .--:-------+-------------------------+-------:--. | | 24 23 | | 34 35 | | .-: : ... : inner block region : ... : :- boundary | | | 60 62 | | 70 71 | | region 3 | '--:-------+-------------------------+-------:--: | | 72 73 | 74 75 76 77 78 79 80 81 | 82 83 | :- boundary | | 84 85 | 86 87 88 89 90 91 92 93 | 94 95 | | region 8 | `-------'-------------------------'-------'--' | | | | `------------.------------+ : : boundary region 3 boundary region 8
Definition at line 24 of file StencilOperator.h.
|
inline |
Constructor that takes a HaloBlock, a HaloMemory, a StencilSpec and a local ViewSpec.
Definition at line 702 of file StencilOperator.h.
References dash::ndim().
|
inlinenoexcept |
Returns the begin iterator for all relevant elements (inner + boundary)
Definition at line 749 of file StencilOperator.h.
|
inlinenoexcept |
Returns the begin const iterator for all relevant elements (inner + boundary)
Definition at line 755 of file StencilOperator.h.
|
inlinenoexcept |
Returns the end iterator for all relevant elements (inner + boundary)
Definition at line 760 of file StencilOperator.h.
|
inlinenoexcept |
Returns the end const iterator for all relevant elements (inner + boundary)
Definition at line 766 of file StencilOperator.h.
|
inline |
Returns the local memory offset for a given coordinate.
Definition at line 818 of file StencilOperator.h.
|
inline |
Returns the HaloBlock.
Definition at line 771 of file StencilOperator.h.
|
inline |
Returns the halo memory management object HaloMemory.
Definition at line 781 of file StencilOperator.h.
|
inline |
Returns the halo memory management object HaloMemory.
Definition at line 786 of file StencilOperator.h.
|
inline |
Returns the StencilSpecificView.
Definition at line 791 of file StencilOperator.h.
|
inline |
Returns the offset for specific stencil point.
Definition at line 811 of file StencilOperator.h.
|
inline |
Returns the offsets for each stencil point.
Definition at line 806 of file StencilOperator.h.
|
inline |
Returns the stencil specification StencilSpec.
Definition at line 776 of file StencilOperator.h.
|
inline |
Returns a SpecView including inner and boundary elements.
Definition at line 796 of file StencilOperator.h.
|
inline |
Returns the local SpecView.
Definition at line 801 of file StencilOperator.h.