FreePOOMA  2.4.1
Public Types | Public Member Functions
Engine< Dim, T, ExpressionTag< Expr > > Class Template Reference

This engine stores the expression tree Expr and acts like an engine that lets you look at the values of the expression as if it were an ordinary Brick type engine. More...

#include <ExpressionEngine.h>

List of all members.

Public Types

enum  { dimensions = Dim }
 Was enum { dimensions = Domain_t::dimensions }; It's possible for the dimension of an expression to be different from that of the domain. More...
enum  { multiPatch = true }
 Expressions might be multi-patch so we say they are to force code to check. More...
enum  { hasDataObject = true }
 We say that expression have a block so that functions that access data objects will call our message functor and we'll traverse the tree for them. More...
enum  { dynamic = false }
enum  { zeroBased = true }
 Expression-engines are zero-based. More...
typedef Engine< Dim, T,
ExpressionTag< Expr > > 
Engine_t
typedef ExpressionTag< Expr > Tag_t
typedef T Element_t
typedef ErrorType ElementRef_t
typedef ForEach< Expr,
DomainFunctorTag,
DomainFunctorTag >::Type_t 
Domain_t
typedef Expr Expression_t
typedef DomainLayout< Dim > Layout_t

Public Member Functions

 Engine (const Expr &expr)
 Expression constructor. Just stick the expression in local storage.
 Engine (const Engine_t &engine)
 Copy constructor.
template<int Dim2, class T2 , class Expr2 , class Initializer >
 Engine (const Engine< Dim2, T2, ExpressionTag< Expr2 > > &e, const Initializer &i)
 Subsetting Constructor.
template<int Dim2, class T2 , class Expr2 , class I1 , class I2 >
 Engine (const Engine< Dim2, T2, ExpressionTag< Expr2 > > &e, const I1 &i1, const I2 &i2)
template<class Expr2 >
 Engine (const Engine< Dim, T, ExpressionTag< Expr2 > > &e)
 Construct from another expression without a domain.
const Expression_texpression () const
 Accessor functions that return the expression.
Expression_texpression ()
Engine_tmakeOwnCopy ()
 Get a private copy of the expression.
Element_t read (int i0) const
 Accessor functions for a specific element.
Element_t read (int i0, int i1) const
Element_t read (int i0, int i1, int i2) const
Element_t read (int i0, int i1, int i2, int i3) const
Element_t read (int i0, int i1, int i2, int i3, int i4) const
Element_t read (int i0, int i1, int i2, int i3, int i4, int i5) const
Element_t read (int i0, int i1, int i2, int i3, int i4, int i5, int i6) const
Element_t read (const Loc< Dim > &loc) const
const Domain_tdomain () const
 Function to return the common domain.
Layout_t layout () const
 Return a layout.
int first (int) const
 Return the first value for the specified direction (always zero since this engine is zero-based).
template<class RequestType >
DataObjectRequest< RequestType >
::Type_t 
dataObjectRequest (const DataObjectRequest< RequestType > &f) const
 Need to pass lock requests to the leaves.

Detailed Description

template<int Dim, class T, class Expr>
class Engine< Dim, T, ExpressionTag< Expr > >

This engine stores the expression tree Expr and acts like an engine that lets you look at the values of the expression as if it were an ordinary Brick type engine.


Member Typedef Documentation

template<int Dim, class T , class Expr >
typedef Engine<Dim, T, ExpressionTag<Expr> > Engine< Dim, T, ExpressionTag< Expr > >::Engine_t
template<int Dim, class T , class Expr >
typedef ExpressionTag<Expr> Engine< Dim, T, ExpressionTag< Expr > >::Tag_t
template<int Dim, class T , class Expr >
typedef T Engine< Dim, T, ExpressionTag< Expr > >::Element_t
template<int Dim, class T , class Expr >
typedef ErrorType Engine< Dim, T, ExpressionTag< Expr > >::ElementRef_t
template<int Dim, class T , class Expr >
typedef ForEach<Expr, DomainFunctorTag, DomainFunctorTag>::Type_t Engine< Dim, T, ExpressionTag< Expr > >::Domain_t
template<int Dim, class T , class Expr >
typedef Expr Engine< Dim, T, ExpressionTag< Expr > >::Expression_t
template<int Dim, class T , class Expr >
typedef DomainLayout<Dim> Engine< Dim, T, ExpressionTag< Expr > >::Layout_t

Member Enumeration Documentation

template<int Dim, class T , class Expr >
anonymous enum

Was enum { dimensions = Domain_t::dimensions }; It's possible for the dimension of an expression to be different from that of the domain.

For example, you can wrap a scalar in an array that has arbitrary dimension, but the domain of the scalar is NullDomain.

Enumerator:
dimensions 
template<int Dim, class T , class Expr >
anonymous enum

Expressions might be multi-patch so we say they are to force code to check.

Enumerator:
multiPatch 
template<int Dim, class T , class Expr >
anonymous enum

We say that expression have a block so that functions that access data objects will call our message functor and we'll traverse the tree for them.

