FreePOOMA
2.4.1
|
Loc<N> is a domain representing a single N-dimensional point. More...
#include <Loc.h>
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 | |
Loc () | |
Loc (const Loc< Dim > &a) | |
Loc (const Pooma::NoInit &a) | |
template<class T1 > | |
Loc (const T1 &a) | |
template<class T1 , class T2 > | |
Loc (const T1 &a, const T2 &b) | |
template<class T1 , class T2 , class T3 > | |
Loc (const T1 &a, const T2 &b, const T3 &c) | |
template<class T1 , class T2 , class T3 , class T4 > | |
Loc (const T1 &a, const T2 &b, const T3 &c, const T4 &d) | |
template<class T1 , class T2 , class T3 , class T4 , class T5 > | |
Loc (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 > | |
Loc (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 > | |
Loc (const T1 &a, const T2 &b, const T3 &c, const T4 &d, const T5 &e, const T6 &f, const T7 &g) | |
~Loc () | |
template<class T > | |
Loc< Dim > & | operator= (const T &newdom) |
Loc< Dim > & | operator= (const Loc< Dim > &newdom) |
template<class Out > | |
void | print (Out &o) const |
print a domain to a stream, in the format "[" first:last:stride, first:last:stride, ... |
Loc<N> is a domain representing a single N-dimensional point.
It has a stride of one, endpoints which are the same, and a single element. Otherwise, it acts very much like all other domain objects such as Range or Interval.
You can construct a Loc object using other Loc objects or integers. The constructor for Loc accepts up to 7 domain objects of various types. Domain types are, for example, Loc, Range, Interval. int may also be used in the constructor for Loc; it acts like a Loc<1> object in that context. It is illegal to try to construct a Loc from other domain objects which have lengths greater than one. The domain arguments for the Loc 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 Loc<3> from a Loc<2> and an int, as in Loc<3> a(Loc<2>(1,2), 3); the Loc<2> and int arguments are combined into a (2+1=3) dimensional domain object, used to initialize the Loc<3>. The number of dimensions for the arguments must be <= number of dimensions of the newly constructed Loc.
The default Loc<1> constructor initializes the point to zero; the default Loc<N> constructor initializes a set of Loc<1> objects all to zero.
In addition to the constructors, Loc has the following public interface, similar to all domain objects. There are two classes of interface methods, one class which includes methods which any Loc<N> object has, regardless of dimensions, the other class which includes extra interface methods that are available for just Loc<1> objects.
Loc<N> interface:
Loc<1> interface: all of the methods for Loc<N> are also available for Loc<1>. Plus:
Loc inherits much of its activity from Domain<DomainTraits<Loc>,Dim>. Domain is a base class that uses the template argument as a traits class for Loc to specialize it's behavior. The definition of Loc<N> itself only contains Loc<N> constructors, destructor, and operator= methods. All other interface methods are in Domain, or in DomainBase (from which Domain inherits).
typedef Base_t::iterator Loc< Dim >::iterator |
Reimplemented from Domain< Dim, DomainTraits< Loc< Dim > > >.
typedef Base_t::const_iterator Loc< Dim >::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< Loc< Dim > > >.
typedef Base_t::blockIterator Loc< Dim >::blockIterator |
Reimplemented from Domain< Dim, DomainTraits< Loc< Dim > > >.
typedef Base_t::const_blockIterator Loc< Dim >::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< Loc< Dim > > >.
typedef DT_t::Element_t Loc< Dim >::Element_t |
typedef DT_t::Domain_t Loc< Dim >::Domain_t |
Reimplemented from Domain< Dim, DomainTraits< Loc< Dim > > >.
typedef DT_t::OneDomain_t Loc< Dim >::OneDomain_t |
Reimplemented from Domain< Dim, DomainTraits< Loc< Dim > > >.
typedef DT_t::BlockDomain_t Loc< Dim >::BlockDomain_t |
typedef DT_t::AskDomain_t Loc< Dim >::AskDomain_t |
Reimplemented from DomainBase< DomainTraits< Loc< Dim > > >.
typedef DT_t::AddResult_t Loc< Dim >::AddResult_t |
typedef DT_t::MultResult_t Loc< Dim >::MultResult_t |
Reimplemented from DomainBase< DomainTraits< Loc< Dim > > >.
typedef DT_t::Storage_t Loc< Dim >::Storage_t |
Reimplemented from DomainBase< DomainTraits< Loc< Dim > > >.
Loc< Dim >::Loc | ( | const Pooma::NoInit & | a | ) | [inline] |
Loc< Dim >::Loc | ( | const T1 & | a, |
const T2 & | b | ||
) | [inline] |
Loc< Dim >::Loc | ( | const T1 & | a, |
const T2 & | b, | ||
const T3 & | c | ||
) | [inline] |
Loc< Dim >::Loc | ( | const T1 & | a, |
const T2 & | b, | ||
const T3 & | c, | ||
const T4 & | d | ||
) | [inline] |
Loc< Dim >::Loc | ( | const T1 & | a, |
const T2 & | b, | ||
const T3 & | c, | ||
const T4 & | d, | ||
const T5 & | e | ||
) | [inline] |
Loc< Dim >::Loc | ( | const T1 & | a, |
const T2 & | b, | ||
const T3 & | c, | ||
const T4 & | d, | ||
const T5 & | e, | ||
const T6 & | f | ||
) | [inline] |
Loc< Dim >::Loc | ( | const T1 & | a, |
const T2 & | b, | ||
const T3 & | c, | ||
const T4 & | d, | ||
const T5 & | e, | ||
const T6 & | f, | ||
const T7 & | g | ||
) | [inline] |
print a domain to a stream, in the format "[" first:last:stride, first:last:stride, ...
first:last:stride "]"
Reimplemented from DomainBase< DomainTraits< Loc< Dim > > >.