Mapper which takes the functor mapping partition ids to locations from the distribution_view provided to the pContainer constructor.
More...
|
| view_based_mapper (domain_type const &) |
|
| view_based_mapper (std::shared_ptr< DistributionView > dist_view) |
| Construct the mapper instance for a distribution specified by a set of chained views. More...
|
|
template<typename PartitionInfoContainer > |
| view_based_mapper (std::shared_ptr< DistributionView > dist_view, PartitionInfoContainer *) |
| Construct the mapper instance for an arbitrary distribution specified by a container of instances. More...
|
|
value_type | map (std::tuple< cid_type, location_type, loc_qual > const &cid) const |
|
value_type | map (cid_type const &cid) const |
|
cid_type | next (cid_type cid) const |
|
bool | valid (cid_type cid) const |
|
size_t | get_num_locations (void) const |
|
template<typename Info > |
void | update (Info const &info) |
| Update the domain of partition ids and the mapping function from partition id to location id with mapping information on elements to be inserted in the container. More...
|
|
template<typename DistributionView>
struct stapl::view_based_mapper< DistributionView >
Mapper which takes the functor mapping partition ids to locations from the distribution_view provided to the pContainer constructor.
The functor is user-defined, and as such no assumptions other than it implementing a many-to-one mapping can be made.
This struct is used in tandem with view_based_partition to allow users to describe the data distribution of a pContainer using a pView.
- Template Parameters
-
DistributionView | Type of the view describing a distribution. |
template<typename DistributionView >
template<typename PartitionInfoContainer >
Construct the mapper instance for an arbitrary distribution specified by a container of instances.
The pointer to the container holding the arbitrary partition information is ignored as it is not needed. It is passed to the constructor to allow the initialized_deferred call to be invoked with the flag to avoid attempting to initialize the mapping functions in dist_view
because they're not deferred_map instances.
- Parameters
-
dist_view | View-based specification of the distribution that will be used to map partition ids to location ids by this class |