1 #ifndef NPSTAT_ARRAYNDSCANNER_HH_ 2 #define NPSTAT_ARRAYNDSCANNER_HH_ 45 {
initialize(shape.empty() ?
static_cast<unsigned*
>(0) :
46 &shape[0], shape.size());}
50 inline unsigned dim()
const {
return dim_;}
62 void getIndex(
unsigned*
index,
unsigned indexBufferLen)
const;
81 void initialize(
const unsigned* shape,
unsigned lenShape);
83 unsigned long strides_[CHAR_BIT*
sizeof(
unsigned long)];
90 #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