DASH  0.3.0
dash::Domain< NumDim, IndexType > Class Template Reference

Public Member Functions

 Domain (const std::initializer_list< std::array< IndexType, 2 >> &ranges)
 Example: More...
 
self_ttranslate (const std::array< IndexType, NumDim > &offs)
 
self_tresize (const std::array< IndexType, NumDim > &extents)
 
self_texpand (const std::array< IndexType, NumDim > &ext)
 
IndexType offset (dim_t d) const
 
std::array< IndexType, NumDim > offsets () const
 
IndexType extent (dim_t d) const
 
std::array< IndexType, NumDim > extents () const
 

Detailed Description

template<dim_t NumDim, typename IndexType = dash::default_index_t>
class dash::Domain< NumDim, IndexType >

Definition at line 17 of file Domain.h.

Constructor & Destructor Documentation

◆ Domain()

template<dim_t NumDim, typename IndexType = dash::default_index_t>
dash::Domain< NumDim, IndexType >::Domain ( const std::initializer_list< std::array< IndexType, 2 >> &  ranges)
inline

Example:

dash::Domain({ {0,10}, {10,20}, {5,10} });

Definition at line 33 of file Domain.h.

33  {
34  DASH_ASSERT_EQ(
35  NumDim, ranges.size(),
36  "wrong number of dimensions in domain ranges");
37  dim_t d = 0;
38  for (auto & range : ranges) {
39  _extents[d] = range[1] - range[0];
40  _offsets[d] = range[0];
41  d++;
42  }
43  }
int dim_t
Scalar type for a dimension value, with 0 indicating the first dimension.
Definition: Types.h:39

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