STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Public Attributes | Static Public Attributes | Friends
stapl::dom2D< OneD1, OneD2 > Struct Template Reference

Two dimensional domain implemented as a tuple of one-dimensional domains. More...

Public Member Functions

 dom2D (size_t m, size_t n)
 Construct the domain given the number of elements in each dimension. More...
 
 dom2D (OneD1 fdom, OneD2 sdom)
 Construct the domain given the one-dimensional domains for each dimension. More...
 
 dom2D (domain_type &dom)
 
 dom2D (index_type const &fst, index_type const &snd)
 
size_t size () const
 Returns the number of elements in the domain.
 
size_type size_twod () const
 Returns the number of elements in each dimension.
 
gid_type first () const
 
gid_type last () const
 
bool contains (index_type idx) const
 Returns whether the specified index is in the domain.
 
bool empty () const
 
template<int N>
tuple_element< N, domain_type >::type get_domain () const
 Return the domain associated with a specific dimension. More...
 

Public Types

typedef tuple< typename OneD1::index_type, typename OneD2::index_type > index_type
 
typedef tuple< OneD1, OneD2 > domain_type
 
typedef tuple< typename OneD1::gid_type, typename OneD2::gid_type > gid_type
 
typedef tuple< typename OneD1::size_type, typename OneD2::size_type > size_type
 

Public Attributes

domain_type m_domain
 

Static Public Attributes

static const gid_type null_gid
 

Friends

template<typename T1 , typename T2 >
std::ostream & operator<< (std::ostream &os, dom2D< T1, T2 > const &d)
 

Detailed Description

template<typename OneD1, typename OneD2 = OneD1>
struct stapl::dom2D< OneD1, OneD2 >

Two dimensional domain implemented as a tuple of one-dimensional domains.

Template Parameters
OneD1type of the domain of the first dimension.
OneD2type of the domain of the second dimension.

Constructor & Destructor Documentation

◆ dom2D() [1/2]

template<typename OneD1 , typename OneD2 = OneD1>
stapl::dom2D< OneD1, OneD2 >::dom2D ( size_t  m,
size_t  n 
)

Construct the domain given the number of elements in each dimension.

Parameters
mnumber of rows
nnumber of columns

◆ dom2D() [2/2]

template<typename OneD1 , typename OneD2 = OneD1>
stapl::dom2D< OneD1, OneD2 >::dom2D ( OneD1  fdom,
OneD2  sdom 
)

Construct the domain given the one-dimensional domains for each dimension.

Parameters
fdomdomain of the first dimension.
sdomdomain of the second dimension.

Member Function Documentation

◆ get_domain()

template<typename OneD1 , typename OneD2 = OneD1>
template<int N>
tuple_element<N,domain_type>::type stapl::dom2D< OneD1, OneD2 >::get_domain ( ) const

Return the domain associated with a specific dimension.

Template Parameters
Ndimension to get the domain

The documentation for this struct was generated from the following file: