Partition a one-dimensional domain explicitly into subdomains that are stored in a container.
More...
|
| explicit_partition (Dom const &original_dom, vec_dom_type const &vdom) |
| Create a partition of a domain based on an explicit container of subdomains. More...
|
|
value_type | operator[] (size_t idx) const |
| Return the subdomain at a given index. This is the inverse of find. More...
|
|
size_t | size () const |
| Return the number of partitions generated.
|
|
index_type | find (gid_type const &g) const |
| Returns the index of the partition that contains the gid g . More...
|
|
template<typename ODom , typename MFG > |
std::vector< std::pair< domain_type, bool > > | contained_in (ODom const &dom, MFG) |
| Determine which partition has the elements referenced for the given domain. More...
|
|
domain_type | domain () const |
| Get the partition's domain [0, .., p-1].
|
|
value_type const & | global_domain () const |
| Return the original domain that was used to create subdomains.
|
|
|
typedef Dom | view_domain_type |
| The original domain to partition.
|
|
typedef indexed_domain< size_t > | domain_type |
| The domain of the partitioner itself (i.e., the domain [0, ..., p-1])
|
|
typedef SubDom | value_type |
| Type of the subdomains produced by the partition.
|
|
typedef value_type::index_type | gid_type |
| Type of the GIDs in the subdomains.
|
|
typedef domain_type::index_type | index_type |
| Type used to describe the i'th subdomain.
|
|
template<typename Dom, typename SubDom = Dom, typename Storage = std::vector<Dom>>
class stapl::explicit_partition< Dom, SubDom, Storage >
Partition a one-dimensional domain explicitly into subdomains that are stored in a container.
- Template Parameters
-
Dom | Type of the domain to be partitioned |
SubDom | Type of the subdomains that are produced |
Storage | Container that explicitly stores the subdomains |
◆ explicit_partition()
template<typename Dom , typename SubDom = Dom, typename Storage = std::vector<Dom>>
Create a partition of a domain based on an explicit container of subdomains.
- Parameters
-
original_dom | The original domain to partition |
vdom | Container of subdomains |
◆ operator[]()
template<typename Dom , typename SubDom = Dom, typename Storage = std::vector<Dom>>
Return the subdomain at a given index. This is the inverse of find.
- Parameters
-
idx | The index of the subdomain, which should be from 0 to size() - 1. |
◆ find()
template<typename Dom , typename SubDom = Dom, typename Storage = std::vector<Dom>>
Returns the index of the partition that contains the gid g
.
- Parameters
-
- Returns
- The index of the subdomain that contains
g
◆ contained_in()
template<typename Dom , typename SubDom = Dom, typename Storage = std::vector<Dom>>
template<typename ODom , typename MFG >
Determine which partition has the elements referenced for the given domain.
The returned information is a collection (possibly empty) of pairs. Each pair contains information about which partitions are included in the given domain and how they are included (True: if is fully contained, False: if is partially included). The returned collection only has elements if there is at least one partition that contains elements on the given domain.
- Example:
- Partition: [0..3],[4..6],[7..9],[10..13]
Given domain: [2..9]
Returns: {([0..0],False),([1..2],True)}
- Parameters
-
dom | Domain to compare |
mfg | Mapping function generator used to get the associated mapping function to each partition. The generated mapping function is used to project generated partitioned domains into the given domain. |
- Returns
- a vector of pairs.
The documentation for this class was generated from the following file: