LTL
2.0.x
|
Inherits ltl::MArrayIterConst< T, N >.
Public Types | |
enum | { dims =N } |
These define constants that are used by the expression template engine. More... | |
enum | { numIndexIter = 0 } |
enum | { numConvolution = 0 } |
enum | { isVectorizable = 1 } |
typedef std::forward_iterator_tag | iterator_category |
std::iterator typedefs More... | |
typedef int | difference_type |
typedef MArray< T, N >::value_type | value_type |
typedef MArray< T, N > ::const_reference | const_reference |
typedef MArray< T, N > ::const_pointer | const_pointer |
typedef MArray< T, N >::reference | reference |
typedef MArray< T, N >::pointer | pointer |
Public Member Functions | |
MArrayIter (MArray< T, N > &array) | |
MArrayIter (MArray< T, N > &array, const _iter_end_tag &E) | |
MArrayIter (const MArrayIter< T, N > &other) | |
MArrayIter< T, N > & | operator++ () |
Move the iterator to the next object. More... | |
T & | operator* () |
Dereference the iterator object. Return the element pointed to. More... | |
void | reset () |
Reset the iterator back to the first element. More... | |
value_type | operator* () const |
Dereference the iterator object. Return the element pointed to. More... | |
void | operator++ (int) |
Postfix operator++() . More... | |
bool | operator== (const MArrayIterConst< T, N > &other) const |
true if iterators share the same data pointer More... | |
bool | operator!= (const MArrayIterConst< T, N > &other) const |
true if iterators do not share the same data pointer More... | |
bool | done () const |
True if we point past the end, i.e. we are equal to the end iterator. More... | |
bool | isConformable (const Shape< N > &other) const |
true if we have the same array geometry as that of other , More... | |
void | printRanges () const |
Pretty print the geometry. More... | |
const Shape< N > * | shape () const |
Return our shape . More... | |
bool | isStorageContiguous () const |
true if the memory we are pointing to has contiguous memory layout. More... | |
bool | isStride1 () const |
true if our innermost stride is 1 More... | |
value_type * | data () const |
Return the current data pointer. More... | |
void | advance () |
Provide separate versions of advance() for incrementing the innermost. More... | |
void | advance (int n) |
Unconditionally increase the data pointer by N innermost strides. More... | |
void | advance (int n, int dim) |
Unconditionally increase the data pointer by N along dimension dim (used for partial reductions). More... | |
void | advanceWithStride1 () |
Unconditionally increase the data pointer by one. More... | |
bool | needAdvanceDim () const |
Check if we have reached the end of the innermost dimension. More... | |
void | advanceDim () |
Advance the iterator past the end of one "line" (the end of the innermost dimension). More... | |
void | advanceDim (const int cutDim) |
Advance the iterator past the end of one "line", ignoring the dimension cutDim (used in partial reductions). More... | |
value_type | readWithoutStride (const int i) const |
Read the data value at the current location + i (optimized for stride 1). More... | |
value_type | readWithStride (const int i) const |
Read the current data value at the current location + i*stride. More... | |
value_type | readWithStride (const int i, const int dim) const |
Read the data value at position i along dimension dim (used in partial reductions) More... | |
value_type | readAtOffsetDim (const int i, const int dim) const |
Read the data value at offset i along dim dim (used in convolutions) More... | |
value_type | readAtOffset (const int i) const |
Read the data value at offset i along dim 1 (used in convolutions) More... | |
value_type | readAtOffset (const int i, const int j) const |
Read the data value at offset i along dim 1 and j along dim 2 (used in convolutions) More... | |
value_type | readAtOffset (const int i, const int j, const int k) const |
Read the data value at offset i along dim 1, j along dim 2, and k along dim 3 (used in convolutions) More... | |
int | boundary_l (const int dim) const |
leave boundary around the lower edges of the array (for convolutions) More... | |
int | boundary_u (const int dim) const |
leave boundary around the upper edges of the array (for convolutions) More... | |
Protected Attributes | |
value_type *restrict_ | data_ |
const MArray< T, N > * | array_ |
value_type * | stack_ [N] |
value_type * | last_ [N] |
int | strides_ [N] |
int | length_ [N] |
const int | stride_ |
Non-const iterator object for ltl::MArrays. Conforms to std::forward_iterator. The non-const version is implemented below by inheriting from ltl::ConstIterator.
|
inline |
|
inline |
|
inline |
|
inline |
Move the iterator to the next object.
References ltl::MArrayIterConst< 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().
|
inherited |
Reset the iterator back to the first element.
|
inlineinherited |
Dereference the iterator object. Return the element pointed to.
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::done().
|
inlineinherited |
Postfix operator++()
.
|
inlineinherited |
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.
Referenced by ltl::MArrayIterConst< T, N >::operator++().
|
inlineinherited |
Unconditionally increase the data pointer by N innermost strides.
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::stride_.
|
inlineinherited |
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_.
|
inlineinherited |
Unconditionally increase the data pointer by one.
References ltl::MArrayIterConst< T, N >::data_.
|
inlineinherited |
Check if we have reached the end of the innermost dimension.
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::last_.
|
inherited |
Advance the iterator past the end of one "line" (the end of the innermost dimension).
Referenced by ltl::MArrayIterConst< T, N >::operator++().
|
inherited |
Advance the iterator past the end of one "line", ignoring the dimension cutDim (used in partial reductions).
|
inlineinherited |
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.
|
inlineinherited |
Read the current data value at the current location + i*stride.
References ltl::MArrayIterConst< T, N >::data_, and ltl::MArrayIterConst< T, N >::stride_.
|
inlineinherited |
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_.
|
inlineinherited |
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_.
|
inlineinherited |
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_.
|
inlineinherited |
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_.
|
inlineinherited |
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_.
|
inlineinherited |
leave boundary around the lower edges of the array (for convolutions)
|
inlineinherited |
leave boundary around the upper edges of the array (for convolutions)
|
inlineinherited |
true
if iterators share the same data pointer
References ltl::MArrayIterConst< T, N >::data_.
|
inlineinherited |
true
if iterators do not share the same data pointer
References ltl::MArrayIterConst< T, N >::data_.
|
inlineinherited |
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::MArrayIterConst< T, N >::operator*(), ltl::MArrayIter< T, N >::operator*(), ltl::MArrayIterConst< T, N >::operator++(), and ltl::MArray< T, N >::operator>>().
|
inlineinherited |
true
if we have the same array geometry as that of other
,
References ltl::MArrayIterConst< T, N >::shape().
|
inherited |
Pretty print the geometry.
|
inlineinherited |
Return our shape
.
References ltl::MArrayIterConst< T, N >::array_.
Referenced by ltl::MArrayIterConst< T, N >::isConformable(), and ltl::MArrayIterConst< T, N >::isStorageContiguous().
|
inlineinherited |
true
if the memory we are pointing to has contiguous memory layout.
References ltl::MArrayIterConst< T, N >::shape().
|
inlineinherited |
true
if our innermost stride is 1
References ltl::MArrayIterConst< T, N >::stride_.
|
inlineinherited |
Return the current data pointer.
References ltl::MArrayIterConst< T, N >::data_.
|
protectedinherited |
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::MArrayIterConst< T, N >::operator*(), ltl::MArrayIter< T, N >::operator*(), ltl::MArrayIterConst< T, N >::operator++(), ltl::MArrayIterConst< T, N >::operator==(), ltl::MArrayIterConst< T, N >::readAtOffset(), ltl::MArrayIterConst< T, N >::readAtOffsetDim(), and ltl::MArrayIterConst< T, N >::readWithStride().
|
protectedinherited |
Referenced by ltl::MArrayIterConst< T, N >::shape().
|
protectedinherited |
Referenced by ltl::MArrayIterConst< T, N >::MArrayIterConst().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Referenced by ltl::MArrayIterConst< T, N >::MArrayIterConst().
|
protectedinherited |