DASH
0.3.0
|
Specifies view parameters for implementing submat, rows and cols. More...
#include <Dimensional.h>
Public Types | |
typedef ViewRegion< NumDimensions, IndexType > | region_type |
typedef ViewRange< IndexType > | range_type |
using | index_type = IndexType |
using | size_type = SizeType |
Public Member Functions | |
ViewSpec () | |
Default constructor, initialize with extent and offset 0 in all dimensions. More... | |
ViewSpec (const std::array< SizeType, NumDimensions > &extents) | |
Constructor, initialize with given extents and offset 0 in all dimensions. More... | |
ViewSpec (const std::array< IndexType, NumDimensions > &offsets, const std::array< SizeType, NumDimensions > &extents) | |
Constructor, initialize with given extents and offsets. More... | |
constexpr | ViewSpec (const self_t &other)=default |
Copy constructor. More... | |
constexpr | ViewSpec (self_t &&other)=default |
Move constructor. More... | |
self_t & | operator= (const self_t &other)=default |
Assignment operator. More... | |
self_t & | operator= (self_t &&other)=default |
Move-assignment operator. 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... | |
template<typename ... Args> | |
void | resize (SizeType arg, Args... args) |
Change the view specification's extent in every dimension. More... | |
void | resize (const std::array< ViewPair_t, NumDimensions > &view) |
Change the view specification's extent and offset in every dimension. More... | |
template<typename SizeType_ > | |
void | resize (const std::array< SizeType_, NumDimensions > &extents) |
Change the view specification's extent in every dimension. More... | |
void | resize_dim (dim_t dimension, IndexType offset, SizeType extent) |
Change the view specification's extent and offset in the given dimension. More... | |
ViewSpec< NumDimensions-1, IndexType > | slice (dim_t dimension) |
Slice the view in the specified dimension at the given offset. More... | |
void | set_rank (dim_t dimensions) |
Set rank of the view spec to a dimensionality between 1 and NumDimensions . More... | |
constexpr SizeType | size () const |
constexpr SizeType | size (dim_t dimension) const |
constexpr const std::array< SizeType, NumDimensions > & | extents () const |
constexpr SizeType | extent (dim_t dim) const |
constexpr const std::array< IndexType, NumDimensions > & | offsets () const |
constexpr range_type | range (dim_t dim) const |
constexpr IndexType | offset (dim_t dim) const |
region_type | region () const |
Static Public Member Functions | |
static constexpr auto | ndim () |
Friends | |
template<dim_t NDim_, typename IndexType_ > | |
std::ostream & | operator<< (std::ostream &os, const ViewSpec< NDim_, IndexType_ > &viewspec) |
Specifies view parameters for implementing submat, rows and cols.
(DashCartesianSpaceConcept)
Definition at line 430 of file Dimensional.h.
|
inline |
Default constructor, initialize with extent and offset 0 in all dimensions.
Definition at line 464 of file Dimensional.h.
|
inline |
Constructor, initialize with given extents and offset 0 in all dimensions.
Definition at line 478 of file Dimensional.h.
|
inline |
Constructor, initialize with given extents and offsets.
Definition at line 493 of file Dimensional.h.
|
default |
Copy constructor.
|
default |
Move constructor.
|
inline |
Equality comparison operator.
Definition at line 541 of file Dimensional.h.
|
default |
Assignment operator.
|
default |
Move-assignment operator.
|
inline |
Equality comparison operator.
Definition at line 531 of file Dimensional.h.
|
inline |
Change the view specification's extent in every dimension.
Definition at line 550 of file Dimensional.h.
|
inline |
Change the view specification's extent and offset in every dimension.
Definition at line 563 of file Dimensional.h.
|
inline |
Change the view specification's extent in every dimension.
Definition at line 577 of file Dimensional.h.
|
inline |
Change the view specification's extent and offset in the given dimension.
Definition at line 590 of file Dimensional.h.
|
inline |
Set rank of the view spec to a dimensionality between 1 and NumDimensions
.
Definition at line 643 of file Dimensional.h.
|
inline |
Slice the view in the specified dimension at the given offset.
This is different from resizing the dimension to extent 1 (resize_dim
) which does not affect the view dimensionality or rank. Slicing removes the specified dimension and reduces the view dimensionality by 1.
All dimensions higher than the sliced dimension are projected downwards. Example:
dimensions: 0 1 2 3 : : : : extents: 3 4 5 6 | slice_dim(1, 2) | v dimensions: 0 x 1 2 : : : extents: 3 5 6
ViewSpec<NDim-1>
with the sliced dimension removed Definition at line 627 of file Dimensional.h.