STAPL API Reference |
Modules Classes |
A collection of functions that create view-based specifications of common data distributions. More...
Functions | |
distribution_spec | stapl::block (unsigned long int n, unsigned long int block_size, level lvl=current_level) |
Construct the specification of a blocked distribution. More... | |
distribution_spec | stapl::block (unsigned long int n, unsigned long int block_size, std::vector< location_type > const &locs) |
Construct the specification of a blocked distribution that will span a specific set of locations. More... | |
distribution_spec | stapl::cyclic (unsigned long int n, level lvl=current_level) |
Construct the specification of a cyclic distribution. More... | |
distribution_spec | stapl::cyclic (unsigned long int n, std::vector< location_type > const &locs) |
Construct the specification of a cyclic distribution that will span a specific set of locations. More... | |
distribution_spec | stapl::block_cyclic (unsigned long int n, unsigned long int block_size, level lvl=current_level) |
Construct the specification of a block-cyclic distribution. More... | |
distribution_spec | stapl::block_cyclic (unsigned long int n, unsigned long int block_size, std::vector< location_type > const &locs) |
Construct the specification of a block-cyclic distribution that will span a specific set of locations. More... | |
distribution_spec | stapl::balance (unsigned long int n, level lvl=current_level) |
Construct the specification of a balanced distribution. More... | |
distribution_spec | stapl::balance (unsigned long int n, std::vector< location_type > const &locs) |
Construct the specification of a balanced distribution that will span a specific set of locations. More... | |
template<typename GIDMapFunc , typename PIDMapFunc > | |
distribution_spec | stapl::arbitrary (unsigned long int n, unsigned long int nparts, GIDMapFunc const &gid_to_pid, PIDMapFunc const &pid_to_lid, level lvl=current_level) |
Construct the specification of an arbitrary distribution. More... | |
template<typename Dom , typename GIDMapFunc , typename PIDMapFunc , typename > | |
distribution_spec< Dom > | stapl::arbitrary (Dom const &dom, unsigned long int nparts, GIDMapFunc const &gid_to_pid, PIDMapFunc const &pid_to_lid, level lvl=current_level) |
Construct the specification of an arbitrary distribution. More... | |
template<typename GIDMapFunc , typename PIDMapFunc > | |
distribution_spec | stapl::arbitrary (unsigned long int n, unsigned long int nparts, GIDMapFunc const &gid_to_pid, PIDMapFunc const &pid_to_lid, std::vector< location_type > const &locs) |
Construct the specification of an arbitrary distribution that will span a specific set of locations. More... | |
template<typename View > | |
distribution_spec | stapl::arbitrary (View const &part_view, level lvl=current_level) |
Construct the specification of an arbitrary distribution. More... | |
template<typename View > | |
distribution_spec | stapl::arbitrary (View const &part_view, std::vector< location_type > const &locs) |
Construct the specification of an arbitrary distribution that will span a specific set of locations. More... | |
A collection of functions that create view-based specifications of common data distributions.
distribution_spec stapl::block | ( | unsigned long int | n, |
unsigned long int | block_size, | ||
level | lvl = current_level |
||
) |
Construct the specification of a blocked distribution.
The GIDs will be blocked into partitions, and the partition ids are balanced across the locations.
n | Number of elements in the data to be distributed |
block_size | Number of elements in each partition |
lvl | Tag indicating the level of the system hierarchy across which the data will be distributed. |
distribution_spec stapl::block | ( | unsigned long int | n, |
unsigned long int | block_size, | ||
std::vector< location_type > const & | locs | ||
) |
Construct the specification of a blocked distribution that will span a specific set of locations.
The GIDs will be blocked into partitions, and the partition ids are balanced across the locations in the new communication group constructed over the locations specified from the parent communication group.
n | Number of elements in the data to be distributed |
block_size | Number of elements in each partition |
locs | Explicit specification of the locations across which the data will be distributed. |
distribution_spec stapl::cyclic | ( | unsigned long int | n, |
level | lvl = current_level |
||
) |
Construct the specification of a cyclic distribution.
The GIDs will not be blocked. Each single-element partition will be mapped to a location in a round-robin manner beginning with location 0.
n | Number of elements in the data to be distributed |
lvl | Tag indicating the level of the system hierarchy across which the data will be distributed. |
distribution_spec stapl::cyclic | ( | unsigned long int | n, |
std::vector< location_type > const & | locs | ||
) |
Construct the specification of a cyclic distribution that will span a specific set of locations.
The GIDs will not be blocked. Each single-element partition will be mapped to a location in a round-robin manner beginning with location 0 in the new communication group constructed over the locations specified from the parent communication group.
n | Number of elements in the data to be distributed |
locs | Explicit specification of the locations across which the data will be distributed. |
distribution_spec stapl::block_cyclic | ( | unsigned long int | n, |
unsigned long int | block_size, | ||
level | lvl = current_level |
||
) |
Construct the specification of a block-cyclic distribution.
The GIDs will be mapped into partitions of size block_size
. Each partition will be mapped to a location in a round-robin manner beginning with location 0.
n | Number of elements in the data to be distributed |
block_size | Number of elements in each partition |
lvl | Tag indicating the level of the system hierarchy across which the data will be distributed. |
distribution_spec stapl::block_cyclic | ( | unsigned long int | n, |
unsigned long int | block_size, | ||
std::vector< location_type > const & | locs | ||
) |
Construct the specification of a block-cyclic distribution that will span a specific set of locations.
The GIDs will be mapped into partitions of size block_size
. Each partition will be mapped to a location in a round-robin manner beginning with location 0 in the new communication group constructed over the locations specified from the parent communication group.
n | Number of elements in the data to be distributed |
block_size | Number of elements in each partition |
locs | Explicit specification of the locations across which the data will be distributed. |
distribution_spec stapl::balance | ( | unsigned long int | n, |
level | lvl = current_level |
||
) |
Construct the specification of a balanced distribution.
The GIDs will be mapped into partitions of near even size. Each of the num_locs
partitions will be mapped to a unique location beginning with location 0.
n | Number of elements in the data to be distributed |
lvl | Tag indicating the level of the system hierarchy across which the data will be distributed. |
distribution_spec stapl::balance | ( | unsigned long int | n, |
std::vector< location_type > const & | locs | ||
) |
Construct the specification of a balanced distribution that will span a specific set of locations.
The GIDs will be mapped into partitions of near even size. Each of the num_locs
partitions will be mapped to a unique location beginning with location 0 in the new communication group constructed over the locations specified from the parent communication group.
n | Number of elements in the data to be distributed |
locs | Explicit specification of the locations across which the data will be distributed. |
distribution_spec stapl::arbitrary | ( | unsigned long int | n, |
unsigned long int | nparts, | ||
GIDMapFunc const & | gid_to_pid, | ||
PIDMapFunc const & | pid_to_lid, | ||
level | lvl = current_level |
||
) |
Construct the specification of an arbitrary distribution.
The mapping functions to map an element GID to a partition id and a partition id to a location id are function objects that have the appropriately defined function operators. Given a functor to map GIDS to partition ids of type GIDMap
and a functor to map partition ids to location ids of type PIDMap
the interfaces required are:
/// unsigned long int GIDMap::operator()(unsigned long int) const; /// stapl::location_type PIDMap::operator()(unsigned long int) const; ///
n | Number of elements in the data to be distributed |
nparts | Number of partitions the elements are mapped to as part of the distribution process. |
gid_to_pid | Functor mapping element GIDs to partition ids |
pid_to_lid | Functor mapping partition ids to location ids |
lvl | Tag indicating the level of the system hierarchy across which the data will be distributed. |
distribution_spec< Dom > stapl::arbitrary | ( | Dom const & | dom, |
unsigned long int | nparts, | ||
GIDMapFunc const & | gid_to_pid, | ||
PIDMapFunc const & | pid_to_lid, | ||
level | lvl = current_level |
||
) |
Construct the specification of an arbitrary distribution.
The mapping functions to map an element GID to a partition id and a partition id to a location id are function objects that have the appropriately defined function operators. Given a functor to map GIDS to partition ids of type GIDMap
and a functor to map partition ids to location ids of type PIDMap
the interfaces required are:
/// unsigned long int GIDMap::operator()(gid_type) const; /// stapl::location_type PIDMap::operator()(unsigned long int) const; ///
dom | The domain used for the container. |
nparts | Number of partitions the elements are mapped to as part of the distribution process. |
gid_to_pid | Functor mapping element GIDs to partition ids |
pid_to_lid | Functor mapping partition ids to location ids |
lvl | Tag indicating the level of the system hierarchy across which the data will be distributed. |
distribution_spec stapl::arbitrary | ( | unsigned long int | n, |
unsigned long int | nparts, | ||
GIDMapFunc const & | gid_to_pid, | ||
PIDMapFunc const & | pid_to_lid, | ||
std::vector< location_type > const & | locs | ||
) |
Construct the specification of an arbitrary distribution that will span a specific set of locations.
The mapping functions to map an element GID to a partition id and a partition id to a location id are function objects that have the appropriately defined function operators. Given a functor to map GIDS to partition ids of type GIDMap
and a functor to map partition ids to location ids of type PIDMap
the interfaces required are:
/// unsigned long int GIDMap::operator()(unsigned long int) const; /// stapl::location_type PIDMap::operator()(unsigned long int) const; ///
The locations to which the partitions will be mapped begin with location 0 in the new communication group constructed over the locations specified from the parent communication group.
n | Number of elements in the data to be distributed |
nparts | Number of partitions the elements are mapped to as part of the distribution process. |
gid_to_pid | Functor mapping element GIDs to partition ids |
pid_to_lid | Functor mapping partition ids to location ids |
locs | Explicit specification of the locations across which the data will be distributed. |
distribution_spec stapl::arbitrary | ( | View const & | part_view, |
level | lvl = current_level |
||
) |
Construct the specification of an arbitrary distribution.
part_view | A view whose elements define the partitions of the distribution and the location to which each one is mapped. |
lvl | Tag indicating the level of the system hierarchy across which the data will be distributed. |
Each element of the view can be an instance of arbitrary_partition_info. If another type is used the interface it must provide is: std::pair<unsigned long int, unsigned long int> domain(void) const; unsigned int location(void) const;
These methods provide the information needed to construct each partition in the container whose distribution is being specified. The partition id isn't explicitly provided. Instead the index of the element in the container is used as an implicit partition id.
distribution_spec stapl::arbitrary | ( | View const & | part_view, |
std::vector< location_type > const & | locs | ||
) |
Construct the specification of an arbitrary distribution that will span a specific set of locations.
part_view | A view whose elements define the partitions of the distribution and the location to which each one is mapped. |
locs | Explicit specification of the locations across which the data will be distributed. |
Each element of the view can be an instance of arbitrary_partition_info. If another type is used the interface it must provide is: std::pair<unsigned long int, unsigned long int> domain(void) const; unsigned int location(void) const;
These methods provide the information needed to construct each partition in the container whose distribution is being specified. The partition id isn't explicitly provided. Instead the index of the element in the container is used as an implicit partition id.
The locations to which the partitions will be mapped begin with location 0 in the new communication group constructed over the locations specified from the parent communication group.