|
DASH
0.3.0
|
Defines how a list of global indices is mapped to single units within a Team. More...
#include <Pattern.h>
Classes | |
| struct | local_coords_type |
| struct | local_index_type |
Public Types | |
| typedef IndexType | index_type |
| typedef SizeType | size_type |
| typedef ViewSpecType | viewspec_type |
Public Member Functions | |
| PatternConcept (self_t &other) | |
| Copy constructor using non-const lvalue reference parameter. More... | |
| bool | operator== (const self_t &other) const |
| Equality comparison operator. More... | |
| bool | operator!= (const self_t &other) const |
| Inquality comparison operator. More... | |
| PatternConcept & | operator= (const PatternConcept &other) |
| Assignment operator. More... | |
| index_type | lbegin () const |
| Resolves the global index of the first local element in the pattern. More... | |
| index_type | lend () const |
| Resolves the global index past the last local element in the pattern. More... | |
| team_unit_t | unit_at (const std::array< index_type, NumDimensions > &coords, const ViewSpec_t &viewspec) const |
| unit_at More... | |
| team_unit_t | unit_at (const std::array< index_type, NumDimensions > &coords) const |
| Convert given coordinate in pattern to its assigned unit id. More... | |
| team_unit_t | unit_at (index_type global_pos, const ViewSpec_t &viewspec) const |
| Convert given global linear index to its assigned unit id. More... | |
| team_unit_t | unit_at (index_type global_pos) const |
| Convert given global linear index to its assigned unit id. More... | |
| index_type | extent (dim_t dim) const |
| extent More... | |
| index_type | local_extent (dim_t dim) const |
| The actual number of elements in this pattern that are local to the calling unit in the given dimension. More... | |
| std::array< size_type, NumDimensions > | local_extents () const |
| The actual number of elements in this pattern that are local to the active unit, by dimension. More... | |
| std::array< size_type, NumDimensions > | local_extents (team_unit_t unit) const |
| The actual number of elements in this pattern that are local to the given unit, by dimension. More... | |
| index_type | local_at (const std::array< index_type, NumDimensions > &local_coords, const ViewSpec_t &viewspec) const |
| local More... | |
| index_type | local_at (const std::array< index_type, NumDimensions > &local_coords) const |
| Convert given local coordinates to linear local offset (index). More... | |
| local_coords_t | local (const std::array< index_type, NumDimensions > &global_coords) const |
| Converts global coordinates to their associated unit and its respective local coordinates. More... | |
| local_index_t | local (index_type g_index) const |
| Converts global index to its associated unit and respective local index. More... | |
| std::array< index_type, NumDimensions > | local_coords (const std::array< index_type, NumDimensions > &global_coords) const |
| Converts global coordinates to their associated unit's respective local coordinates. More... | |
| local_index_t | local_index (const std::array< index_type, NumDimensions > &global_coords) const |
| Resolves the unit and the local index from global coordinates. More... | |
| std::array< index_type, NumDimensions > | global (team_unit_t unit, const std::array< index_type, NumDimensions > &local_coords) const |
| global More... | |
| std::array< index_type, NumDimensions > | global (const std::array< index_type, NumDimensions > &local_coords) const |
| Converts local coordinates of active unit to global coordinates. More... | |
| index_type | global (index_type local_index) const |
| Resolve an element's linear global index from the calling unit's local index of that element. More... | |
| index_type | global_index (team_unit_t unit, const std::array< index_type, NumDimensions > &local_coords) const |
| Resolve an element's linear global index from a given unit's local coordinates of that element. More... | |
| index_type | global_at (const std::array< index_type, NumDimensions > &view_coords, const ViewSpec_t &viewspec) const |
| Global coordinates and viewspec to global position in the pattern's iteration order. More... | |
| index_type | global_at (const std::array< index_type, NumDimensions > &global_coords) const |
| Global coordinates to global position in the pattern's iteration order. More... | |
| index_type | at (const std::array< index_type, NumDimensions > &global_coords) const |
| at More... | |
| index_type | at (const std::array< index_type, NumDimensions > &global_coords, const ViewSpec_t &viewspec) const |
| Global coordinates and viewspec to local index. More... | |
| template<typename ... Values> | |
| index_type | at (index_type value, Values ... values) const |
| Global coordinates to local index. More... | |
| bool | is_local (index_type index, team_unit_t unit) const |
| is_local More... | |
| bool | is_local (index_type index) const |
| Whether the given global index is local to the unit that created this pattern instance. More... | |
| const BlockSpec_t & | blockspec () const |
| block More... | |
| index_type | block_at (const std::array< index_type, NumDimensions > &g_coords) const |
| Index of block at given global coordinates. More... | |
| ViewSpec_t | block (index_type global_block_index) const |
| View spec (offset and extents) of block at global linear block index in cartesian element space. More... | |
| ViewSpec_t | local_block (index_type local_block_index) const |
| View spec (offset and extents) of block at local linear block index in global cartesian element space. More... | |
| ViewSpec_t | local_block_local (index_type local_block_index) const |
| View spec (offset and extents) of block at local linear block index in local cartesian element space. More... | |
| size_type | blocksize (dim_t dimension) const |
| Maximum number of elements in a single block in the given dimension. More... | |
| size_type | max_blocksize () const |
| Maximum number of elements in a single block in all dimensions. More... | |
| size_type | local_capacity () const |
| Maximum number of elements assigned to a single unit in total, equivalent to the local capacity of every unit in this pattern. More... | |
| size_type | local_size (team_unit_t unit=UNDEFINED_TEAM_UNIT_ID) const |
| The actual number of elements in this pattern that are local to the calling unit in total. More... | |
| index_type | capacity () const |
| The maximum number of elements arranged in this pattern. More... | |
| index_type | size () const |
| The number of elements arranged in this pattern. More... | |
| dash::Team & | team () const |
| The Team containing the units to which this pattern's elements are mapped. More... | |
| const DistributionSpec_t & | distspec () const |
| Distribution specification of this pattern. More... | |
| SizeSpec_t | sizespec () const |
| Size specification of the index space mapped by this pattern. More... | |
| const std::array< size_type, NumDimensions > & | extents () const |
| Size specification of the index space mapped by this pattern. More... | |
| const TeamSpec_t & | teamspec () const |
| Cartesian arrangement of the Team containing the units to which this pattern's elements are mapped. More... | |
| std::array< index_type, NumDimensions > | coords (index_type index) const |
| Convert given global linear offset (index) to global cartesian coordinates. More... | |
| std::array< index_type, NumDimensions > | coords (index_type index, const ViewSpec_t &viewspec) const |
| Convert given global linear offset (index) to global cartesian coordinates using viewspec. More... | |
| size_type | underfilled_blocksize (dim_t dimension) const |
| Number of elements missing in the overflow block of given dimension compared to the regular blocksize (. More... | |
Static Public Member Functions | |
| static constexpr MemArrange | memory_order () |
| Memory order followed by the pattern. More... | |
| static constexpr dim_t | ndim () |
| Number of dimensions of the cartesian space partitioned by the pattern. More... | |
Static Public Attributes | |
| static constexpr char const * | PatternName = "TheConcretePatternTypeName" |
Defines how a list of global indices is mapped to single units within a Team.
| NumDimensions | The number of dimensions of the pattern |
| Arrangement | The memory order of the pattern (ROW_MAJOR or COL_MAJOR), defaults to ROW_MAJOR. Memory order defines how elements in the pattern will be iterated predominantly |
| dash::PatternConcept< NumDimensions, Arrangement, IndexType >::PatternConcept | ( | self_t & | other | ) |
Copy constructor using non-const lvalue reference parameter.
Introduced so variadic constructor is not a better match for copy-construction.
| index_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::at | ( | const std::array< index_type, NumDimensions > & | global_coords | ) | const |
at
Global coordinates to local index.
Convert given global coordinates in pattern to their respective linear local index.
| index_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::at | ( | const std::array< index_type, NumDimensions > & | global_coords, |
| const ViewSpec_t & | viewspec | ||
| ) | const |
Global coordinates and viewspec to local index.
Convert given global coordinate in pattern to its linear local index.
| index_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::at | ( | index_type | value, |
| Values ... | values | ||
| ) | const |
Global coordinates to local index.
Convert given coordinate in pattern to its linear local index.
| ViewSpec_t dash::PatternConcept< NumDimensions, Arrangement, IndexType >::block | ( | index_type | global_block_index | ) | const |
View spec (offset and extents) of block at global linear block index in cartesian element space.
| index_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::block_at | ( | const std::array< index_type, NumDimensions > & | g_coords | ) | const |
Index of block at given global coordinates.
| g_coords | Global coordinates of element |
| size_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::blocksize | ( | dim_t | dimension | ) | const |
Maximum number of elements in a single block in the given dimension.
| dimension | The dimension in the pattern |
| const BlockSpec_t& dash::PatternConcept< NumDimensions, Arrangement, IndexType >::blockspec | ( | ) | const |
block
Cartesian arrangement of pattern blocks.
|
inline |
The maximum number of elements arranged in this pattern.
| std::array<index_type, NumDimensions> dash::PatternConcept< NumDimensions, Arrangement, IndexType >::coords | ( | index_type | index | ) | const |
Convert given global linear offset (index) to global cartesian coordinates.
| std::array<index_type, NumDimensions> dash::PatternConcept< NumDimensions, Arrangement, IndexType >::coords | ( | index_type | index, |
| const ViewSpec_t & | viewspec | ||
| ) | const |
Convert given global linear offset (index) to global cartesian coordinates using viewspec.
| const DistributionSpec_t& dash::PatternConcept< NumDimensions, Arrangement, IndexType >::distspec | ( | ) | const |
Distribution specification of this pattern.
| index_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::extent | ( | dim_t | dim | ) | const |
extent
The number of elements in this pattern in the given dimension.
| const std::array<size_type, NumDimensions>& dash::PatternConcept< NumDimensions, Arrangement, IndexType >::extents | ( | ) | const |
Size specification of the index space mapped by this pattern.
| std::array<index_type, NumDimensions> dash::PatternConcept< NumDimensions, Arrangement, IndexType >::global | ( | team_unit_t | unit, |
| const std::array< index_type, NumDimensions > & | local_coords | ||
| ) | const |
| std::array<index_type, NumDimensions> dash::PatternConcept< NumDimensions, Arrangement, IndexType >::global | ( | const std::array< index_type, NumDimensions > & | local_coords | ) | const |
Converts local coordinates of active unit to global coordinates.
| index_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::global | ( | index_type | local_index | ) | const |
Resolve an element's linear global index from the calling unit's local index of that element.
| index_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::global_at | ( | const std::array< index_type, NumDimensions > & | view_coords, |
| const ViewSpec_t & | viewspec | ||
| ) | const |
Global coordinates and viewspec to global position in the pattern's iteration order.
| index_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::global_at | ( | const std::array< index_type, NumDimensions > & | global_coords | ) | const |
Global coordinates to global position in the pattern's iteration order.
NOTE: Expects extent[d] to be a multiple of blocksize[d] * nunits[d] to ensure the balanced property.
| index_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::global_index | ( | team_unit_t | unit, |
| const std::array< index_type, NumDimensions > & | local_coords | ||
| ) | const |
Resolve an element's linear global index from a given unit's local coordinates of that element.
| bool dash::PatternConcept< NumDimensions, Arrangement, IndexType >::is_local | ( | index_type | index, |
| team_unit_t | unit | ||
| ) | const |
| bool dash::PatternConcept< NumDimensions, Arrangement, IndexType >::is_local | ( | index_type | index | ) | const |
Whether the given global index is local to the unit that created this pattern instance.
| index_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::lbegin | ( | ) | const |
Resolves the global index of the first local element in the pattern.
| index_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::lend | ( | ) | const |
Resolves the global index past the last local element in the pattern.
| local_coords_t dash::PatternConcept< NumDimensions, Arrangement, IndexType >::local | ( | const std::array< index_type, NumDimensions > & | global_coords | ) | const |
Converts global coordinates to their associated unit and its respective local coordinates.
| local_index_t dash::PatternConcept< NumDimensions, Arrangement, IndexType >::local | ( | index_type | g_index | ) | const |
Converts global index to its associated unit and respective local index.
| index_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::local_at | ( | const std::array< index_type, NumDimensions > & | local_coords, |
| const ViewSpec_t & | viewspec | ||
| ) | const |
local
Convert given local coordinates and viewspec to linear local offset (index).
| local_coords | Point in local memory |
| viewspec | View specification (offsets) to apply on coords |
| index_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::local_at | ( | const std::array< index_type, NumDimensions > & | local_coords | ) | const |
Convert given local coordinates to linear local offset (index).
| local_coords | Point in local memory |
| ViewSpec_t dash::PatternConcept< NumDimensions, Arrangement, IndexType >::local_block | ( | index_type | local_block_index | ) | const |
View spec (offset and extents) of block at local linear block index in global cartesian element space.
| ViewSpec_t dash::PatternConcept< NumDimensions, Arrangement, IndexType >::local_block_local | ( | index_type | local_block_index | ) | const |
View spec (offset and extents) of block at local linear block index in local cartesian element space.
|
inline |
Maximum number of elements assigned to a single unit in total, equivalent to the local capacity of every unit in this pattern.
| std::array<index_type, NumDimensions> dash::PatternConcept< NumDimensions, Arrangement, IndexType >::local_coords | ( | const std::array< index_type, NumDimensions > & | global_coords | ) | const |
Converts global coordinates to their associated unit's respective local coordinates.
| index_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::local_extent | ( | dim_t | dim | ) | const |
The actual number of elements in this pattern that are local to the calling unit in the given dimension.
| std::array<size_type, NumDimensions> dash::PatternConcept< NumDimensions, Arrangement, IndexType >::local_extents | ( | ) | const |
The actual number of elements in this pattern that are local to the active unit, by dimension.
| std::array<size_type, NumDimensions> dash::PatternConcept< NumDimensions, Arrangement, IndexType >::local_extents | ( | team_unit_t | unit | ) | const |
The actual number of elements in this pattern that are local to the given unit, by dimension.
| local_index_t dash::PatternConcept< NumDimensions, Arrangement, IndexType >::local_index | ( | const std::array< index_type, NumDimensions > & | global_coords | ) | const |
Resolves the unit and the local index from global coordinates.
|
inline |
The actual number of elements in this pattern that are local to the calling unit in total.
| size_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::max_blocksize | ( | ) | const |
Maximum number of elements in a single block in all dimensions.
|
static |
Memory order followed by the pattern.
|
static |
Number of dimensions of the cartesian space partitioned by the pattern.
| bool dash::PatternConcept< NumDimensions, Arrangement, IndexType >::operator!= | ( | const self_t & | other | ) | const |
Inquality comparison operator.
| other | Pattern instance to compare for inequality |
| PatternConcept& dash::PatternConcept< NumDimensions, Arrangement, IndexType >::operator= | ( | const PatternConcept< NumDimensions, Arrangement, IndexType > & | other | ) |
Assignment operator.
| bool dash::PatternConcept< NumDimensions, Arrangement, IndexType >::operator== | ( | const self_t & | other | ) | const |
Equality comparison operator.
| other | Pattern instance to compare for equality |
|
inline |
The number of elements arranged in this pattern.
| SizeSpec_t dash::PatternConcept< NumDimensions, Arrangement, IndexType >::sizespec | ( | ) | const |
Size specification of the index space mapped by this pattern.
|
inline |
The Team containing the units to which this pattern's elements are mapped.
| const TeamSpec_t& dash::PatternConcept< NumDimensions, Arrangement, IndexType >::teamspec | ( | ) | const |
Cartesian arrangement of the Team containing the units to which this pattern's elements are mapped.
| size_type dash::PatternConcept< NumDimensions, Arrangement, IndexType >::underfilled_blocksize | ( | dim_t | dimension | ) | const |
Number of elements missing in the overflow block of given dimension compared to the regular blocksize (.
underfilled_blocksize(d) < blocksize(d). | team_unit_t dash::PatternConcept< NumDimensions, Arrangement, IndexType >::unit_at | ( | const std::array< index_type, NumDimensions > & | coords, |
| const ViewSpec_t & | viewspec | ||
| ) | const |
unit_at
Convert given point in pattern to its assigned unit id.
| coords | Absolute coordinates of the point |
| viewspec | View specification (offsets) to apply on coords |
| team_unit_t dash::PatternConcept< NumDimensions, Arrangement, IndexType >::unit_at | ( | const std::array< index_type, NumDimensions > & | coords | ) | const |
Convert given coordinate in pattern to its assigned unit id.
| team_unit_t dash::PatternConcept< NumDimensions, Arrangement, IndexType >::unit_at | ( | index_type | global_pos, |
| const ViewSpec_t & | viewspec | ||
| ) | const |
Convert given global linear index to its assigned unit id.
| global_pos | Global linear element offset |
| viewspec | View to apply global position |
| team_unit_t dash::PatternConcept< NumDimensions, Arrangement, IndexType >::unit_at | ( | index_type | global_pos | ) | const |
Convert given global linear index to its assigned unit id.
| global_pos | Global linear element offset |