25 const uint32_t rank = shape.
rank();
26 assert(cursor < rank);
27 return rank - cursor - 1;
41 const uint32_t rank = _shape.
rank();
45 for (uint32_t axis = 0; axis < rank; ++axis)
51 for (_cursor = 0; _cursor < rank; ++_cursor)
53 const auto axis =
axis_of(_shape, _cursor);
55 if (_index.
at(axis) < _shape.
dim(axis))
64 const uint32_t rank = _shape.
rank();
67 while (_cursor < rank)
69 const auto axis =
axis_of(_shape, _cursor);
71 if ((_index.
at(axis)) + 1 < _shape.
dim(axis))
87 for (uint32_t pos = 0; pos < _cursor; ++pos)
89 const auto axis =
axis_of(_shape, pos);
IndexEnumerator(const Shape &shape)
Index & resize(uint32_t size)
uint32_t & at(uint32_t axis)
uint32_t & dim(uint32_t axis)
uint32_t rank(void) const
uint32_t axis_of(const Shape &shape, uint32_t cursor)