STAPL API Reference |
Modules Classes |
Mapper which takes the functor mapping partition ids to locations from the distribution_view provided to the pContainer constructor. More...
Public Member Functions | |
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... | |
Public Types | |
typedef DistributionView::view_container_type::domain_type | domain_type |
The domain of the partitions to be mapped (i.e., the domain [0, ..., p-1]) | |
typedef domain_type::gid_type | cid_type |
The id of a partition. | |
typedef DistributionView::view_container_type::map_func_type | map_func_type |
The functor that will map the partition CIDs to locations. | |
typedef location_type | value_type |
Protected Attributes | |
std::shared_ptr< DistributionView > | m_dist_view |
std::shared_ptr< map_func_type > | m_map_func |
The function used to map a partition id (CID) to a location. | |
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.
DistributionView | Type of the view describing a distribution. |
stapl::view_based_mapper< DistributionView >::view_based_mapper | ( | std::shared_ptr< DistributionView > | dist_view | ) |
Construct the mapper instance for a distribution specified by a set of chained views.
dist_view | View-based specification of the distribution that will be used to map partition ids to location ids by this class |
stapl::view_based_mapper< DistributionView >::view_based_mapper | ( | std::shared_ptr< DistributionView > | dist_view, |
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.
dist_view | View-based specification of the distribution that will be used to map partition ids to location ids by this class |
void stapl::view_based_mapper< DistributionView >::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.
info | vector of tuples, each of which specifies a contiguous set of GIDs, the partition id they map to, and the location id to which the partition id maps. |