|
FreePOOMA
2.4.1
|
Engine<Dim,T,Brick> (aka Brick-Engine) More...
#include <BrickEngine.h>


Public Types | |
| enum | { brick = true } |
| enum | { dimensions = Dim } |
| enum | { hasDataObject = true } |
| enum | { dynamic = false } |
| enum | { zeroBased = false } |
| enum | { multiPatch = false } |
| typedef Engine< Dim, T, Brick > | This_t |
| typedef Engine< Dim, T, Brick > | Engine_t |
| typedef Pooma::BrickBase< Dim > | Base_t |
| typedef Base_t::Domain_t | Domain_t |
| typedef DomainLayout< Dim > | Layout_t |
| typedef T | Element_t |
| typedef T & | ElementRef_t |
| typedef Brick | Tag_t |
Public Member Functions | |
| Engine () | |
| Default constructor. | |
| Engine (const Layout_t &layout) | |
| You can build a brick from a layout as well. | |
| Engine (const Node< Domain_t > &node) | |
| This constructor takes a Node object, extracts the domain, and creates a new Brick-Engine with data of type T on this Domain. | |
| Engine (T *foreignData, const Domain_t &domain) | |
| This constructor takes a domain and a pointer to external memory, and constructs a Brick-Engine wrapper for this external memory. | |
| Engine (const This_t &model) | |
| Copy constructor performs a shallow copy. | |
| ~Engine () | |
| All pointer members are smart pointers, so this is trivial. | |
| This_t & | operator= (const This_t &model) |
| Assigment is SHALLOW, to be consistent with copy. | |
| Engine_t & | makeOwnCopy () |
| Get a private copy of data viewed by this Engine. | |
| Pooma::DataObject_t * | dataObject () const |
| Provide access to the data object. | |
| bool | isShared () const |
| Return whether the block controlled by this engine is shared. | |
| Engine (const Domain_t &domain) | |
| These constructors take an Interval<Dim> and create a new Brick-Engine with data of type T on this Domain. | |
| Engine (const Domain_t &domain, const T &elementModel) | |
| Element_t | read (const Loc< Dim > &loc) const |
| Element access via Loc. | |
| ElementRef_t | operator() (const Loc< Dim > &loc) const |
| Element_t | read (int i1) const |
| Element access via ints for speed. | |
| Element_t | read (int i1, int i2) const |
| Element_t | read (int i1, int i2, int i3) const |
| Element_t | read (int i1, int i2, int i3, int i4) const |
| Element_t | read (int i1, int i2, int i3, int i4, int i5) const |
| Element_t | read (int i1, int i2, int i3, int i4, int i5, int i6) const |
| Element_t | read (int i1, int i2, int i3, int i4, int i5, int i6, int i7) const |
| ElementRef_t | operator() (int i1) const |
| ElementRef_t | operator() (int i1, int i2) const |
| ElementRef_t | operator() (int i1, int i2, int i3) const |
| ElementRef_t | operator() (int i1, int i2, int i3, int i4) const |
| ElementRef_t | operator() (int i1, int i2, int i3, int i4, int i5) const |
| ElementRef_t | operator() (int i1, int i2, int i3, int i4, int i5, int i6) const |
| ElementRef_t | operator() (int i1, int i2, int i3, int i4, int i5, int i6, int i7) const |
| DataBlockPtr< T > | dataBlock () |
| Return access to our internal data block. | |
| const DataBlockPtr< T > & | dataBlock () const |
Engine<Dim,T,Brick> (aka Brick-Engine)
Engine<Dim,T,Brick> is an Engine that manages a contiguous, local, Dim-dimensional brick of data.
Template Parameters:
The Domain of this engine is an Interval<Dim>, which is a tensor product of Dim 1-D intervals.
Subsetting Engine<Dim,T,Brick> returns an Engine<Dim,T,BrickView>. See below.
Reimplemented from Pooma::BrickBase< Dim >.
| typedef Pooma::BrickBase<Dim> Engine< Dim, T, Brick >::Base_t |
| typedef Base_t::Domain_t Engine< Dim, T, Brick >::Domain_t |
Reimplemented from Pooma::BrickBase< Dim >.
| typedef DomainLayout<Dim> Engine< Dim, T, Brick >::Layout_t |
Reimplemented from Pooma::BrickBase< Dim >.
| typedef T& Engine< Dim, T, Brick >::ElementRef_t |
Default constructor.
Creates a Brick-Engine with no data and an "empty" domain. This is not really usable until it has been initialized (via operator=) to a new engine with an actual domain.
These constructors take an Interval<Dim> and create a new Brick-Engine with data of type T on this Domain.
This is where storage gets allocated. The second version uses a model data element to initialize storage.
| Engine< Dim, T, Brick >::Engine | ( | const Domain_t & | domain, |
| const T & | elementModel | ||
| ) |
You can build a brick from a layout as well.
| Engine< Dim, T, Brick >::Engine | ( | T * | foreignData, |
| const Domain_t & | domain | ||
| ) |
This constructor takes a domain and a pointer to external memory, and constructs a Brick-Engine wrapper for this external memory.
Used for layering Pooma II arrays on top of someone elses data.
Copy constructor performs a shallow copy.
But note: the layouts will not be shared.
All pointer members are smart pointers, so this is trivial.
| This_t& Engine< Dim, T, Brick >::operator= | ( | const This_t & | model | ) | [inline] |
Assigment is SHALLOW, to be consistent with copy.
References PAssert.
| Element_t Engine< Dim, T, Brick >::read | ( | const Loc< Dim > & | loc | ) | const [inline] |
Element access via Loc.
| ElementRef_t Engine< Dim, T, Brick >::operator() | ( | const Loc< Dim > & | loc | ) | const [inline] |
Element access via ints for speed.
References CTAssert.
| Element_t Engine< Dim, T, Brick >::read | ( | int | i1, |
| int | i2 | ||
| ) | const [inline] |
References CTAssert.
| Element_t Engine< Dim, T, Brick >::read | ( | int | i1, |
| int | i2, | ||
| int | i3 | ||
| ) | const [inline] |
References CTAssert.
| Element_t Engine< Dim, T, Brick >::read | ( | int | i1, |
| int | i2, | ||
| int | i3, | ||
| int | i4 | ||
| ) | const [inline] |
References CTAssert.
| Element_t Engine< Dim, T, Brick >::read | ( | int | i1, |
| int | i2, | ||
| int | i3, | ||
| int | i4, | ||
| int | i5 | ||
| ) | const [inline] |
References CTAssert.
| Element_t Engine< Dim, T, Brick >::read | ( | int | i1, |
| int | i2, | ||
| int | i3, | ||
| int | i4, | ||
| int | i5, | ||
| int | i6 | ||
| ) | const [inline] |
References CTAssert.
| Element_t Engine< Dim, T, Brick >::read | ( | int | i1, |
| int | i2, | ||
| int | i3, | ||
| int | i4, | ||
| int | i5, | ||
| int | i6, | ||
| int | i7 | ||
| ) | const [inline] |
References CTAssert.
| ElementRef_t Engine< Dim, T, Brick >::operator() | ( | int | i1 | ) | const [inline] |
References CTAssert.
| ElementRef_t Engine< Dim, T, Brick >::operator() | ( | int | i1, |
| int | i2 | ||
| ) | const [inline] |
References CTAssert.
| ElementRef_t Engine< Dim, T, Brick >::operator() | ( | int | i1, |
| int | i2, | ||
| int | i3 | ||
| ) | const [inline] |
References CTAssert.
| ElementRef_t Engine< Dim, T, Brick >::operator() | ( | int | i1, |
| int | i2, | ||
| int | i3, | ||
| int | i4 | ||
| ) | const [inline] |
References CTAssert.
| ElementRef_t Engine< Dim, T, Brick >::operator() | ( | int | i1, |
| int | i2, | ||
| int | i3, | ||
| int | i4, | ||
| int | i5 | ||
| ) | const [inline] |
References CTAssert.
| ElementRef_t Engine< Dim, T, Brick >::operator() | ( | int | i1, |
| int | i2, | ||
| int | i3, | ||
| int | i4, | ||
| int | i5, | ||
| int | i6 | ||
| ) | const [inline] |
References CTAssert.
| ElementRef_t Engine< Dim, T, Brick >::operator() | ( | int | i1, |
| int | i2, | ||
| int | i3, | ||
| int | i4, | ||
| int | i5, | ||
| int | i6, | ||
| int | i7 | ||
| ) | const [inline] |
References CTAssert.
| Engine< Dim, T, Brick > & Engine< Dim, T, Brick >::makeOwnCopy | ( | ) |
Get a private copy of data viewed by this Engine.
References PAssert.
| Pooma::DataObject_t* Engine< Dim, T, Brick >::dataObject | ( | ) | const [inline] |
Provide access to the data object.
| DataBlockPtr<T> Engine< Dim, T, Brick >::dataBlock | ( | ) | [inline] |
Return access to our internal data block.
This is ref-counted, so a copy is fine. But you should really know what you're doing if you call this method. (cbrick's value version is const - why isn't this???)
Referenced by Engine< Dim, T, BrickView >::Engine().
| const DataBlockPtr<T>& Engine< Dim, T, Brick >::dataBlock | ( | ) | const [inline] |
Return whether the block controlled by this engine is shared.
(Is this used??? CompressibleBrick didn't have one!!!)
1.7.6.1