SliceDomain.h File Reference

SliceDomain is a base class for all sliced domain objects. More...

#include "Domain/DomainBase.h"
#include "Domain/DomainTraits.h"
#include "Utilities/NoInit.h"
#include "Utilities/PAssert.h"
#include <iosfwd>

Include dependency graph for SliceDomain.h:

This graph shows which files directly or indirectly include this file:


Classes

class  SliceDomain< DT >
 SliceDomain

provides the bulk of the public interface for all sliced domain objects. More...


Defines

#define POOMA_SLICEDOMAIN_ARITH_SINGLE(OPFUNCTION, OP, RETTYPE, LHSTYPE)
#define POOMA_SLICEDOMAIN_ARITH(OPFUNCTION, OP, RETTYPE)

Functions

template<class DT >
std::ostream & operator<< (std::ostream &o, const SliceDomain< DT > &dbase)
 print a SliceDomain to a stream, in the format "[" first:last:stride, first:last:stride, .

Detailed Description

SliceDomain is a base class for all sliced domain objects.

A sliced domain stores two pieces of information:

  1. A "total domain" of dimension TotalDim
  2. A "slice domain" of dimension SliceDim, with SliceDim < TotalDim.

SliceDomain stores both domains, and provides accessors to get references to them. It does not have the full interface as regular domains, you must get a reference to the relevant domain (total or slice) and then use that as normal. Unlike the regular Domain class, SliceDomain does not have or need any 1D specializations, or any base class. SliceDomain is templated on the DomainTraits<> class providing the traits for the SliceDomain derived class. It does not have a Dim template parameter as Domain does.


Define Documentation

#define POOMA_SLICEDOMAIN_ARITH_SINGLE ( OPFUNCTION,
OP,
RETTYPE,
LHSTYPE   ) 

Value:

template <class T>                     \
inline typename T::RETTYPE                \
OPFUNCTION(const SliceDomain<T> &d1, LHSTYPE d2) {       \
  typename T::RETTYPE ret(d1.unwrap());               \
  ret.totalDomain() OP##= d2;                                           \
  ret.setSliceFromTotal();                                              \
  return ret;                       \
}                          \
template <class T>                     \
inline typename T::RETTYPE                \
OPFUNCTION(LHSTYPE d1, const SliceDomain<T> &d2) {       \
  typename T::RETTYPE ret(d2.unwrap());               \
  ret.totalDomain() = d2 OP ret.totalDomain();                          \
  ret.setSliceFromTotal();                                              \
  return ret;                       \
}

#define POOMA_SLICEDOMAIN_ARITH ( OPFUNCTION,
OP,
RETTYPE   ) 

Value:

template <class T1, class T2>                \
inline typename T1::RETTYPE                  \
OPFUNCTION(const SliceDomain<T1> &d1, const DomainBase<T2> &d2) { \
  typename T1::RETTYPE ret(d1.unwrap());           \
  ret.totalDomain() OP##= d2.unwrap();                                  \
  ret.setSliceFromTotal();                                              \
  return ret;                       \
}                          \
template <class T1, class T2>                \
inline typename T1::RETTYPE                  \
OPFUNCTION(const SliceDomain<T1> &d1, const SliceDomain<T2> &d2) {   \
  typename T1::RETTYPE ret(d1.unwrap());           \
  ret.totalDomain() OP##= d2.unwrap().totalDomain();                    \
  ret.setSliceFromTotal();                                              \
  return ret;                       \
}                          \
POOMA_SLICEDOMAIN_ARITH_SINGLE(OPFUNCTION,OP, RETTYPE, char)      \
POOMA_SLICEDOMAIN_ARITH_SINGLE(OPFUNCTION,OP, RETTYPE, unsigned char)   \
POOMA_SLICEDOMAIN_ARITH_SINGLE(OPFUNCTION,OP, RETTYPE, short)     \
POOMA_SLICEDOMAIN_ARITH_SINGLE(OPFUNCTION,OP, RETTYPE, unsigned short)  \
POOMA_SLICEDOMAIN_ARITH_SINGLE(OPFUNCTION,OP, RETTYPE, int)    \
POOMA_SLICEDOMAIN_ARITH_SINGLE(OPFUNCTION,OP, RETTYPE, unsigned int) \
POOMA_SLICEDOMAIN_ARITH_SINGLE(OPFUNCTION,OP, RETTYPE, long)      \
POOMA_SLICEDOMAIN_ARITH_SINGLE(OPFUNCTION,OP, RETTYPE, unsigned long)   \
POOMA_SLICEDOMAIN_ARITH_SINGLE(OPFUNCTION,OP, RETTYPE, float)     \
POOMA_SLICEDOMAIN_ARITH_SINGLE(OPFUNCTION,OP, RETTYPE, double)


Function Documentation

template<class DT >
std::ostream& operator<< ( std::ostream &  o,
const SliceDomain< DT > &  dbase 
) [inline]

print a SliceDomain to a stream, in the format "[" first:last:stride, first:last:stride, .

.. first:last:stride "]" "==>" (same for slice dimensions)


Generated on Wed Mar 16 06:19:05 2011 for FreePOOMA by  doxygen 1.5.9