8 const unsigned* shape,
const unsigned lenShape)
11 if (lenShape == 0
U || lenShape >= CHAR_BIT*
sizeof(
unsigned long))
13 "In npstat::ArrayNDScanner::initialize: invalid scan shape");
15 for (
unsigned j=0; j<lenShape; ++j)
17 "In npstat::ArrayNDScanner::initialize: " 18 "number of scans must be positive in each dimension");
24 for (
unsigned j=
dim_ - 1; j>0; --j)
30 unsigned* ix,
const unsigned indexBufferLen)
const 33 "In npstat::ArrayNDScanner::getIndex: " 34 "insufficient length of the output buffer");
36 "In npstat::ArrayNDScanner::getIndex: invalid scanner state");
43 ix[
i] =
static_cast<unsigned>(
idx);
void initialize(const unsigned *shape, unsigned lenShape)
Exceptions for the npstat namespace.
unsigned long strides_[CHAR_BIT *sizeof(unsigned long)]
void getIndex(unsigned *index, unsigned indexBufferLen) const
Iteration over indices of a multidimensional array.