STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types
stapl::rows_partition< Dom > Struct Template Reference

Partition in rows the given 2D domain. More...

Public Member Functions

 rows_partition (Dom const &domain)
 Rows partition constructor. More...
 
 rows_partition (Dom const &domain, rows_partition const &other)
 Copy constructor that replaces the domain with the domain provided.
 
Dom const & global_domain () const
 
value_type operator[] (size_t idx) const
 Returns the idx-th domain in the partition.
 
size_t size () const
 Return the number of partitions generated. One for each row.
 
domain_type domain () const
 Return the domain of the partition.
 
template<typename ODom , typename MFG >
std::vector< std::pair< domain_type, bool > > contained_in (ODom const &dom, MFG const &mfg)
 Determine which partition has the elements referenced for the given domain. More...
 

Public Types

typedef indexed_domain< size_t > domain_type
 
typedef domain_type value_type
 
typedef value_type::index_type gid_type
 
typedef domain_type::index_type index_type
 

Detailed Description

template<typename Dom>
struct stapl::rows_partition< Dom >

Partition in rows the given 2D domain.

Template Parameters
DomA two dimensional domain type.

Constructor & Destructor Documentation

◆ rows_partition()

template<typename Dom >
stapl::rows_partition< Dom >::rows_partition ( Dom const &  domain)

Rows partition constructor.

Example:
Domain to partition: [0..3]x[0..3]
Resulting partition: {[0..0]x0..3],[1..1]x[0..3],[2..2]x[0..3], [3..3]x[0..3]}
Parameters
domainDomain to partition.

Member Function Documentation

◆ contained_in()

template<typename Dom >
template<typename ODom , typename MFG >
std::vector<std::pair<domain_type,bool> > stapl::rows_partition< Dom >::contained_in ( ODom const &  dom,
MFG const &  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 it is fully contained, False: if it is partially included). The returned collection contains elements for the partitions that contain elements on the given domain.

Parameters
domDomain to compare
mfgMapping 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 struct was generated from the following file: