FreePOOMA  2.4.1
Public Types | Public Member Functions
Region< Dim, T > Class Template Reference

Region<N,T> is a domain representing a set of N continuous 1D regions, one for each dimension N. More...

#include <Region.h>

Inheritance diagram for Region< Dim, T >:
Inheritance graph
[legend]
Collaboration diagram for Region< Dim, T >:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { domain = DT_t::domain }
enum  { dimensions = DT_t::dimensions, sliceDimensions = DT_t::sliceDimensions }
enum  { loopAware = DT_t::loopAware }
enum  { singleValued = DT_t::singleValued }
enum  { unitStride = DT_t::unitStride }
enum  { wildcard = DT_t::wildcard }
typedef Base_t::iterator iterator
typedef Base_t::const_iterator const_iterator
 Iterator typedefs.
typedef Base_t::blockIterator blockIterator
typedef Base_t::const_blockIterator const_blockIterator
 Block iterator typedefs.
typedef DT_t::Element_t Element_t
typedef DT_t::Domain_t Domain_t
typedef DT_t::OneDomain_t OneDomain_t
typedef DT_t::BlockDomain_t BlockDomain_t
typedef DT_t::AskDomain_t AskDomain_t
typedef DT_t::AddResult_t AddResult_t
typedef DT_t::MultResult_t MultResult_t
typedef DT_t::Storage_t Storage_t

Public Member Functions

 Region ()
 Region (const Pooma::NoInit &e)
 Region (const Region< Dim, T > &a)
template<class T1 >
 Region (const T1 &a)
template<class T1 , class T2 >
 Region (const T1 &a, const T2 &b)
template<class T1 , class T2 , class T3 >
 Region (const T1 &a, const T2 &b, const T3 &c)
template<class T1 , class T2 , class T3 , class T4 >
 Region (const T1 &a, const T2 &b, const T3 &c, const T4 &d)
template<class T1 , class T2 , class T3 , class T4 , class T5 >
 Region (const T1 &a, const T2 &b, const T3 &c, const T4 &d, const T5 &e)
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
 Region (const T1 &a, const T2 &b, const T3 &c, const T4 &d, const T5 &e, const T6 &f)
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
 Region (const T1 &a, const T2 &b, const T3 &c, const T4 &d, const T5 &e, const T6 &f, const T7 &g)
 ~Region ()
template<class T1 >
Region< Dim, T > & operator= (const T1 &newdom)
Region< Dim, T > & operator= (const Region< Dim, T > &newdom)

Detailed Description

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
class Region< Dim, T >

Region<N,T> is a domain representing a set of N continuous 1D regions, one for each dimension N.

The regions have endpoints [a,b], and Region refers to the rectangular region defined by these endpoints.

You can construct a Region object using other domain objects. The constructors accept up to 7 domain objects of various types. Domain types are, for example, Loc, Region, Interval. An int, double, or float may also be used in the constructor for Region; it acts like a Loc<1> object in that context. The domain arguments for the Region constructors are combined together to form a single domain object with a dimension equal to the sum of the arguments dimensions; for example, if you try to create a Region<3,T> from a Loc<2> and an Interval<1>, e.g. Region<3,T> a(Loc<2>(1,2), Interval<1>(3,5)); the Loc<2> and Interval arguments are combined into a (2+1=3) dimensional domain object, used to initialize the Region<3>. The number of dimensions for the arguments must be <= number of dimensions of the newly constructed Region.

Since Region has possibly floating-point values, when constructed from integer domains such as Interval it just takes the first and last values of their domain as the endpoints. When using a Region to construct an integer domain, the standard first(), length(), stride() methods will be called, and for Region this will just lead to integer conversion (truncation) to get the integer values.

For Region<1,T>, the list of constructors is limited to just the following:

The default Region<1,T> constructor initializes the Region to the origin.

In addition to the constructors, Region has the following public interface, similar to all domain objects. There are two classes of interface methods, one class which includes methods which any Region<N,T> object has, regardless of dimensions, the other class which includes extra interface methods that are available for just Region<1,T> objects.

Region<N,T> interface:

Region<1,T> interface: all the methods for Region<N,T> are also available for Region<1,T>. Plus:

For the special case of Region<1,T>, there is a specialization given after the general case that has different constructors.

Region inherits much of its activity from Domain<DomainTraits<Region>>


Member Typedef Documentation

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef Base_t::iterator Region< Dim, T >::iterator
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef Base_t::const_iterator Region< Dim, T >::const_iterator

Iterator typedefs.

An N-dimensional iterator is a forward iterator, it works only with operator++ (it does not have operator--).

Reimplemented from Domain< Dim, DomainTraits< Region< Dim, T > > >.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef Base_t::blockIterator Region< Dim, T >::blockIterator
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef Base_t::const_blockIterator Region< Dim, T >::const_blockIterator

Block iterator typedefs.

All domains use the DomainBlockIterator class to iterate through blocks defined by the domain points. A block iterator is a forward iterator, it works only with operator++.

Reimplemented from Domain< Dim, DomainTraits< Region< Dim, T > > >.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef DT_t::Element_t Region< Dim, T >::Element_t
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef DT_t::Domain_t Region< Dim, T >::Domain_t
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef DT_t::OneDomain_t Region< Dim, T >::OneDomain_t
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef DT_t::BlockDomain_t Region< Dim, T >::BlockDomain_t
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef DT_t::AskDomain_t Region< Dim, T >::AskDomain_t
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef DT_t::AddResult_t Region< Dim, T >::AddResult_t
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef DT_t::MultResult_t Region< Dim, T >::MultResult_t
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef DT_t::Storage_t Region< Dim, T >::Storage_t

Member Enumeration Documentation

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
anonymous enum
Enumerator:
domain 
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
anonymous enum
Enumerator:
dimensions 
sliceDimensions 
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
anonymous enum
Enumerator:
loopAware 
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
anonymous enum
Enumerator:
singleValued 
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
anonymous enum
Enumerator:
unitStride 
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
anonymous enum
Enumerator:
wildcard 

Constructor & Destructor Documentation

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
Region< Dim, T >::Region ( ) [inline]
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
Region< Dim, T >::Region ( const Pooma::NoInit e) [inline]
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
Region< Dim, T >::Region ( const Region< Dim, T > &  a) [inline]
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
template<class T1 >
Region< Dim, T >::Region ( const T1 &  a) [inline, explicit]
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
template<class T1 , class T2 >
Region< Dim, T >::Region ( const T1 &  a,
const T2 &  b 
) [inline]
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
template<class T1 , class T2 , class T3 >
Region< Dim, T >::Region ( const T1 &  a,
const T2 &  b,
const T3 &  c 
) [inline]
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
template<class T1 , class T2 , class T3 , class T4 >
Region< Dim, T >::Region ( const T1 &  a,
const T2 &  b,
const T3 &  c,
const T4 &  d 
) [inline]
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
template<class T1 , class T2 , class T3 , class T4 , class T5 >
Region< Dim, T >::Region ( const T1 &  a,
const T2 &  b,
const T3 &  c,
const T4 &  d,
const T5 &  e 
) [inline]
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
Region< Dim, T >::Region ( const T1 &  a,
const T2 &  b,
const T3 &  c,
const T4 &  d,
const T5 &  e,
const T6 &  f 
) [inline]
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
template<class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
Region< Dim, T >::Region ( const T1 &  a,
const T2 &  b,
const T3 &  c,
const T4 &  d,
const T5 &  e,
const T6 &  f,
const T7 &  g 
) [inline]
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
Region< Dim, T >::~Region ( ) [inline]

Member Function Documentation

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
template<class T1 >
Region<Dim,T>& Region< Dim, T >::operator= ( const T1 &  newdom) [inline]
template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
Region<Dim,T>& Region< Dim, T >::operator= ( const Region< Dim, T > &  newdom) [inline]

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