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

Partition to construct reference the elements in a band matrix. More...

Public Member Functions

 band_partition (value_type const &domain, size_t l=0, size_t r=0)
 Band partition constructor. More...
 
 band_partition (value_type const &domain, band_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.
 
domain_type domain () const
 Return the domain of the partition.
 
index_type find (gid_type const &g) const
 Returns the index of the partition that contains the GID g.
 
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 Dom value_type
 
typedef value_type::index_type gid_type
 
typedef domain_type::index_type index_type
 

Detailed Description

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

Partition to construct reference the elements in a band matrix.

Template Parameters
DomA two dimensional domain type.

Constructor & Destructor Documentation

◆ band_partition()

template<typename Dom >
stapl::band_partition< Dom >::band_partition ( value_type const &  domain,
size_t  l = 0,
size_t  r = 0 
)

Band partition constructor.

The overlapped domains are defined specifying the number of elements that are overlapped to the left (l), the number of elements that are not overlapped (c) and the number of elements overlapped to the right (r). Each subdomain has size: l+r+1 (diagonal).

Example:
Domain to partition: [0..3]x[0..3]
left band (l): 1
right band (r): 1
Resulting partition: {[0..0]x[0..1],[1..1]x[0..2],[2..2]x[1..3], [3..3]x[2..3]}
Parameters
domainDomain to partition.
lNumber of elements to the left of the diagonal.
rNumber of elements to the right of the diagonal.

Member Function Documentation

◆ contained_in()

template<typename Dom >
template<typename ODom , typename MFG >
std::vector<std::pair<domain_type,bool> > stapl::band_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: