FreePOOMA  2.4.1
Public Types | Public Member Functions | Protected Attributes
Engine< Dim, T, Remote< Tag > > Class Template Reference

Engine<Dim, T, Remote<Tag> > is. More...

#include <RemoteEngine.h>

List of all members.

Public Types

enum  { dimensions = Dim }
enum  { hasDataObject = true }
enum  { dynamic = false }
enum  { zeroBased = false }
enum  { multiPatch = false }
typedef Engine< Dim, T, Remote
< Tag > > 
This_t
typedef Engine< Dim, T, Remote
< Tag > > 
Engine_t
typedef Engine< Dim, T, Tag > LocalEngine_t
typedef Interval< Dim > Domain_t
typedef T Element_t
typedef RemoteProxy< T > ElementRef_t
typedef Remote< Tag > Tag_t
typedef DomainLayout< Dim > Layout_t
typedef Shared< LocalEngine_tLocalShared_t
typedef RefCountedPtr
< LocalShared_t
LocalPtr_t

Public Member Functions

 Engine ()
 Default constructor.
 Engine (const Domain_t &domain)
 These constructors take an Interval<Dim> and set the owning context to 0.
 Engine (int owningContext, const Domain_t &domain)
 Engine (const Domain_t &domain, const T &elementModel)
 Constructs a Remote-Engine holding type T elements with the multidimensional domain given by Interval<Dim>.
 Engine (const Node< Domain_t > &node)
 This constructor takes a Node object, extracts the domain, and creates a new LocalEngine_t on the context given by the Node.
 Engine (const Layout_t &layout)
 This constructor basically ignores the context given by the DomainLayout, because that context is currently bogus.
 Engine (const Engine_t &model)
 Copy constructor should perform a SHALLOW copy.
 Engine (const Engine_t &, const EngineConstructTag &)
template<class OtherEngine , class Domain >
 Engine (const OtherEngine &otherEngine, const Domain &domain)
 Subsetting Constructors.
template<class OtherEngine , int D2>
 Engine (const OtherEngine &otherEngine, const SliceRange< D2, Dim > &domain)
 ~Engine ()
Engine_toperator= (const Engine_t &model)
 Assigment should be SHALLOW, to be consistent with copy.
Element_t read (const Loc< Dim > &) const
 Element access via Loc.
ElementRef_t operator() (const Loc< Dim > &) const
 Return a reference to the element specified by loc.
Element_t read (int) const
 Element access via ints for speed.
Element_t read (int, int) const
Element_t read (int, int, int) const
Element_t read (int, int, int, int) const
Element_t read (int, int, int, int, int) const
Element_t read (int, int, int, int, int, int) const
Element_t read (int, int, int, int, int, int, int) const
ElementRef_t operator() (int) const
 Return a reference to the element specified by list of ints..
ElementRef_t operator() (int, int) const
ElementRef_t operator() (int, int, int) const
ElementRef_t operator() (int, int, int, int) const
ElementRef_t operator() (int, int, int, int, int) const
ElementRef_t operator() (int, int, int, int, int, int) const
ElementRef_t operator() (int, int, int, int, int, int, int) const
const Domain_tdomain () const
 Return the domain.
bool engineIsLocal () const
 Accessor function that checks if the engine is local.
int owningContext () const
 The owningContext() is the context that actually allocates a local engine where the data is stored.
const LocalEngine_tlocalEngine () const
 Return a reference to the localEngine().
LocalEngine_tlocalEngine ()
int first (int i) const
 first() interface
Engine_tmakeOwnCopy ()
 Get a private copy of data viewed by this Engine.

Protected Attributes

Domain_t domain_m
 The domain.

Detailed Description

template<int Dim, class T, class Tag>
class Engine< Dim, T, Remote< Tag > >

Engine<Dim, T, Remote<Tag> > is.


Member Typedef Documentation

template<int Dim, class T , class Tag >
typedef Engine<Dim, T, Remote<Tag> > Engine< Dim, T, Remote< Tag > >::This_t
template<int Dim, class T , class Tag >
typedef Engine<Dim, T, Remote<Tag> > Engine< Dim, T, Remote< Tag > >::Engine_t
template<int Dim, class T , class Tag >
typedef Engine<Dim, T, Tag> Engine< Dim, T, Remote< Tag > >::LocalEngine_t
template<int Dim, class T , class Tag >
typedef Interval<Dim> Engine< Dim, T, Remote< Tag > >::Domain_t
template<int Dim, class T , class Tag >
typedef T Engine< Dim, T, Remote< Tag > >::Element_t
template<int Dim, class T , class Tag >
typedef RemoteProxy<T> Engine< Dim, T, Remote< Tag > >::ElementRef_t
template<int Dim, class T , class Tag >
typedef Remote<Tag> Engine< Dim, T, Remote< Tag > >::Tag_t
template<int Dim, class T , class Tag >
typedef DomainLayout<Dim> Engine< Dim, T, Remote< Tag > >::Layout_t
template<int Dim, class T , class Tag >
typedef Shared<LocalEngine_t> Engine< Dim, T, Remote< Tag > >::LocalShared_t
template<int Dim, class T , class Tag >
typedef RefCountedPtr<LocalShared_t> Engine< Dim, T, Remote< Tag > >::LocalPtr_t

Member Enumeration Documentation

template<int Dim, class T , class Tag >
anonymous enum
Enumerator:
dimensions 
template<int Dim, class T , class Tag >
anonymous enum
Enumerator:
hasDataObject 
template<int Dim, class T , class Tag >
anonymous enum
Enumerator:
dynamic 
template<int Dim, class T , class Tag >
anonymous enum
Enumerator:
zeroBased 
template<int Dim, class T , class Tag >
anonymous enum
Enumerator:
multiPatch 

Constructor & Destructor Documentation

template<int Dim, class T , class Tag >
Engine< Dim, T, Remote< Tag > >::Engine ( )

Default constructor.

References Pooma::contexts(), and PAssert.

template<int Dim, class T , class Tag >
Engine< Dim, T, Remote< Tag > >::Engine ( const Domain_t dom) [explicit]

These constructors take an Interval<Dim> and set the owning context to 0.

Constructs a Remote-Engine holding type T elements with the multidimensional domain given by Interval<Dim>.

On context 0 we create a new LocalEngine_t.

Elements are initialized with the default constructor.

template<int Dim, class T , class Tag >
Engine< Dim, T, Remote< Tag > >::Engine ( int  owningContext,
const Domain_t domain 
)
template<int Dim, class T , class Tag >
Engine< Dim, T, Remote< Tag > >::Engine ( const Domain_t dom,
const T &  model 
)

Constructs a Remote-Engine holding type T elements with the multidimensional domain given by Interval<Dim>.

Initializes these with a model.

template<int Dim, class T , class Tag >
Engine< Dim, T, Remote< Tag > >::Engine ( const Node< Domain_t > &  node) [explicit]

This constructor takes a Node object, extracts the domain, and creates a new LocalEngine_t on the context given by the Node.

References Pooma::contexts(), and PAssert.

template<int Dim, class T , class Tag >
Engine< Dim, T, Remote< Tag > >::Engine ( const Layout_t layout) [explicit]

This constructor basically ignores the context given by the DomainLayout, because that context is currently bogus.

(It should be -1 when used for Bricks and set to a specific context for RemoteBricks, not to Pooma::context() which implies that everyone thinks that they own the data and no one else owns the data.)

References Pooma::contexts(), and PAssert.

template<int Dim, class T , class Tag >
Engine< Dim, T, Remote< Tag > >::Engine ( const Engine_t model)

Copy constructor should perform a SHALLOW copy.

Copy constructor for Remote-Engine.

template<int Dim, class T , class Tag >
Engine< Dim, T, Remote< Tag > >::Engine ( const Engine_t modelEngine,
const EngineConstructTag  
)
template<int Dim, class T , class Tag >
template<class OtherEngine , class Domain >
Engine< Dim, T, Remote< Tag > >::Engine ( const OtherEngine< Dim, T, Remote< Tag > > &  otherEngine,
const Domain domain 
)

Subsetting Constructors.

All the work of the subsetting is deferred to the LocalEngine_t.

template<int Dim, class T , class Tag >
template<class OtherEngine , int D2>
Engine< Dim, T, Remote< Tag > >::Engine ( const OtherEngine< Dim, T, Remote< Tag > > &  otherEngine,
const SliceRange< D2, Dim > &  domain 
)
template<int Dim, class T , class Tag >
Engine< Dim, T, Remote< Tag > >::~Engine ( )

Member Function Documentation

template<int Dim, class T , class Tag >
Engine< Dim, T, Remote< Tag > > & Engine< Dim, T, Remote< Tag > >::operator= ( const Engine_t model)

Assigment should be SHALLOW, to be consistent with copy.

Assignment operator for Remote-Engines.

References DomainBase< DT >::domain_m.

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

Element access via Loc.

Return the element specified by loc.

template<int Dim, class T , class Tag >
RemoteProxy< T > Engine< Dim, T, Remote< Tag > >::operator() ( const Loc< Dim > &  loc) const [inline]

Return a reference to the element specified by loc.

template<int Dim, class T , class Tag >
T Engine< Dim, T, Remote< Tag > >::read ( int  i1) const [inline]

Element access via ints for speed.

Return the element specified by list of ints.

References CTAssert.

