Inherits ltl::MArrayIterConst< T, N >.
These define constants that are used by the expression template engine.
More...operator++()
. Non-const iterator object for ltl::MArrays. Conforms to std::forward_iterator. The non-const version is implemented below by inheriting from ltl::ConstIterator.
ltl::MArrayIter< T, N >::MArrayIter | ( | MArray< T, N > & | array | ) | [inline] |
ltl::MArrayIter< T, N >::MArrayIter | ( | MArray< T, N > & | array, | |
const _iter_end_tag & | E | |||
) | [inline] |
ltl::MArrayIter< T, N >::MArrayIter | ( | const MArrayIter< T, N > & | other | ) | [inline] |
MArrayIter<T,N>& ltl::MArrayIter< T, N >::operator++ | ( | ) | [inline] |
Move the iterator to the next object.
Reimplemented from ltl::MArrayIterConst< T, N >.
T& ltl::MArrayIter< T, N >::operator* | ( | ) | [inline] |
Dereference the iterator object. Return the element pointed to.
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::done().
void ltl::MArrayIterConst< T, N >::reset | ( | ) | [inherited] |
Reset the iterator back to the first element.
value_type ltl::MArrayIterConst< T, N >::operator* | ( | ) | const [inline, inherited] |
Dereference the iterator object. Return the element pointed to.
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::done().
void ltl::MArrayIterConst< T, N >::operator++ | ( | int | ) | [inline, inherited] |
Postfix operator++()
.
void ltl::MArrayIterConst< T, N >::advance | ( | ) | [inline, inherited] |
Provide separate versions of advance() for incrementing the innermost.
When evaluating an expression involving more than one iterator all terms MUST have the same geometry, the loop structures are identical. It's therefore sufficient to check the end of loop condition and the end of one dimension on one of the iterators ... All others are then 'remote controlled' via these methods methods. See implementation of evaluation methods in ltl/marray/eval.h. Unconditionally increase the data pointer by one innermost stride.
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::stride_.
Referenced by ltl::MArrayIterConst< T, N >::operator++().
void ltl::MArrayIterConst< T, N >::advance | ( | int | n | ) | [inline, inherited] |
Unconditionally increase the data pointer by N innermost strides.
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::stride_.
void ltl::MArrayIterConst< T, N >::advance | ( | int | n, | |
int | dim | |||
) | [inline, inherited] |
Unconditionally increase the data pointer by N along dimension dim (used for partial reductions).
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::strides_.
void ltl::MArrayIterConst< T, N >::advanceWithStride1 | ( | ) | [inline, inherited] |
Unconditionally increase the data pointer by one.
References ltl::MArrayIterConst< T, N >::data_.
bool ltl::MArrayIterConst< T, N >::needAdvanceDim | ( | ) | const [inline, inherited] |
Check if we have reached the end of the innermost dimension.
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::last_.
void ltl::MArrayIterConst< T, N >::advanceDim | ( | ) | [inherited] |
Advance the iterator past the end of one "line" (the end of the innermost dimension).
Referenced by ltl::MArrayIterConst< T, N >::operator++().
void ltl::MArrayIterConst< T, N >::advanceDim | ( | const int | cutDim | ) | [inherited] |
Advance the iterator past the end of one "line", ignoring the dimension cutDim (used in partial reductions).
value_type ltl::MArrayIterConst< T, N >::readWithoutStride | ( | const int | i | ) | const [inline, inherited] |
Read the data value at the current location + i (optimized for stride 1).
These methods are for implementing loop unrolling and vectorization for the efficient evaluation of expression templates.
References ltl::MArrayIterConst< T, N >::data_.
value_type ltl::MArrayIterConst< T, N >::readWithStride | ( | const int | i | ) | const [inline, inherited] |
Read the current data value at the current location + i*stride.
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::stride_.
value_type ltl::MArrayIterConst< T, N >::readWithStride | ( | const int | i, | |
const int | dim | |||
) | const [inline, inherited] |
Read the data value at position i along dimension dim (used in partial reductions).
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::strides_.
value_type ltl::MArrayIterConst< T, N >::readAtOffsetDim | ( | const int | i, | |
const int | dim | |||
) | const [inline, inherited] |
Read the data value at offset i along dim dim (used in convolutions).
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::strides_.
value_type ltl::MArrayIterConst< T, N >::readAtOffset | ( | const int | i | ) | const [inline, inherited] |
Read the data value at offset i along dim 1 (used in convolutions).
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::stride_.
value_type ltl::MArrayIterConst< T, N >::readAtOffset | ( | const int | i, | |
const int | j | |||
) | const [inline, inherited] |
Read the data value at offset i along dim 1 and j along dim 2 (used in convolutions).
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::strides_.
value_type ltl::MArrayIterConst< T, N >::readAtOffset | ( | const int | i, | |
const int | j, | |||
const int | k | |||
) | const [inline, inherited] |
Read the data value at offset i along dim 1, j along dim 2, and k along dim 3 (used in convolutions).
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::strides_.
int ltl::MArrayIterConst< T, N >::boundary_l | ( | const int | dim | ) | const [inline, inherited] |
leave boundary around the lower edges of the array (for convolutions)
int ltl::MArrayIterConst< T, N >::boundary_u | ( | const int | dim | ) | const [inline, inherited] |
leave boundary around the upper edges of the array (for convolutions)
bool ltl::MArrayIterConst< T, N >::operator== | ( | const MArrayIterConst< T, N > & | other | ) | const [inline, inherited] |
true
if iterators share the same data pointer
References ltl::MArrayIterConst< T, N >::data_.
bool ltl::MArrayIterConst< T, N >::operator!= | ( | const MArrayIterConst< T, N > & | other | ) | const [inline, inherited] |
true
if iterators do not share the same data pointer
References ltl::MArrayIterConst< T, N >::data_.
bool ltl::MArrayIterConst< T, N >::done | ( | ) | const [inline, inherited] |
True if we point past the end, i.e. we are equal to the end iterator.
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::last_.
Referenced by ltl::average_clip_median(), ltl::PolynomFit< TPAR, TDAT, ORDER, EXT, 1 >::eval(), ltl::PolynomFit< TPAR, TDAT, ORDER, EXT, 1 >::fill(), ltl::median_clip_average(), ltl::MArrayIter< T, N >::operator*(), ltl::MArrayIterConst< T, N >::operator*(), ltl::MArrayIterConst< T, N >::operator++(), and ltl::MArray< T, N >::operator>>().
bool ltl::MArrayIterConst< T, N >::isConformable | ( | const Shape< N > & | other | ) | const [inline, inherited] |
true
if we have the same array geometry as that of other
,
References ltl::MArrayIterConst< T, N >::shape().
void ltl::MArrayIterConst< T, N >::printRanges | ( | ) | const [inherited] |
Pretty print the geometry.
const Shape<N>* ltl::MArrayIterConst< T, N >::shape | ( | ) | const [inline, inherited] |
Return our shape
.
References ltl::MArrayIterConst< T, N >::array_.
Referenced by ltl::MArrayIterConst< T, N >::isConformable(), and ltl::MArrayIterConst< T, N >::isStorageContiguous().
bool ltl::MArrayIterConst< T, N >::isStorageContiguous | ( | ) | const [inline, inherited] |
true
if the memory we are pointing to has contiguous memory layout.
References ltl::MArrayIterConst< T, N >::shape().
bool ltl::MArrayIterConst< T, N >::isStride1 | ( | ) | const [inline, inherited] |
true
if our innermost stride is 1
References ltl::MArrayIterConst< T, N >::stride_.
value_type* ltl::MArrayIterConst< T, N >::data | ( | ) | const [inline, inherited] |
Return the current data pointer.
References ltl::MArrayIterConst< T, N >::data_.
value_type* restrict_ ltl::MArrayIterConst< T, N >::data_ [protected, inherited] |
Referenced by ltl::MArrayIterConst< T, N >::advance(), ltl::MArrayIterConst< T, N >::advanceWithStride1(), ltl::MArrayIterConst< T, N >::data(), ltl::MArrayIterConst< T, N >::done(), ltl::MArrayIterConst< T, N >::MArrayIterConst(), ltl::MArrayIterConst< T, N >::needAdvanceDim(), ltl::MArrayIterConst< T, N >::operator!=(), ltl::MArrayIter< T, N >::operator*(), ltl::MArrayIterConst< T, N >::operator*(), ltl::MArrayIterConst< T, N >::operator++(), ltl::MArrayIterConst< T, N >::operator==(), ltl::MArrayIterConst< T, N >::readAtOffset(), ltl::MArrayIterConst< T, N >::readAtOffsetDim(), ltl::MArrayIterConst< T, N >::readWithoutStride(), and ltl::MArrayIterConst< T, N >::readWithStride().
const MArray<T,N>* ltl::MArrayIterConst< T, N >::array_ [protected, inherited] |
Referenced by ltl::MArrayIterConst< T, N >::shape().
value_type* ltl::MArrayIterConst< T, N >::stack_[N] [protected, inherited] |
Referenced by ltl::MArrayIterConst< T, N >::MArrayIterConst().
value_type * ltl::MArrayIterConst< T, N >::last_[N] [protected, inherited] |
int ltl::MArrayIterConst< T, N >::strides_[N] [protected, inherited] |
int ltl::MArrayIterConst< T, N >::length_[N] [protected, inherited] |
Referenced by ltl::MArrayIterConst< T, N >::MArrayIterConst().
const int ltl::MArrayIterConst< T, N >::stride_ [protected, inherited] |