Computes a balanced mapping of ids to partitions in a one dimensional space. This is a specialization of the multi-dimension map function.
More...
|
| balance_map (GID num_gids, Index num_blocks) |
|
Index | operator() (GID id) const |
|
std::pair< GID, GID > | domain (Index pid) const |
| Return the first and last index of the domain that the given partition id refers to in an std::pair.
|
|
void | update (update_vec_t const &updates, size_t level) |
| Method required of all mapping functions. The method is called by the update_distribution method of containers. More...
|
|
|
typedef GID | gid_type |
| Type of the id being mapped into partitions. Required by Core.
|
|
typedef Index | index_type |
| Type of the partition id. Required by Core.
|
|
|
typedef std::vector< std::tuple< std::pair< ContainerGID, ContainerGID >, CID, location_type > > | update_vec_t |
|
|
GID | m_num_gids |
|
Index | m_num_blocks |
|
Index | m_num_large_blocks |
|
Index | m_large_block_size |
|
template<typename GID, typename Index, typename ContainerGID, typename CID>
struct stapl::balance_map< 1, GID, Index, ContainerGID, CID >
Computes a balanced mapping of ids to partitions in a one dimensional space. This is a specialization of the multi-dimension map function.
The struct is used to implement view-based specifications of block-cyclic distributions. The implementation assumes the GID / Index operation is defined. This struct differs from block in that it allows for two sizes of blocks, while block will produce uniform partitions with the exception of the last.
◆ update()
template<typename GID , typename Index , typename ContainerGID , typename CID >
void stapl::balance_map< 1, GID, Index, ContainerGID, CID >::update |
( |
update_vec_t const & |
updates, |
|
|
size_t |
level |
|
) |
| |
Method required of all mapping functions. The method is called by the update_distribution method of containers.
- Warning
- Currently mapping functions used in view-based specifications other than arbitrary do not support updates.
The documentation for this struct was generated from the following file:
- specification_functors.hpp