DASH  0.3.0
dash::halo::GlobalBoundarySpec< NumDimensions > Class Template Reference

Global boundary property specification for every dimension. More...

#include <Halo.h>

Public Member Functions

 GlobalBoundarySpec ()
 Default constructor. More...
 
template<typename... Values>
constexpr GlobalBoundarySpec (BoundaryProp value, Values... values)
 Constructor to define custom BoundaryProp values. More...
 
constexpr const std::array< BoundaryProp, NumDimensions > & values () const
 Return value with all dimensions as array of NumDimensions elements. More...
 
BoundaryProp dim (dim_t dimension) const
 The value in the given dimension. More...
 
constexpr BoundaryProp operator[] (size_t dimension) const
 Subscript operator, access to value in dimension given by index. More...
 
BoundaryProp & operator[] (size_t dimension)
 Subscript assignment operator, access to value in dimension given by index. More...
 
constexpr bool operator== (const self_t &other) const
 Equality comparison operator. More...
 
constexpr bool operator!= (const self_t &other) const
 Equality comparison operator. More...
 
constexpr dim_t rank () const
 The number of dimensions of the value. More...
 

Static Public Member Functions

static constexpr dim_t ndim ()
 The number of dimensions of the value. More...
 

Detailed Description

template<dim_t NumDimensions>
class dash::halo::GlobalBoundarySpec< NumDimensions >

Global boundary property specification for every dimension.

Definition at line 23 of file Halo.h.

Constructor & Destructor Documentation

◆ GlobalBoundarySpec() [1/2]

template<dim_t NumDimensions>
dash::halo::GlobalBoundarySpec< NumDimensions >::GlobalBoundarySpec ( )
inline

Default constructor.

All BoundaryProp = BoundaryProp::NONE

Definition at line 34 of file Halo.h.

34  {
35  for(dim_t i = 0; i < NumDimensions; ++i) {
36  this->_values[i] = BoundaryProp::NONE;
37  }
38  }
int dim_t
Scalar type for a dimension value, with 0 indicating the first dimension.
Definition: Types.h:39

◆ GlobalBoundarySpec() [2/2]

template<dim_t NumDimensions>
template<typename... Values>
constexpr dash::halo::GlobalBoundarySpec< NumDimensions >::GlobalBoundarySpec ( BoundaryProp  value,
Values...  values 
)
inline

Constructor to define custom BoundaryProp values.

Definition at line 43 of file Halo.h.

44  : Base_t::Dimensional(value, values...) {}
constexpr const std::array< BoundaryProp, NumDimensions > & values() const
Return value with all dimensions as array of NumDimensions elements.
Definition: Dimensional.h:142

Member Function Documentation

◆ dim()

BoundaryProp dash::Dimensional< BoundaryProp , NumDimensions >::dim ( dim_t  dimension) const
inlineinherited

The value in the given dimension.

Parameters
dimensionThe dimension
Returns
The value in the given dimension

Definition at line 152 of file Dimensional.h.

152  {
153  DASH_ASSERT_LT(
154  dimension, NumDimensions,
155  "Dimension for Dimensional::extent() must be lower than " <<
156  NumDimensions);
157  return _values[dimension];
158  }

◆ ndim()

static constexpr dim_t dash::Dimensional< BoundaryProp , NumDimensions >::ndim ( )
inlinestaticinherited

The number of dimensions of the value.

Definition at line 207 of file Dimensional.h.

207  {
208  return NumDimensions;
209  }

◆ operator!=()

constexpr bool dash::Dimensional< BoundaryProp , NumDimensions >::operator!= ( const self_t other) const
inlineinherited

Equality comparison operator.

Definition at line 193 of file Dimensional.h.

193  {
194  return !(*this == other);
195  }

◆ operator==()

constexpr bool dash::Dimensional< BoundaryProp , NumDimensions >::operator== ( const self_t other) const
inlineinherited

Equality comparison operator.

Definition at line 186 of file Dimensional.h.

186  {
187  return this == &other || _values == other._values;
188  }

◆ operator[]() [1/2]

constexpr BoundaryProp dash::Dimensional< BoundaryProp , NumDimensions >::operator[] ( size_t  dimension) const
inlineinherited

Subscript operator, access to value in dimension given by index.

Alias for dim.

Parameters
dimensionThe dimension
Returns
The value in the given dimension

Definition at line 167 of file Dimensional.h.

167  {
168  return _values[dimension];
169  }

◆ operator[]() [2/2]

BoundaryProp & dash::Dimensional< BoundaryProp , NumDimensions >::operator[] ( size_t  dimension)
inlineinherited

Subscript assignment operator, access to value in dimension given by index.

Alias for dim.

Parameters
dimensionThe dimension
Returns
A reference to the value in the given dimension

Definition at line 179 of file Dimensional.h.

179  {
180  return _values[dimension];
181  }

◆ rank()

constexpr dim_t dash::Dimensional< BoundaryProp , NumDimensions >::rank ( ) const
inlineinherited

The number of dimensions of the value.

Definition at line 200 of file Dimensional.h.

200  {
201  return NumDimensions;
202  }

◆ values()

constexpr const std::array<BoundaryProp , NumDimensions>& dash::Dimensional< BoundaryProp , NumDimensions >::values ( ) const
inlineinherited

Return value with all dimensions as array of NumDimensions elements.

Definition at line 142 of file Dimensional.h.

142  {
143  return _values;
144  }

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