template<int Dim, class T , class Tag >
T Engine< Dim, T, Remote< Tag > >::read ( int  i1,
int  i2 
) const [inline]

References CTAssert.

template<int Dim, class T , class Tag >
T Engine< Dim, T, Remote< Tag > >::read ( int  i1,
int  i2,
int  i3 
) const [inline]

References CTAssert.

template<int Dim, class T , class Tag >
T Engine< Dim, T, Remote< Tag > >::read ( int  i1,
int  i2,
int  i3,
int  i4 
) const [inline]

References CTAssert.

template<int Dim, class T , class Tag >
T Engine< Dim, T, Remote< Tag > >::read ( int  i1,
int  i2,
int  i3,
int  i4,
int  i5 
) const [inline]

References CTAssert.

template<int Dim, class T , class Tag >
T Engine< Dim, T, Remote< Tag > >::read ( int  i1,
int  i2,
int  i3,
int  i4,
int  i5,
int  i6 
) const [inline]

References CTAssert.

template<int Dim, class T , class Tag >
T Engine< Dim, T, Remote< Tag > >::read ( int  i1,
int  i2,
int  i3,
int  i4,
int  i5,
int  i6,
int  i7 
) const [inline]

References CTAssert.

template<int Dim, class T , class Tag >
RemoteProxy< T > Engine< Dim, T, Remote< Tag > >::operator() ( int  i1) const [inline]

Return a reference to the element specified by list of ints..

References CTAssert.

template<int Dim, class T , class Tag >
RemoteProxy< T > Engine< Dim, T, Remote< Tag > >::operator() ( int  i1,
int  i2 
) const [inline]

References CTAssert.

template<int Dim, class T , class Tag >
RemoteProxy< T > Engine< Dim, T, Remote< Tag > >::operator() ( int  i1,
int  i2,
int  i3 
) const [inline]

References CTAssert.

template<int Dim, class T , class Tag >
RemoteProxy< T > Engine< Dim, T, Remote< Tag > >::operator() ( int  i1,
int  i2,
int  i3,
int  i4 
) const [inline]

References CTAssert.

template<int Dim, class T , class Tag >
RemoteProxy< T > Engine< Dim, T, Remote< Tag > >::operator() ( int  i1,
int  i2,
int  i3,
int  i4,
int  i5 
) const [inline]

References CTAssert.

template<int Dim, class T , class Tag >
RemoteProxy< T > Engine< Dim, T, Remote< Tag > >::operator() ( int  i1,
int  i2,
int  i3,
int  i4,
int  i5,
int  i6 
) const [inline]

References CTAssert.

template<int Dim, class T , class Tag >
RemoteProxy< T > Engine< Dim, T, Remote< Tag > >::operator() ( int  i1,
int  i2,
int  i3,
int  i4,
int  i5,
int  i6,
int  i7 
) const [inline]

References CTAssert.

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

Return the domain.

template<int Dim, class T , class Tag >
bool Engine< Dim, T, Remote< Tag > >::engineIsLocal ( ) const [inline]

Accessor function that checks if the engine is local.

(Really you can get this from owningContext(), but most of the code we write is of the form if (local) ... else ...)

References Pooma::context().

Referenced by LeafFunctor< Engine< Dim, T, Remote< Tag > >, ExpressionApply< RemoteSend > >::apply().

template<int Dim, class T , class Tag >
int Engine< Dim, T, Remote< Tag > >::owningContext ( ) const [inline]

The owningContext() is the context that actually allocates a local engine where the data is stored.

Referenced by EngineFunctor< Engine< Dim, T, Remote< Tag > >, GatherContexts >::apply().

template<int Dim, class T , class Tag >
const LocalEngine_t& Engine< Dim, T, Remote< Tag > >::localEngine ( ) const [inline]

Return a reference to the localEngine().

This operation only makes sense on the context that owns the data.

References PAssert.

Referenced by LeafFunctor< Engine< Dim, T, Remote< Tag > >, ExpressionApply< RemoteSend > >::apply().

template<int Dim, class T , class Tag >
LocalEngine_t& Engine< Dim, T, Remote< Tag > >::localEngine ( ) [inline]

References PAssert.

template<int Dim, class T , class Tag >
int Engine< Dim, T, Remote< Tag > >::first ( int  i) const [inline]

first() interface

template<int Dim, class T , class Tag >
Engine_t& Engine< Dim, T, Remote< Tag > >::makeOwnCopy ( ) [inline]

Get a private copy of data viewed by this Engine.


Member Data Documentation

template<int Dim, class T , class Tag >
Domain_t Engine< Dim, T, Remote< Tag > >::domain_m [protected]

The domain.

We don't just pull the domain out of the localEngine because it doesn't exist on every context. The domain is protected because RemoteDynamic engine is derived from Remote engine and needs to update the domain when sync() is called.


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