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

◆ calculate_base()

void aff::Strided::calculate_base ( const Tsubscript offset)
private

construct do given first and last index

Definition at line 128 of file strided.cc.

References Mbase, Mfirst, Mmax_dimen, Mstride, and offset().

Referenced by collapse(), setup_from_size(), shift(), shrink(), and Strided().

129  {
130  Mbase[0]=offset-Mfirst[0]*Mstride[0];
131  for (Tdim i=1; i<Mmax_dimen; i++)
132  {
133  Mbase[i]=Mbase[i-1]-Mfirst[i]*Mstride[i];
134  }
135  }
TIndexVec Mbase
Definition: strided.h:289
static const Tdim Mmax_dimen
instantiate static member (otherwise the linker won&#39;t find it)
Definition: strided.h:123
TSizeVec Mstride
Definition: strided.h:286
unsigned short int Tdim
Type to hold an array dimensionality.
Definition: types.h:49
TIndexVec Mfirst
Definition: strided.h:287
Tsubscript offset(const TIndexVec &index) const
full dimensionality access
Definition: strided.h:220
Here is the call graph for this function:
Here is the caller graph for this function: