Skip to content

bulk::util::flatten

template <int D>
int flatten(index<D> volume, index<D> idxs);

Flatten a multi-index in a D-dimensional volume.

Template parameters

  • D - the dimension of the index space

Parameters

  • volume - the size of the volume
  • idxs - the multi-index