template<int MAJOR_ORDER_TYPE, typename T>
class WmTypedArray< MAJOR_ORDER_TYPE, T >
Defines common interface for arrays of type T elements.
Support for arbitrary dimensions, major ordering, and start indices.
|
| WmTypedArray (const WxRange &range, T *data) |
| Array spanning given range object.
|
|
| WmTypedArray (const WxRange &range) |
| Array spanning given range object.
|
|
| WmTypedArray (const WmTypedArray< MAJOR_ORDER_TYPE, T > &that) |
| Copy constructor does not allocate new memory.
|
|
| WmTypedArray (const WmTypeOpaqueArray< MAJOR_ORDER_TYPE > &that) |
| Special copy constructor does not allocate new memory.
|
|
WmTypedArray< MAJOR_ORDER_TYPE, T > & | operator= (const WmTypedArray< MAJOR_ORDER_TYPE, T > &that) |
|
| ~WmTypedArray () |
| Delete instance which may or may not involve freeing array element allocation.
|
|
T | operator() (int k0) const |
| Rank-1 indexer.
|
|
T & | operator() (int k0) |
|
T | operator() (int k0, int k1) const |
| Rank-2 indexer.
|
|
T & | operator() (int k0, int k1) |
|
T | operator() (int k0, int k1, int k2) const |
| Rank-3 indexer.
|
|
T & | operator() (int k0, int k1, int k2) |
|
T | operator() (int k0, int k1, int k2, int k3) const |
| Rank-4 indexer.
|
|
T & | operator() (int k0, int k1, int k2, int k3) |
|
T * | data () |
| Access raw array data.
|
|
const T * | data () const |
| Access raw array data.
|
|
T * | dataSlab (const int *indices, int indicesRank) |
| Access higher dimension slab of raw array element.
|
|
const T * | dataSlab (const int *indices, int indicesRank) const |
| Access higher dimension slab of raw array element.
|
|
| WmTypeOpaqueArray (const WxRange &range, void *data, int numBytesPerElement) |
| Array spanning given range object.
|
|
| WmTypeOpaqueArray (const WmTypeOpaqueArray< MAJOR_ORDER_TYPE > &that) |
| Copy constructor does not allocate new memory.
|
|
WmTypeOpaqueArray< MAJOR_ORDER_TYPE > & | operator= (const WmTypeOpaqueArray< MAJOR_ORDER_TYPE > &that) |
|
void * | data () |
| Access start of raw array data.
|
|
const void * | data () const |
| Access start of raw array data.
|
|
void * | data (const int *indices) |
| Access raw array element.
|
|
const void * | data (const int *indices) const |
| Access raw array element.
|
|
void * | dataSlab (const int *indices, int indicesRank) |
| Access higher dimension slab of raw array element.
|
|
const void * | dataSlab (const int *indices, int indicesRank) const |
| Access higher dimension slab of raw array element.
|
|
int | numBytesPerElement () const |
|
void | put (const WxRange &selection, const WxRange &inputShape, const void *bufin) |
| Copy data elements from bufin to the region described by the range selection.
|
|
void | get (const WxRange &selection, const WxRange &outputShape, void *bufout) const |
| Copy data elements from the region described range selection to the bufout provided.
|
|
virtual | ~WmTypeOpaqueArray () |
| Delete object which only describes the array geometry, no array allocation is deleted.
|
|
const WxRange & | range () const |
|
|
void | resetArrayProperties (const WxRange &range, T *newdata) |
| Copy data elements from bufin to the region described by the range selection.
|
|
| WmTypedArray () |
| Default ctor does not set up array geometry initially, this must be done later, so it is only exposed to derived classes.
|
|
| WmTypeOpaqueArray () |
| Default ctor does not set up array geometry initially, this must be done later, so it is only exposed to derived classes.
|
|
void | resetArrayProperties (const WxRange &range, void *data, int numBytesPerElement) |
| Reset the properties of this array.
|
|
| WmArrayBase () |
| Default ctor does not set up array geometry initially, this must be done later.
|
|
| WmArrayBase (const WxRange &range) |
| Array spanning given range object.
|
|
| WmArrayBase (const WmArrayBase< MAJOR_ORDER_TYPE > &that) |
| Copy constructor duplicates the array geometry properties of original one.
|
|
WmArrayBase< MAJOR_ORDER_TYPE > & | operator= (const WmArrayBase< MAJOR_ORDER_TYPE > &that) |
| Assignment operator duplicates the array geometry properties of right hand side one.
|
|
| ~WmArrayBase () |
| Delete object which only describes the array geometry, no array allocation is deleted.
|
|
void | setRange (const WxRange &range) |
| Array spanning given range object.
|
|
unsigned | rank () const |
| Rank of array.
|
|
template<int MAJOR_ORDER_TYPE, typename T >
void WmTypedArray< MAJOR_ORDER_TYPE, T >::resetArrayProperties |
( |
const WxRange & |
range, |
|
|
T * |
newdata |
|
) |
| |
|
inlineprotected |
Copy data elements from bufin to the region described by the range selection.
Assumes that the bufin elements are arranged exactly matching the dimensions of the destination range. (i.e. same major ordering, no ghost/exterior cells skipping.
- Parameters
-
hyper-rectangular | range in this array to copy into. |
source | data elements with contiguous arrangement. Copy data elements from the region described range selection to the bufout provided. |
The bufout elements are arranged exactly matching the dimensions of the source range. (i.e. same major ordering, no ghost/exterior cell skipping.
- Parameters
-
hyper-rectangular | range in this array to copy from. |
desitination | data elements with contiguous arrangement. Reset the properties of this array. |
protected so only responsible derived class can change geometry. Intended for modification to instances that are not responsible for allocation. But, if called on such an instance, the allocation will be freed.