alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
alpaka::BoundaryDirectionsContainer< T_dim, T_LowHaloVec, T_UpHaloVec > Struct Template Reference

A container for boundary directions of an n-dimensional volume. More...

#include <BoundaryIter.hpp>

Public Member Functions

constexpr BoundaryDirectionsContainer (T_LowHaloVec const &lowerHaloSizes, T_UpHaloVec const &upperHaloSizes)
constexpr BoundaryDirectionIter< T_dim, T_LowHaloVec, T_UpHaloVec > begin () const
constexpr BoundaryDirectionIter< T_dim, T_LowHaloVec, T_UpHaloVec > end () const

Static Public Member Functions

static consteval auto dim ()
static consteval uint32_t length ()

Private Attributes

T_LowHaloVec const m_lowerHaloSizes
T_UpHaloVec const m_upperHaloSizes

Detailed Description

template<uint32_t T_dim, concepts::Vector T_LowHaloVec, concepts::Vector T_UpHaloVec>
struct alpaka::BoundaryDirectionsContainer< T_dim, T_LowHaloVec, T_UpHaloVec >

A container for boundary directions of an n-dimensional volume.

This class implements begin(), end(), and length(), and can be iterated over. This is useful for stencil codes, where boundary conditions exist, that need to only be applied to elements on the borders of memory. To create a BoundaryDirectionsContainer for a memory object, see makeBoundaryDirIterator.

A 0D boundary direction is a single value, a 1D boundary direction is a "line", for example edges of a cube, a 2D boundary direction is a "plane", for example the sides of a cube.

For example, a 1-dimensional (1D) volume has two 0D ends and a 1D center. A 2D volume has 4 0D corners, 4 1D edges, and one 2D center. In general, there are 3^n boundaries for an nD volume.

Template Parameters
T_dimThe dimensionality of the volume that this contains boundaries for.
T_LowHaloVecThe vector type used for the lower halo sizes.
T_UpHaloVecThe vector type used for the upper halo sizes.

Definition at line 236 of file BoundaryIter.hpp.

Constructor & Destructor Documentation

◆ BoundaryDirectionsContainer()

template<uint32_t T_dim, concepts::Vector T_LowHaloVec, concepts::Vector T_UpHaloVec>
alpaka::BoundaryDirectionsContainer< T_dim, T_LowHaloVec, T_UpHaloVec >::BoundaryDirectionsContainer ( T_LowHaloVec const & lowerHaloSizes,
T_UpHaloVec const & upperHaloSizes )
inlineconstexpr

Definition at line 240 of file BoundaryIter.hpp.

Member Function Documentation

◆ begin()

template<uint32_t T_dim, concepts::Vector T_LowHaloVec, concepts::Vector T_UpHaloVec>
BoundaryDirectionIter< T_dim, T_LowHaloVec, T_UpHaloVec > alpaka::BoundaryDirectionsContainer< T_dim, T_LowHaloVec, T_UpHaloVec >::begin ( ) const
inlinenodiscardconstexpr

Definition at line 246 of file BoundaryIter.hpp.

◆ dim()

template<uint32_t T_dim, concepts::Vector T_LowHaloVec, concepts::Vector T_UpHaloVec>
consteval auto alpaka::BoundaryDirectionsContainer< T_dim, T_LowHaloVec, T_UpHaloVec >::dim ( )
inlinestaticnodiscardconsteval

Definition at line 267 of file BoundaryIter.hpp.

◆ end()

template<uint32_t T_dim, concepts::Vector T_LowHaloVec, concepts::Vector T_UpHaloVec>
BoundaryDirectionIter< T_dim, T_LowHaloVec, T_UpHaloVec > alpaka::BoundaryDirectionsContainer< T_dim, T_LowHaloVec, T_UpHaloVec >::end ( ) const
inlinenodiscardconstexpr

Definition at line 254 of file BoundaryIter.hpp.

◆ length()

template<uint32_t T_dim, concepts::Vector T_LowHaloVec, concepts::Vector T_UpHaloVec>
consteval uint32_t alpaka::BoundaryDirectionsContainer< T_dim, T_LowHaloVec, T_UpHaloVec >::length ( )
inlinestaticnodiscardconsteval

Definition at line 262 of file BoundaryIter.hpp.

Member Data Documentation

◆ m_lowerHaloSizes

template<uint32_t T_dim, concepts::Vector T_LowHaloVec, concepts::Vector T_UpHaloVec>
T_LowHaloVec const alpaka::BoundaryDirectionsContainer< T_dim, T_LowHaloVec, T_UpHaloVec >::m_lowerHaloSizes
private

Definition at line 273 of file BoundaryIter.hpp.

◆ m_upperHaloSizes

template<uint32_t T_dim, concepts::Vector T_LowHaloVec, concepts::Vector T_UpHaloVec>
T_UpHaloVec const alpaka::BoundaryDirectionsContainer< T_dim, T_LowHaloVec, T_UpHaloVec >::m_upperHaloSizes
private

Definition at line 274 of file BoundaryIter.hpp.


The documentation for this struct was generated from the following file: