#include <marray.h>
MArray
has associated MemoryBlock . {1..ni, i=1..N}
, int
arguments, base defaults to 1. dims
[] holds the lengths of each dimension (The number of dimensions, and hence the length of dims
[] is known from the template parameter N
.) No checking is performed. The index ranges are {1
..dims[i]} along each dimension i
. MArray rhs, an expression rhs, and a literal rhs for each operator. To have a single implementation of mathematical operations for scalar and vectorized code (where the C language extensions do not define X= ), we transform the \code A x= E
A = A x E
operator=
int
/ ltl::FixedVector arguments, return (reference to) element. ltl::Shape
.
MArrays
feature subarrays (sometimes called views), slices, expression templated evaluation, and other features described below. The memory holding the actual data is reference counted, such that it is not freed until the last reference to the data by views or slices has been removed.
|
Construct an array without allocating memory.
This is useful for constructing
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Constructor for mixed slicing (int, rank reducing) and Range arguments. Other array's data is referenced, NOT copied ( use operator=() for copy)! |
|
Construct from shape. Useful to construct an array having the same geometry as another array. If you have map == true and give a filename the memory map will be saved. |
|
Construct from an array-valued expression. The new array is allocated with the shape of the expression and its elements are filled with the evaluated expression. If you have map == true and give a filename the memory map will be saved. |
|
In case our memory layout is contiguous, we can offer an easy solution to provide random access iterators. |
|
Pointer to first data element.
|
|
Free associated memory. Frees the memory used to store the data before the MArray goes out of scope (before the destructor is being called). Can help keeping code cleaner without using pointers to MArray. |
|
An iterator-style thing providing indices when dereferenced. I.e. *i or i() gives a FixedVector holding the indices and and i(int) gives the index in the i-th dimension |
|
Index with ltl::IndexList (rhs version). Return ltl::MArray<T,1> object. |
|
Assigns A bit more comlicated since we have to discriminate between A = 3; and A = 1, 2, 3, 4; |
|
Index with ltl::IndexList (lhs version). Assignment to self indexed with IndexList A[l] = Expr<T,1> IndexRef object is needed to carry the operator=( Expr ) method. |
|
Reallocate memory. Data are abolished. If you have map == true and give a filename the new memory map will be saved. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Holds shape information. And zeroOffset_ which is the distance between data_ and the the address of the first element of the array, such that always holds. |