DASH
0.3.0
|
Irregular dynamic pattern. More...
#include <LoadBalancePattern.h>
Classes | |
struct | local_coords_t |
struct | local_index_t |
Public Types | |
typedef pattern_partitioning_properties< pattern_partitioning_tag::minimal, pattern_partitioning_tag::rectangular, pattern_partitioning_tag::balanced, pattern_partitioning_tag::unbalanced, pattern_partitioning_tag::dynamic > | partitioning_properties |
Satisfiable properties in pattern property category Partitioning: More... | |
typedef pattern_mapping_properties< pattern_mapping_tag::unbalanced > | mapping_properties |
Satisfiable properties in pattern property category Mapping: More... | |
typedef pattern_layout_properties< pattern_layout_tag::blocked, pattern_layout_tag::linear > | layout_properties |
Satisfiable properties in pattern property category Layout: More... | |
typedef IndexType | index_type |
typedef SizeType | size_type |
typedef ViewSpec_t | viewspec_type |
Public Member Functions | |
LoadBalancePattern (const SizeSpec_t &sizespec, TeamLocality_t &team_loc) | |
Constructor. More... | |
LoadBalancePattern (const SizeSpec_t &sizespec, dash::Team &team=dash::Team::All()) | |
Constructor. More... | |
LoadBalancePattern (const self_t &other)=default | |
LoadBalancePattern (self_t &&other)=default | |
self_t & | operator= (const self_t &other)=default |
self_t & | operator= (self_t &&other)=default |
LoadBalancePattern (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... | |
IndexType | lbegin () const |
Resolves the global index of the first local element in the pattern. More... | |
IndexType | lend () const |
Resolves the global index past the last local element in the pattern. More... | |
team_unit_t | unit_at (const std::array< IndexType, NumDimensions > &coords, const ViewSpec_t &viewspec) const |
unit_at More... | |
team_unit_t | unit_at (const std::array< IndexType, NumDimensions > &g_coords) const |
Convert given coordinate in pattern to its assigned unit id. More... | |
team_unit_t | unit_at (IndexType global_pos, const ViewSpec_t &viewspec) const |
Convert given global linear index to its assigned unit id. More... | |
team_unit_t | unit_at (IndexType g_index) const |
Convert given global linear index to its assigned unit id. More... | |
IndexType | extent (dim_t dim) const |
extent More... | |
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. More... | |
std::array< SizeType, 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... | |
IndexType | local_at (const std::array< IndexType, NumDimensions > &local_coords, const ViewSpec_t &viewspec) const |
local More... | |
IndexType | local_at (const std::array< IndexType, NumDimensions > &local_coords) const |
Convert given local coordinates to linear local offset (index). More... | |
local_coords_t | local (const std::array< IndexType, NumDimensions > &g_coords) const |
Converts global coordinates to their associated unit and its respective local coordinates. More... | |
local_index_t | local (IndexType g_index) const |
Converts global index to its associated unit and respective local index. More... | |
std::array< IndexType, NumDimensions > | local_coords (const std::array< IndexType, NumDimensions > &g_coords) const |
Converts global coordinates to their associated unit's respective local coordinates. More... | |
local_index_t | local_index (const std::array< IndexType, NumDimensions > &g_coords) const |
Converts global coordinates to their associated unit and their respective local index. More... | |
std::array< IndexType, NumDimensions > | global (team_unit_t unit, const std::array< IndexType, NumDimensions > &local_coords) const |
global More... | |
std::array< IndexType, NumDimensions > | global (const std::array< IndexType, NumDimensions > &l_coords) const |
Converts local coordinates of active unit to global coordinates. More... | |
IndexType | global (team_unit_t unit, IndexType l_index) const |
Resolve an element's linear global index from the given unit's local index of that element. More... | |
IndexType | global (IndexType l_index) const |
Resolve an element's linear global index from the calling unit's local index of that element. More... | |
IndexType | global_index (team_unit_t unit, const std::array< IndexType, NumDimensions > &l_coords) const |
Resolve an element's linear global index from a given unit's local coordinates of that element. More... | |
IndexType | at (const std::array< IndexType, NumDimensions > &g_coords) const |
at More... | |
IndexType | at (const std::array< IndexType, NumDimensions > &g_coords, const ViewSpec_t &viewspec) const |
Global coordinates and viewspec to local index. More... | |
template<typename ... Values> | |
IndexType | at (IndexType value, Values ... values) const |
Global coordinates to local index. More... | |
bool | is_local (IndexType index, team_unit_t unit) const |
is_local More... | |
bool | is_local (IndexType 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 g_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 l_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 l_block_index) const |
View spec (offset and extents) of block at local linear block index in local cartesian element space. More... | |
SizeType | blocksize (dim_t dimension) const |
Maximum number of elements in a single block in the given dimension. More... | |
SizeType | max_blocksize () const |
Maximum number of elements in a single block in all dimensions. More... | |
SizeType | local_capacity () const |
Maximum number of elements assigned to a single unit. More... | |
SizeType | 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... | |
IndexType | num_units () const |
The number of units to which this pattern's elements are mapped. More... | |
IndexType | capacity () const |
The maximum number of elements arranged in this pattern. More... | |
IndexType | 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< SizeType, 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< IndexType, NumDimensions > | coords (IndexType index) const |
Convert given global linear offset (index) to global cartesian coordinates. More... | |
std::array< IndexType, NumDimensions > | coords (IndexType index, const ViewSpec_t &viewspec) const |
Convert given global linear offset (index) to global cartesian coordinates using viewspec. More... | |
const std::vector< double > & | unit_cpu_weights () const |
const std::vector< double > & | unit_membw_weights () const |
const std::vector< double > & | unit_load_weights () const |
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 = "LoadBalancePattern1D" |
Irregular dynamic pattern.
Specialization for 1-dimensional data.
Definition at line 203 of file LoadBalancePattern.h.
typedef pattern_layout_properties< pattern_layout_tag::blocked, pattern_layout_tag::linear > dash::LoadBalancePattern< 1, CompBasedMeasure, MemBasedMeasure, Arrangement, IndexType >::layout_properties |
Satisfiable properties in pattern property category Layout:
Definition at line 241 of file LoadBalancePattern.h.
typedef pattern_mapping_properties< pattern_mapping_tag::unbalanced > dash::LoadBalancePattern< 1, CompBasedMeasure, MemBasedMeasure, Arrangement, IndexType >::mapping_properties |
Satisfiable properties in pattern property category Mapping:
Definition at line 233 of file LoadBalancePattern.h.
typedef pattern_partitioning_properties< pattern_partitioning_tag::minimal, pattern_partitioning_tag::rectangular, pattern_partitioning_tag::balanced, pattern_partitioning_tag::unbalanced, pattern_partitioning_tag::dynamic > dash::LoadBalancePattern< 1, CompBasedMeasure, MemBasedMeasure, Arrangement, IndexType >::partitioning_properties |
Satisfiable properties in pattern property category Partitioning:
Definition at line 228 of file LoadBalancePattern.h.
|
inline |
Constructor.
sizespec | Size spec of the pattern. |
team_loc | Locality hierarchy of the team. |
Definition at line 293 of file LoadBalancePattern.h.
|
inline |
Constructor.
sizespec | Size spec of the pattern. |
team | Team containing units to which this pattern maps its elements. |
Definition at line 346 of file LoadBalancePattern.h.
|
inline |
Copy constructor using non-const lvalue reference parameter.
Introduced so variadic constructor is not a better match for copy-construction.
Definition at line 366 of file LoadBalancePattern.h.
|
inline |
at
Global coordinates to local index.
Convert given global coordinates in pattern to their respective linear local index.
Definition at line 745 of file LoadBalancePattern.h.
|
inline |
Global coordinates and viewspec to local index.
Convert given global coordinate in pattern to its linear local index.
Definition at line 758 of file LoadBalancePattern.h.
|
inline |
Global coordinates to local index.
Convert given coordinate in pattern to its linear local index.
Definition at line 775 of file LoadBalancePattern.h.
|
inline |
View spec (offset and extents) of block at global linear block index in cartesian element space.
Definition at line 860 of file LoadBalancePattern.h.
|
inline |
Index of block at given global coordinates.
g_coords | Global coordinates of element |
Definition at line 844 of file LoadBalancePattern.h.
|
inline |
Maximum number of elements in a single block in the given dimension.
dimension | The dimension in the pattern |
Definition at line 917 of file LoadBalancePattern.h.
|
inline |
|
inline |
The maximum number of elements arranged in this pattern.
Definition at line 981 of file LoadBalancePattern.h.
|
inline |
Convert given global linear offset (index) to global cartesian coordinates.
Definition at line 1050 of file LoadBalancePattern.h.
|
inline |
Convert given global linear offset (index) to global cartesian coordinates using viewspec.
Definition at line 1062 of file LoadBalancePattern.h.
|
inline |
Distribution specification of this pattern.
Definition at line 1008 of file LoadBalancePattern.h.
|
inline |
extent
The number of elements in this pattern in the given dimension.
Definition at line 499 of file LoadBalancePattern.h.
|
inline |
Size specification of the index space mapped by this pattern.
Definition at line 1028 of file LoadBalancePattern.h.
|
inline |
global
Converts local coordinates of a given unit to global coordinates.
Definition at line 661 of file LoadBalancePattern.h.
|
inline |
Converts local coordinates of active unit to global coordinates.
Definition at line 682 of file LoadBalancePattern.h.
References dash::global().
|
inline |
Resolve an element's linear global index from the given unit's local index of that element.
Definition at line 696 of file LoadBalancePattern.h.
|
inline |
Resolve an element's linear global index from the calling unit's local index of that element.
Definition at line 711 of file LoadBalancePattern.h.
References dash::global().
|
inline |
Resolve an element's linear global index from a given unit's local coordinates of that element.
Definition at line 725 of file LoadBalancePattern.h.
|
inline |
is_local
Whether the given global index is local to the specified unit.
Definition at line 795 of file LoadBalancePattern.h.
|
inline |
Whether the given global index is local to the unit that created this pattern instance.
Definition at line 814 of file LoadBalancePattern.h.
|
inline |
Resolves the global index of the first local element in the pattern.
Definition at line 404 of file LoadBalancePattern.h.
|
inline |
Resolves the global index past the last local element in the pattern.
Definition at line 414 of file LoadBalancePattern.h.
|
inline |
Converts global coordinates to their associated unit and its respective local coordinates.
NOTE: Same as local_index
.
Definition at line 587 of file LoadBalancePattern.h.
References dash::local().
|
inline |
Converts global index to its associated unit and respective local index.
NOTE: Same as local_index
.
Definition at line 604 of file LoadBalancePattern.h.
|
inline |
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 |
Definition at line 558 of file LoadBalancePattern.h.
|
inline |
Convert given local coordinates to linear local offset (index).
local_coords | Point in local memory |
Definition at line 572 of file LoadBalancePattern.h.
|
inline |
View spec (offset and extents) of block at local linear block index in global cartesian element space.
Definition at line 877 of file LoadBalancePattern.h.
|
inline |
View spec (offset and extents) of block at local linear block index in local cartesian element space.
Definition at line 897 of file LoadBalancePattern.h.
|
inline |
Maximum number of elements assigned to a single unit.
Definition at line 942 of file LoadBalancePattern.h.
|
inline |
Converts global coordinates to their associated unit's respective local coordinates.
Definition at line 633 of file LoadBalancePattern.h.
References dash::local().
|
inline |
The actual number of elements in this pattern that are local to the calling unit in the given dimension.
Definition at line 519 of file LoadBalancePattern.h.
|
inline |
The actual number of elements in this pattern that are local to the given unit, by dimension.
Definition at line 539 of file LoadBalancePattern.h.
|
inline |
Converts global coordinates to their associated unit and their respective local index.
Definition at line 646 of file LoadBalancePattern.h.
References dash::local().
|
inline |
The actual number of elements in this pattern that are local to the calling unit in total.
Definition at line 957 of file LoadBalancePattern.h.
|
inline |
Maximum number of elements in a single block in all dimensions.
Definition at line 932 of file LoadBalancePattern.h.
|
inlinestatic |
Memory order followed by the pattern.
Definition at line 1072 of file LoadBalancePattern.h.
|
inlinestatic |
Number of dimensions of the cartesian space partitioned by the pattern.
Definition at line 1080 of file LoadBalancePattern.h.
References dash::global(), dash::max_element(), dash::Team::size(), and dash::transform().
|
inline |
The number of units to which this pattern's elements are mapped.
Definition at line 971 of file LoadBalancePattern.h.
|
inline |
Inquality comparison operator.
other | Pattern instance to compare for inequality |
Definition at line 392 of file LoadBalancePattern.h.
|
inline |
Equality comparison operator.
other | Pattern instance to compare for equality |
Definition at line 373 of file LoadBalancePattern.h.
|
inline |
The number of elements arranged in this pattern.
Definition at line 991 of file LoadBalancePattern.h.
|
inline |
Size specification of the index space mapped by this pattern.
Definition at line 1018 of file LoadBalancePattern.h.
|
inline |
The Team containing the units to which this pattern's elements are mapped.
Definition at line 1000 of file LoadBalancePattern.h.
|
inline |
Cartesian arrangement of the Team containing the units to which this pattern's elements are mapped.
Definition at line 1039 of file LoadBalancePattern.h.
|
inline |
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 |
Definition at line 428 of file LoadBalancePattern.h.
|
inline |
Convert given coordinate in pattern to its assigned unit id.
Definition at line 442 of file LoadBalancePattern.h.
|
inline |
Convert given global linear index to its assigned unit id.
global_pos | Global linear element offset |
viewspec | View to apply global position |
Definition at line 453 of file LoadBalancePattern.h.
|
inline |
Convert given global linear index to its assigned unit id.
g_index | Global linear element offset |
Definition at line 467 of file LoadBalancePattern.h.