A memory array that may share its data storage with something else.
More...
#include <ReferencingMemArray.hpp>
List of all members.
Public Types
Public Member Functions
-
ReferencingMemArray (const Iterator< T > &data, const MultiIndex< N > &Sz, const RefPtr< MemCore::ChunkBase > &MemStorage, const WeakPtr< CreativeArrayBase > &theCreator)
- Constructor.
-
ReferencingMemArray (const RefPtr< Chunk< T > > &data, const MultiIndex< N > &Sz, const WeakPtr< CreativeArrayBase > &theCreator)
- Construct from memory chunk and multidimensional index.
- ReferencingMemArray (const RefPtr< MemCore::ChunkBase > &Storage, const MultiArray< N, T > &M, const WeakPtr< CreativeArrayBase > &theCreator)
- Create referencing mem array from an existing multi array and some memory reference.
-
override RefPtr
< MemCore::TypedChunk< T > > myChunk () const
- Return storage type.
-
override MemCore::memsize_t memsize () const
- Note: memsize does not return the number of elements here, but the actual memory that is occupied.
-
override index_t nElements () const
- return the number of elements in this array
-
override void DeferredConstructor ()
- Virtual deferred reference pointer construction pointer Don't overload if you don't know exactly what this function is supposed to do. See class DynPtr for more info.
-
override const type_info & getType () const
- Return the element type of the certain array.
-
override const type_info & getBaseType () const
- Return the element type of the certain array.
-
override const FiberTypeBase & getFiberType () const
-
override HyperslabParameters & getHyperslabParameters ()
- override void * getPtr ()
- Special Array Storage.
-
override const void * OriginPtr () const
- Get pointer to origin of linearly procedural array, if it is linear.
-
override const void * DeltaPtr () const
- Get pointer to delta of linearly procedural array, if it is linear.
-
override T first () const
- Retrieve the first element.
-
override T last () const
- Retrieve the last element.
-
override CreativeIterator< T > * creativeIterator ()
-
override const
CreativeIterator< T > * creativeIterator () const
-
const RefPtr
< MemCore::ChunkBase > & StoragePtr () const
-
const RefPtr
< MemCore::ChunkBase > & getStorage () const
-
RefPtr< MemCore::TypedChunk< T > > getTypedStorage () const
Protected Attributes
Detailed Description
template<int N, class T>
class Fiber::ReferencingMemArray< N, T >
A memory array that may share its data storage with something else.
- Author:
- Werner Benger
Constructor & Destructor Documentation
template<int N, class T >
Create referencing mem array from an existing multi array and some memory reference.
It is assumed that the data reference is associated with the provided multi array, otherwise calling this constructor makes no sense. However, the base offset of the memory location does not need to overlap. This is useful when the multiarray refers to a subset of a larger memory instance. Required for the getSlice() function.
Member Function Documentation
template<int N, class T >
Special Array Storage.
Get pointer to underlying data, if this is a contiguous array
Implements Fiber::MemBase.