1 #ifndef NPSTAT_ARRAYNDSCANNER_HH_ 2 #define NPSTAT_ARRAYNDSCANNER_HH_ 43 initialize(shape.empty() ?
static_cast<unsigned*
>(
nullptr) : &shape[0], shape.size());
50 inline unsigned dim()
const {
return dim_; }
62 void getIndex(
unsigned*
index,
unsigned indexBufferLen)
const;
84 void initialize(
const unsigned* shape,
unsigned lenShape);
86 unsigned long strides_[CHAR_BIT *
sizeof(
unsigned long)];
93 #endif // NPSTAT_ARRAYSCANNER_HH_ ArrayNDScanner(const unsigned *shape, const unsigned lenShape)
void setState(const unsigned long state)
ArrayNDScanner & operator++()
void initialize(const unsigned *shape, unsigned lenShape)
unsigned long state() const
ArrayNDScanner(const std::vector< unsigned > &shape)
unsigned long strides_[CHAR_BIT *sizeof(unsigned long)]
unsigned long maxState() const
void getIndex(unsigned *index, unsigned indexBufferLen) const