DASH
0.3.0
|
Specifies how local element indices are arranged in a specific number of dimensions. More...
#include <Cartesian.h>
Public Types | |
typedef IndexType | index_type |
typedef SizeType | size_type |
typedef std::array< SizeType, NumDimensions > | extents_type |
typedef std::integral_constant< dim_t, NumDimensions > | ndim |
The number of dimension in the cartesian space. More... | |
Public Member Functions | |
constexpr | LocalMemoryLayout (const SizeSpec< NumDimensions > &sizespec, const DistributionSpec< NumDimensions > &distspec) |
Constructor, creates an instance of LocalMemoryLayout from a SizeSpec and a DistributionSpec of NumDimensions dimensions. More... | |
constexpr | LocalMemoryLayout (const DistributionSpec< NumDimensions > &distspec) |
Constructor, creates an instance of LocalMemoryLayout with initial extents 0 and a DistributionSpec of NumDimensions dimensions. More... | |
bool | operator== (const self_t &other) const |
Equality comparison operator. More... | |
constexpr bool | operator!= (const self_t &other) const |
Inequality comparison operator. More... | |
template<typename... Args> | |
void | resize (SizeType arg, Args... args) |
Change the extent of the cartesian space in every dimension. More... | |
template<typename SizeType_ > | |
void | resize (std::array< SizeType_, NumDimensions > extents) |
Change the extent of the cartesian space in every dimension. More... | |
template<typename... Args, MemArrange AtArrangement = Arrangement> | |
constexpr IndexType | at (IndexType arg, Args... args) const |
Convert the given coordinates to their respective linear index. More... | |
template<MemArrange AtArrangement = Arrangement, typename OffsetType > | |
IndexType | at (const std::array< OffsetType, NumDimensions > &point) const |
Convert the given cartesian point to its respective linear index. More... | |
template<MemArrange AtArrangement = Arrangement, typename OffsetType > | |
IndexType | at (const std::array< OffsetType, NumDimensions > &point, const ViewSpec_t &viewspec) const |
Convert the given cartesian point to a linear index, respective to the offsets specified in the given ViewSpec. More... | |
template<MemArrange CoordArrangement = Arrangement> | |
std::array< IndexType, NumDimensions > | coords (IndexType index) const |
Convert given linear offset (index) to cartesian coordinates. More... | |
constexpr dim_t | rank () const noexcept |
The number of dimension in the cartesian space with extent greater than 1. More... | |
template<typename SizeType_ > | |
void | resize (const std::array< SizeType_, NumDimensions > &extents) |
Change the extent of the cartesian space in every dimension. More... | |
void | resize (dim_t dim, SizeType extent) |
Change the extent of the cartesian space in the given dimension. More... | |
constexpr SizeType | size () const noexcept |
The number of discrete elements within the space spanned by the coordinate. More... | |
constexpr const extents_type & | extents () const noexcept |
Extents of the cartesian space, by dimension. More... | |
SizeType | extent (dim_t dim) const |
The extent of the cartesian space in the given dimension. More... | |
template<MemArrange CoordArrangement = Arrangement> | |
std::array< IndexType, NumDimensions > | coords (IndexType index, const ViewSpec_t &viewspec) const |
Convert given linear offset (index) to cartesian coordinates with respect to a given viewspec. More... | |
template<dim_t U = NumDimensions> | |
constexpr std::enable_if<(U > 0), SizeType >::type | x (SizeType offs) const |
Accessor for dimension 1 (x), enabled for dimensionality > 0. More... | |
template<dim_t U = NumDimensions> | |
constexpr std::enable_if<(U > 1), SizeType >::type | y (SizeType offs) const |
Accessor for dimension 2 (y), enabled for dimensionality > 1. More... | |
template<dim_t U = NumDimensions> | |
constexpr std::enable_if<(U > 2), SizeType >::type | z (SizeType offs) const |
Accessor for dimension 3 (z), enabled for dimensionality > 2. More... | |
Specifies how local element indices are arranged in a specific number of dimensions.
Behaves like CartesianIndexSpace if distribution is not tiled in any dimension.
NumDimensions | Number of dimensions |
Definition at line 627 of file Cartesian.h.
|
inherited |
The number of dimension in the cartesian space.
Definition at line 279 of file Cartesian.h.
|
inline |
Constructor, creates an instance of LocalMemoryLayout from a SizeSpec and a DistributionSpec of NumDimensions
dimensions.
Definition at line 644 of file Cartesian.h.
|
inline |
Constructor, creates an instance of LocalMemoryLayout with initial extents 0 and a DistributionSpec of NumDimensions
dimensions.
Definition at line 655 of file Cartesian.h.
|
inline |
Convert the given coordinates to their respective linear index.
args | An argument list consisting of the coordinates, ordered by dimension (x, y, z, ...) |
Definition at line 714 of file Cartesian.h.
|
inline |
Convert the given cartesian point to its respective linear index.
point | An array containing the coordinates, ordered by dimension (x, y, z, ...) |
Definition at line 734 of file Cartesian.h.
|
inline |
Convert the given cartesian point to a linear index, respective to the offsets specified in the given ViewSpec.
point | An array containing the coordinates, ordered by dimension (x, y, z, ...) |
viewspec | An instance of ViewSpec to apply to the given point before resolving the linear index. |
Definition at line 758 of file Cartesian.h.
|
inlineinherited |
Convert given linear offset (index) to cartesian coordinates with respect to a given viewspec.
Inverse of at
(...).
Definition at line 526 of file Cartesian.h.
|
inline |
Convert given linear offset (index) to cartesian coordinates.
Inverse of at
(...).
Definition at line 773 of file Cartesian.h.
References dash::CartesianSpace< NumDimensions, SizeType >::extents(), dash::CartesianIndexSpace< NumDimensions, Arrangement, IndexType >::extents(), and dash::typestr().
|
inlineinherited |
The extent of the cartesian space in the given dimension.
dim | The dimension in the coordinate |
Definition at line 412 of file Cartesian.h.
Referenced by dash::TilePattern< NumDimensions, Arrangement, IndexType >::at(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::at(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::at(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::block(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::block(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::block(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::block(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::block_at(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::block_at(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::block_at(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::block_at(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::blocksize(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::blocksize(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::blocksize(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::blocksize(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::coords(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::coords(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::extent(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::extent(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::extent(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::extent(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::global(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::global(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::global(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::global_at(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::global_at(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::global_at(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::local(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::local(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::local_at(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::local_at(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::local_at(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::local_block(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::local_block(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::local_block_at(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::local_block_at(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::local_block_local(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::local_coords(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::local_coords(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::local_coords(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::local_coords(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::local_extent(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::local_extent(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::local_extent(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::local_extent(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::local_index(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::ndim(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::ndim(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::underfilled_blocksize(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::underfilled_blocksize(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::unit_at(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::unit_at(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::unit_at(), and dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::unit_at().
|
inlinenoexceptinherited |
Extents of the cartesian space, by dimension.
Definition at line 402 of file Cartesian.h.
Referenced by dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::at(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::block(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::block(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::block(), dash::LocalMemoryLayout< NumDimensions, Arrangement, IndexType >::coords(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::extents(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::extents(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::extents(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::extents(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::local_at(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::local_at(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::local_at(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::local_block(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::local_block_local(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::local_block_local(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::local_block_local(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::local_block_local(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::local_extents(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::local_extents(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::ndim(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::ndim(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::sizespec(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::sizespec(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::sizespec(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::sizespec(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::underfilled_blocksize(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::underfilled_blocksize(), and dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::unit_at().
|
inline |
Inequality comparison operator.
Definition at line 674 of file Cartesian.h.
|
inline |
Equality comparison operator.
Definition at line 664 of file Cartesian.h.
|
inlinenoexceptinherited |
The number of dimension in the cartesian space with extent greater than 1.
Definition at line 315 of file Cartesian.h.
|
inlineinherited |
Change the extent of the cartesian space in every dimension.
Definition at line 363 of file Cartesian.h.
|
inlineinherited |
Change the extent of the cartesian space in the given dimension.
Definition at line 384 of file Cartesian.h.
|
inline |
Change the extent of the cartesian space in every dimension.
Definition at line 682 of file Cartesian.h.
References dash::CartesianSpace< NumDimensions, SizeType >::extents(), and dash::CartesianSpace< NumDimensions, SizeType >::resize().
|
inline |
Change the extent of the cartesian space in every dimension.
Definition at line 695 of file Cartesian.h.
|
inlinenoexceptinherited |
The number of discrete elements within the space spanned by the coordinate.
Definition at line 395 of file Cartesian.h.
Referenced by dash::TilePattern< NumDimensions, Arrangement, IndexType >::at(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::at(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::at(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::capacity(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::capacity(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::capacity(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::capacity(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::coords(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::coords(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::global(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::global(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::global(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::global_at(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::global_at(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::global_at(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::local_at(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::local_at(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::local_at(), dash::BlockPattern< 1, Arrangement, IndexType >::local_block_at(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::max_blocksize(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::max_blocksize(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::max_blocksize(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::max_blocksize(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::ndim(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::ndim(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::num_units(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::num_units(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::num_units(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::size(), dash::ShiftTilePattern< NumDimensions, Arrangement, IndexType >::size(), dash::SeqTilePattern< NumDimensions, Arrangement, IndexType >::size(), dash::TilePattern< NumDimensions, Arrangement, IndexType >::size(), dash::BlockPattern< 1, ROW_MAJOR, dash::default_index_t >::underfilled_blocksize(), and dash::TilePattern< NumDimensions, Arrangement, IndexType >::underfilled_blocksize().
|
inlineinherited |
Accessor for dimension 1 (x), enabled for dimensionality > 0.
Definition at line 591 of file Cartesian.h.
|
inlineinherited |
Accessor for dimension 2 (y), enabled for dimensionality > 1.
Definition at line 600 of file Cartesian.h.
|
inlineinherited |
Accessor for dimension 3 (z), enabled for dimensionality > 2.
Definition at line 609 of file Cartesian.h.