Enumerator:
hasDataObject 
template<int Dim, class T , class Expr >
anonymous enum
Enumerator:
dynamic 
template<int Dim, class T , class Expr >
anonymous enum

Expression-engines are zero-based.

Enumerator:
zeroBased 

Constructor & Destructor Documentation

template<int Dim, class T , class Expr >
Engine< Dim, T, ExpressionTag< Expr > >::Engine ( const Expr &  expr) [inline]

Expression constructor. Just stick the expression in local storage.

template<int Dim, class T , class Expr >
Engine< Dim, T, ExpressionTag< Expr > >::Engine ( const Engine_t engine) [inline]

Copy constructor.

template<int Dim, class T , class Expr >
template<int Dim2, class T2 , class Expr2 , class Initializer >
Engine< Dim, T, ExpressionTag< Expr > >::Engine ( const Engine< Dim2, T2, ExpressionTag< Expr2 > > &  e,
const Initializer &  i 
) [inline]

Subsetting Constructor.

We build this expression engine, in place, from another expression engine and a domain. We pass a ViewFunctorTag since we will need to do some fiddling with the domain. Expression-engines are zero based, but can contain objects at their leaves that are not zero-based. This means that when we get to the leaves, we must adjust the domain based on where the indices start for the leaf's engine.

template<int Dim, class T , class Expr >
template<int Dim2, class T2 , class Expr2 , class I1 , class I2 >
Engine< Dim, T, ExpressionTag< Expr > >::Engine ( const Engine< Dim2, T2, ExpressionTag< Expr2 > > &  e,
const I1 &  i1,
const I2 &  i2 
) [inline]
template<int Dim, class T , class Expr >
template<class Expr2 >
Engine< Dim, T, ExpressionTag< Expr > >::Engine ( const Engine< Dim, T, ExpressionTag< Expr2 > > &  e) [inline, explicit]

Construct from another expression without a domain.


Member Function Documentation

template<int Dim, class T , class Expr >
const Expression_t& Engine< Dim, T, ExpressionTag< Expr > >::expression ( ) const [inline]

Accessor functions that return the expression.

template<int Dim, class T , class Expr >
Expression_t& Engine< Dim, T, ExpressionTag< Expr > >::expression ( ) [inline]
template<int Dim, class T , class Expr >
Engine_t& Engine< Dim, T, ExpressionTag< Expr > >::makeOwnCopy ( )

Get a private copy of the expression.

template<int Dim, class T , class Expr >
Element_t Engine< Dim, T, ExpressionTag< Expr > >::read ( int  i0) const [inline]

Accessor functions for a specific element.

We recursively go through the expression tree asking each node and leaf to evaluate itself and combine results based on the OpCombine.

References forEach().

template<int Dim, class T , class Expr >
Element_t Engine< Dim, T, ExpressionTag< Expr > >::read ( int  i0,
int  i1 
) const [inline]

References forEach().

template<int Dim, class T , class Expr >
Element_t Engine< Dim, T, ExpressionTag< Expr > >::read ( int  i0,
int  i1,
int  i2 
) const [inline]

References forEach().

template<int Dim, class T , class Expr >
Element_t Engine< Dim, T, ExpressionTag< Expr > >::read ( int  i0,
int  i1,
int  i2,
int  i3 
) const [inline]

References forEach().

template<int Dim, class T , class Expr >
Element_t Engine< Dim, T, ExpressionTag< Expr > >::read ( int  i0,
int  i1,
int  i2,
int  i3,
int  i4 
) const [inline]

References forEach().

template<int Dim, class T , class Expr >
Element_t Engine< Dim, T, ExpressionTag< Expr > >::read ( int  i0,
int  i1,
int  i2,
int  i3,
int  i4,
int  i5 
) const [inline]

References forEach().

template<int Dim, class T , class Expr >
Element_t Engine< Dim, T, ExpressionTag< Expr > >::read ( int  i0,
int  i1,
int  i2,
int  i3,
int  i4,
int  i5,
int  i6 
) const [inline]

References forEach().

template<int Dim, class T , class Expr >
Element_t Engine< Dim, T, ExpressionTag< Expr > >::read ( const Loc< Dim > &  loc) const [inline]

References forEach().

template<int Dim, class T , class Expr >
const Domain_t& Engine< Dim, T, ExpressionTag< Expr > >::domain ( ) const [inline]

Function to return the common domain.

We recursively go through the expression tree asking each node and leaf to return their domain and combine the results based on the DomainFunctorTag. The DomainFunctorTag combiners are above.

template<int Dim, class T , class Expr >
Layout_t Engine< Dim, T, ExpressionTag< Expr > >::layout ( ) const [inline]

Return a layout.

template<int Dim, class T , class Expr >
int Engine< Dim, T, ExpressionTag< Expr > >::first ( int  ) const [inline]

Return the first value for the specified direction (always zero since this engine is zero-based).

template<int Dim, class T , class Expr >
template<class RequestType >
DataObjectRequest<RequestType>::Type_t Engine< Dim, T, ExpressionTag< Expr > >::dataObjectRequest ( const DataObjectRequest< RequestType > &  f) const [inline]

Need to pass lock requests to the leaves.

References forEach().


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