AFF --- A container for numbers (array) by Friederich and Forbriger.

◆ StridedStepper()

aff::util::StridedStepper::StridedStepper ( const Strided strided)

only non-copy constructor

initialize

Definition at line 52 of file stridedstepper.cc.

References Mcarry, aff::Strided::Mmax_dimen, aff::Strided::size(), and aff::Strided::stride().

52  :
53  Mshape(strided), Mcurrent(strided.first_offset()),
54  Mindex(strided.first()), Mcarry(0), Mvalid(true),
55  Mfirst_offset(strided.first_offset()),
56  Mlast_offset(strided.last_offset())
57  {
58  // calculate Mcarry
59  for (Tsubscript i=0; i<(Tshape::Mmax_dimen); i++)
60  { Mcarry[i]=strided.size(i)*strided.stride(i); }
61  }
Tsubscript Mfirst_offset
store current bounds to reduce execution time
Tsubscript Mcurrent
hold current position offset to memory
static const Tdim Mmax_dimen
instantiate static member (otherwise the linker won&#39;t find it)
Definition: strided.h:123
TIndexVec Mindex
hold current index vector
Tsize size() const
size of array
Definition: simplearray.h:164
TSizeVec Mcarry
hold carry values
ptrdiff_t Tsubscript
Type to hold an array&#39;s subscript value.
Definition: types.h:53
const Tshape & Mshape
hold reference to shape
Here is the call graph for this function: