1 #ifndef NPSTAT_ARRAYNDSCANNER_HH_ 2 #define NPSTAT_ARRAYNDSCANNER_HH_ 43 initialize(shape.empty() ?
static_cast<unsigned*
>(
nullptr) : &shape[0], shape.size());
48 inline unsigned dim()
const {
return dim_; }
60 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_ unsigned long maxState() const
ArrayNDScanner(const unsigned *shape, const unsigned lenShape)
void setState(const unsigned long state)
ArrayNDScanner & operator++()
void initialize(const unsigned *shape, unsigned lenShape)
ArrayNDScanner(const std::vector< unsigned > &shape)
unsigned long strides_[CHAR_BIT *sizeof(unsigned long)]
void getIndex(unsigned *index, unsigned indexBufferLen) const
unsigned long state() const