Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes

Fiber::MemBase Class Reference
[Interfacing the Vector library with the MemCore library.]

Base class for multidimensional arrays with MemCore memory management. More...

#include <MemBase.hpp>

List of all members.

Classes

Public Types

Public Member Functions

Static Public Member Functions

Static Public Attributes


Detailed Description

Base class for multidimensional arrays with MemCore memory management.


Member Function Documentation

RefPtr< MemBase > MemBase::create ( const RefPtr< FiberTypeBase > &  FT,
int  rank,
const index_t  dims[],
const Creator_t C,
const type_info &  layout = typeid(void) 
) [static]

Given a description of a certain data type for each element on array, allocate a multidimensional array of the given type.

The creation will be forwarded to certain Allocators of this specific type, which have been registered through registerCreator();

virtual RefPtr<MemBase> Fiber::MemBase::createEquallySizedMemArray ( const RefPtr< MemCore::ChunkBase > &  Storage,
const MemBase::Creator_t C 
) const [pure virtual]

Create a memory array of the same dimensions as the current array, but with data as provided by the Storage.

Will return NullPtr if the size and types don't match. Calls MemArray::createMemArray() .

Referenced by Fiber::TypedArray< Eagle::point3 >::applyOperator().

virtual RefPtr<MemBase> Fiber::MemBase::createIndirection ( const DynamicSize newSize,
const std::vector< index_t > &  Indirection,
const MemBase::Creator_t theCreator 
) const [pure virtual]

Create a new array of the same type as the current one but with only those values that are specified in the Indirection array.

The size() of the Indirection must match the number of elements in the newSize.

Implemented in Fiber::TypedArray< T >, and Fiber::TypedArray< Eagle::point3 >.

virtual void* Fiber::MemBase::getPtr (  )  [pure virtual]

Special Array Storage.

Get pointer to underlying data, if this is a contiguous array

Implemented in Fiber::ReferencingMemArray< N, T >.

virtual RefPtr<MemBase> Fiber::MemBase::makeMemArray ( const MemBase::Creator_t C  )  const [pure virtual]

Provide a MemArray, even though the actual data is a procedural array.

This is useful when some code explicitely needs to deal with data pointer, even though it is inefficient in terms of memory.

Implemented in Fiber::DirectProductMemArray< T, MDIMS >, and Fiber::DirectProductMemArray< Eagle::point3, Eagle::point3::SIZE >.