DASH
0.3.0
|
Base class for dimensional attributes, stores an n-dimensional value with identical type all dimensions. More...
#include <Dimensional.h>
Public Member Functions | |
template<typename ... Values> | |
constexpr | Dimensional (ElementType &value, Values ... values) |
Constructor, expects one value for every dimension. More... | |
constexpr | Dimensional (std::array< ElementType, NumDimensions > values) |
Constructor, expects array containing values for every dimension. More... | |
constexpr | Dimensional (const self_t &other)=default |
self_t & | operator= (const self_t &other)=default |
constexpr const std::array< ElementType, NumDimensions > & | values () const |
Return value with all dimensions as array of NumDimensions elements. More... | |
ElementType | dim (dim_t dimension) const |
The value in the given dimension. More... | |
constexpr ElementType | operator[] (size_t dimension) const |
Subscript operator, access to value in dimension given by index. More... | |
ElementType & | 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... | |
Friends | |
template<typename E_ , dim_t ND_> | |
std::ostream & | operator<< (std::ostream &os, const Dimensional< E_, ND_ > &dimensional) |
Base class for dimensional attributes, stores an n-dimensional value with identical type all dimensions.
Different from a SizeSpec or cartesian space, a Dimensional does not define metric/scalar extents or a size, but just a vector of possibly non-scalar attributes.
ElementType | The type of the contained values |
NumDimensions | The number of dimensions |
Definition at line 101 of file Dimensional.h.
|
inline |
Constructor, expects one value for every dimension.
Definition at line 119 of file Dimensional.h.
|
inline |
Constructor, expects array containing values for every dimension.
Definition at line 130 of file Dimensional.h.
|
inline |
The value in the given dimension.
dimension | The dimension |
Definition at line 152 of file Dimensional.h.
Referenced by dash::ViewSpec< NumDimensions, int >::set_rank().
|
inlinestatic |
The number of dimensions of the value.
Definition at line 207 of file Dimensional.h.
Referenced by dash::ViewSpec< NumDimensions, int >::ViewSpec().
|
inline |
Equality comparison operator.
Definition at line 193 of file Dimensional.h.
|
inline |
Equality comparison operator.
Definition at line 186 of file Dimensional.h.
|
inline |
Subscript operator, access to value in dimension given by index.
Alias for dim
.
dimension | The dimension |
Definition at line 167 of file Dimensional.h.
|
inline |
Subscript assignment operator, access to value in dimension given by index.
Alias for dim
.
dimension | The dimension |
Definition at line 179 of file Dimensional.h.
|
inline |
The number of dimensions of the value.
Definition at line 200 of file Dimensional.h.
|
inline |
Return value with all dimensions as array of NumDimensions
elements.
Definition at line 142 of file Dimensional.h.
Referenced by dash::Dimensional< Distribution, NumDimensions >::Dimensional(), and dash::TilePattern< NumDimensions, Arrangement, IndexType >::underfilled_blocksize().