DASH
0.3.0
|
Irregular Pattern for Compressed Sparse Row Storage. More...
#include <CSRPattern.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 > | 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 | |
template<typename ... Args> | |
CSRPattern (SizeType arg, Args &&... args) | |
Constructor, initializes a pattern from an argument list consisting of the pattern size (extent, number of elements) followed by an optional distribution type. More... | |
CSRPattern (const SizeSpec_t &sizespec, const DistributionSpec_t &distspec, const TeamSpec_t &teamspec, Team &team=dash::Team::All()) | |
Constructor, initializes a pattern from explicit instances of SizeSpec , DistributionSpec , TeamSpec and Team . More... | |
CSRPattern (const SizeSpec_t &sizespec, const DistributionSpec_t &distspec, Team &team=dash::Team::All()) | |
Constructor, initializes a pattern from explicit instances of SizeSpec , DistributionSpec and Team . More... | |
template<typename ... Args> | |
CSRPattern (const std::vector< size_type > &local_sizes, SizeType arg, Args &&... args) | |
Constructor, initializes a pattern from an argument list consisting of the pattern size (extent, number of elements) followed by an optional distribution type. More... | |
CSRPattern (const std::vector< size_type > &local_sizes, const TeamSpec_t &teamspec, dash::Team &team=dash::Team::All()) | |
Constructor, initializes a pattern from explicit instances of SizeSpec , DistributionSpec , TeamSpec and a Team . More... | |
CSRPattern (const std::vector< size_type > &local_sizes, Team &team=dash::Team::All()) | |
Constructor, initializes a pattern from explicit instances of SizeSpec , DistributionSpec , TeamSpec and a Team . More... | |
CSRPattern (const self_t &other)=default | |
Copy constructor. More... | |
CSRPattern (self_t &&other)=default | |
Move constructor. More... | |
CSRPattern (self_t &other) | |
Copy constructor using non-const lvalue reference parameter. 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 noexcept |
Equality comparison operator. More... | |
constexpr bool | operator!= (const self_t &other) const noexcept |
Inquality comparison operator. More... | |
constexpr IndexType | lbegin () const noexcept |
Resolves the global index of the first local element in the pattern. More... | |
constexpr IndexType | lend () const noexcept |
Resolves the global index past the last local element in the pattern. More... | |
constexpr team_unit_t | unit_at (const std::array< IndexType, NumDimensions > &coords, const ViewSpec_t &viewspec) const |
unit_at More... | |
constexpr team_unit_t | unit_at (const std::array< IndexType, NumDimensions > &g_coords) const |
Convert given coordinate in pattern to its assigned unit id. More... | |
constexpr 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... | |
constexpr std::array< SizeType, NumDimensions > | local_extents () const noexcept |
The actual number of elements in this pattern that are local to the calling unit, by dimension. More... | |
constexpr std::array< SizeType, NumDimensions > | local_extents (team_unit_t unit) const noexcept |
The actual number of elements in this pattern that are local to the given unit, by dimension. More... | |
constexpr IndexType | local_at (const std::array< IndexType, NumDimensions > &local_coords, const ViewSpec_t &viewspec) const noexcept |
local More... | |
constexpr 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... | |
constexpr 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... | |
constexpr 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... | |
constexpr std::array< IndexType, NumDimensions > | global (const std::array< IndexType, NumDimensions > &l_coords) const |
Converts local coordinates of active unit to global coordinates. More... | |
constexpr 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... | |
constexpr IndexType | global (IndexType l_index) const |
Resolve an element's linear global index from the calling unit's local index of that element. More... | |
constexpr 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... | |
constexpr 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> | |
constexpr IndexType | at (IndexType value, Values ... values) const |
Global coordinates to local index. More... | |
constexpr bool | is_local (IndexType index, team_unit_t unit) const noexcept |
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... | |
constexpr const BlockSpec_t & | blockspec () const noexcept |
block More... | |
constexpr 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... | |
constexpr SizeType | blocksize (dim_t dimension) const noexcept |
Maximum number of elements in a single block in the given dimension. More... | |
constexpr SizeType | max_blocksize () const noexcept |
Maximum number of elements in a single block in all dimensions. More... | |
constexpr SizeType | local_capacity () const noexcept |
Maximum number of elements assigned to a single unit in total, equivalent to the local capacity of every unit in this pattern. More... | |
constexpr SizeType | local_size () const noexcept |
The actual number of elements in this pattern that are local to the calling unit in total. More... | |
constexpr SizeType | local_size (team_unit_t unit) const noexcept |
constexpr IndexType | num_units () const noexcept |
The number of units to which this pattern's elements are mapped. More... | |
constexpr IndexType | capacity () const noexcept |
The maximum number of elements arranged in this pattern. More... | |
constexpr IndexType | size () const noexcept |
The number of elements arranged in this pattern. More... | |
constexpr dash::Team & | team () const noexcept |
The Team containing the units to which this pattern's elements are mapped. More... | |
constexpr const DistributionSpec_t & | distspec () const noexcept |
Distribution specification of this pattern. More... | |
constexpr SizeSpec_t | sizespec () const noexcept |
Size specification of the index space mapped by this pattern. More... | |
constexpr const std::array< SizeType, NumDimensions > | extents () const noexcept |
Size specification of the index space mapped by this pattern. More... | |
constexpr const TeamSpec_t & | teamspec () const noexcept |
Cartesian arrangement of the Team containing the units to which this pattern's elements are mapped. More... | |
constexpr std::array< IndexType, NumDimensions > | coords (IndexType index) const noexcept |
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... | |
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 = "CSRPattern1D" |
Irregular Pattern for Compressed Sparse Row Storage.
Specialization for 1-dimensional data.
Definition at line 52 of file CSRPattern.h.
typedef pattern_layout_properties< pattern_layout_tag::blocked, pattern_layout_tag::linear > dash::CSRPattern< 1, Arrangement, IndexType >::layout_properties |
Satisfiable properties in pattern property category Layout:
Definition at line 85 of file CSRPattern.h.
typedef pattern_mapping_properties< pattern_mapping_tag::unbalanced > dash::CSRPattern< 1, Arrangement, IndexType >::mapping_properties |
Satisfiable properties in pattern property category Mapping:
Definition at line 77 of file CSRPattern.h.
typedef pattern_partitioning_properties< pattern_partitioning_tag::minimal, pattern_partitioning_tag::rectangular, pattern_partitioning_tag::balanced, pattern_partitioning_tag::unbalanced > dash::CSRPattern< 1, Arrangement, IndexType >::partitioning_properties |
Satisfiable properties in pattern property category Partitioning:
Definition at line 72 of file CSRPattern.h.
|
inline |
Constructor, initializes a pattern from an argument list consisting of the pattern size (extent, number of elements) followed by an optional distribution type.
arg | Argument list consisting of the pattern size (extent, number of elements) in every dimension followed by optional distribution types. |
args | Argument list consisting of the pattern size (extent, number of elements) in every dimension followed by optional distribution types. |
Definition at line 163 of file CSRPattern.h.
|
inline |
Constructor, initializes a pattern from explicit instances of SizeSpec
, DistributionSpec
, TeamSpec
and Team
.
sizespec | Size spec of the pattern. |
distspec | Distribution spec. |
teamspec | Cartesian arrangement of units within the team |
team | Team containing units to which this pattern maps its elements. |
Definition at line 188 of file CSRPattern.h.
References dash::Team::size().
|
inline |
Constructor, initializes a pattern from explicit instances of SizeSpec
, DistributionSpec
and Team
.
sizespec | Size spec of the pattern. |
distspec | Distribution spec. |
team | Team containing units to which this pattern maps its elements. |
Definition at line 235 of file CSRPattern.h.
References dash::Team::size().
|
inline |
Constructor, initializes a pattern from an argument list consisting of the pattern size (extent, number of elements) followed by an optional distribution type.
local_sizes | Number of local elements for every unit in the active team. |
arg | Argument list consisting of the pattern size (extent, number of elements) in every dimension followed by optional distribution types. |
args | Argument list consisting of the pattern size (extent, number of elements) in every dimension followed by optional distribution types. |
Definition at line 279 of file CSRPattern.h.
|
inline |
Constructor, initializes a pattern from explicit instances of SizeSpec
, DistributionSpec
, TeamSpec
and a Team
.
local_sizes | Number of local elements for every unit in the active team. |
teamspec | Cartesian arrangement of units within the team |
team | Team containing units to which this pattern maps its elements |
Definition at line 306 of file CSRPattern.h.
References dash::Team::size().
|
inline |
Constructor, initializes a pattern from explicit instances of SizeSpec
, DistributionSpec
, TeamSpec
and a Team
.
local_sizes | Number of local elements for every unit in the active team. |
team | Team containing units to which this pattern maps its elements |
Definition at line 349 of file CSRPattern.h.
References dash::Team::size().
|
default |
Copy constructor.
|
default |
Move constructor.
|
inline |
Copy constructor using non-const lvalue reference parameter.
Introduced so variadic constructor is not a better match for copy-construction.
Definition at line 403 of file CSRPattern.h.
|
inline |
at
Global coordinates to local index.
Convert given global coordinates in pattern to their respective linear local index.
Definition at line 802 of file CSRPattern.h.
|
inline |
Global coordinates and viewspec to local index.
Convert given global coordinate in pattern to its linear local index.
Definition at line 815 of file CSRPattern.h.
|
inline |
Global coordinates to local index.
Convert given coordinate in pattern to its linear local index.
Definition at line 832 of file CSRPattern.h.
|
inline |
View spec (offset and extents) of block at global linear block index in cartesian element space.
Definition at line 905 of file CSRPattern.h.
|
inline |
Index of block at given global coordinates.
g_coords | Global coordinates of element |
Definition at line 894 of file CSRPattern.h.
|
inlinenoexcept |
Maximum number of elements in a single block in the given dimension.
dimension | The dimension in the pattern |
Definition at line 961 of file CSRPattern.h.
|
inlinenoexcept |
|
inlinenoexcept |
The maximum number of elements arranged in this pattern.
Definition at line 1028 of file CSRPattern.h.
|
inlinenoexcept |
Convert given global linear offset (index) to global cartesian coordinates.
Definition at line 1098 of file CSRPattern.h.
References dash::index().
|
inline |
Convert given global linear offset (index) to global cartesian coordinates using viewspec.
Definition at line 1110 of file CSRPattern.h.
|
inlinenoexcept |
Distribution specification of this pattern.
Definition at line 1055 of file CSRPattern.h.
|
inline |
extent
The number of elements in this pattern in the given dimension.
Definition at line 545 of file CSRPattern.h.
|
inlinenoexcept |
Size specification of the index space mapped by this pattern.
Definition at line 1076 of file CSRPattern.h.
|
inline |
global
Converts local coordinates of a given unit to global coordinates.
Definition at line 719 of file CSRPattern.h.
|
inline |
Converts local coordinates of active unit to global coordinates.
Definition at line 740 of file CSRPattern.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 754 of file CSRPattern.h.
|
inline |
Resolve an element's linear global index from the calling unit's local index of that element.
Definition at line 769 of file CSRPattern.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 783 of file CSRPattern.h.
|
inlinenoexcept |
is_local
Whether the given global index is local to the specified unit.
Definition at line 851 of file CSRPattern.h.
|
inline |
Whether the given global index is local to the unit that created this pattern instance.
Definition at line 867 of file CSRPattern.h.
|
inlinenoexcept |
Resolves the global index of the first local element in the pattern.
Definition at line 450 of file CSRPattern.h.
|
inlinenoexcept |
Resolves the global index past the last local element in the pattern.
Definition at line 460 of file CSRPattern.h.
|
inline |
Converts global coordinates to their associated unit and its respective local coordinates.
NOTE: Same as local_index
.
Definition at line 646 of file CSRPattern.h.
References dash::local().
|
inline |
Converts global index to its associated unit and respective local index.
NOTE: Same as local_index
.
Definition at line 663 of file CSRPattern.h.
|
inlinenoexcept |
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 617 of file CSRPattern.h.
|
inline |
Convert given local coordinates to linear local offset (index).
local_coords | Point in local memory |
Definition at line 631 of file CSRPattern.h.
|
inline |
View spec (offset and extents) of block at local linear block index in global cartesian element space.
Definition at line 922 of file CSRPattern.h.
|
inline |
View spec (offset and extents) of block at local linear block index in local cartesian element space.
Definition at line 942 of file CSRPattern.h.
|
inlinenoexcept |
Maximum number of elements assigned to a single unit in total, equivalent to the local capacity of every unit in this pattern.
Definition at line 987 of file CSRPattern.h.
|
inline |
Converts global coordinates to their associated unit's respective local coordinates.
Definition at line 692 of file CSRPattern.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 565 of file CSRPattern.h.
|
inlinenoexcept |
The actual number of elements in this pattern that are local to the calling unit, by dimension.
Definition at line 586 of file CSRPattern.h.
|
inlinenoexcept |
The actual number of elements in this pattern that are local to the given unit, by dimension.
Definition at line 601 of file CSRPattern.h.
|
inline |
Converts global coordinates to their associated unit and their respective local index.
Definition at line 704 of file CSRPattern.h.
References dash::local().
|
inlinenoexcept |
The actual number of elements in this pattern that are local to the calling unit in total.
Definition at line 1003 of file CSRPattern.h.
|
inlinenoexcept |
Maximum number of elements in a single block in all dimensions.
Definition at line 976 of file CSRPattern.h.
|
inlinestatic |
Memory order followed by the pattern.
Definition at line 1120 of file CSRPattern.h.
|
inlinestatic |
Number of dimensions of the cartesian space partitioned by the pattern.
Definition at line 1129 of file CSRPattern.h.
References dash::global(), dash::max_element(), dash::size(), and dash::Team::size().
|
inlinenoexcept |
The number of units to which this pattern's elements are mapped.
Definition at line 1018 of file CSRPattern.h.
|
inlinenoexcept |
Inquality comparison operator.
other | Pattern instance to compare for inequality |
Definition at line 438 of file CSRPattern.h.
|
default |
Assignment operator.
|
default |
Move-assignment operator.
|
inlinenoexcept |
Equality comparison operator.
other | Pattern instance to compare for equality |
Definition at line 420 of file CSRPattern.h.
|
inlinenoexcept |
The number of elements arranged in this pattern.
Definition at line 1038 of file CSRPattern.h.
|
inlinenoexcept |
Size specification of the index space mapped by this pattern.
Definition at line 1065 of file CSRPattern.h.
|
inlinenoexcept |
The Team containing the units to which this pattern's elements are mapped.
Definition at line 1047 of file CSRPattern.h.
|
inlinenoexcept |
Cartesian arrangement of the Team containing the units to which this pattern's elements are mapped.
Definition at line 1087 of file CSRPattern.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 474 of file CSRPattern.h.
|
inline |
Convert given coordinate in pattern to its assigned unit id.
Definition at line 488 of file CSRPattern.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 499 of file CSRPattern.h.
|
inline |
Convert given global linear index to its assigned unit id.
g_index | Global linear element offset |
Definition at line 513 of file CSRPattern.h.