23#ifndef __NNFW_MISC_FEATURE_INDEX_ITERATOR_H__
24#define __NNFW_MISC_FEATURE_INDEX_ITERATOR_H__
58 for (int32_t batch = 0; batch < _shape.
N; ++batch)
60 for (int32_t ch = 0; ch < _shape.
C; ++ch)
62 for (int32_t row = 0; row < _shape.
H; ++row)
64 for (int32_t col = 0; col < _shape.
W; ++col)
66 cb(batch, ch, row, col);
87static inline IndexIterator iterate(
const Shape &shape) {
return IndexIterator{shape}; }
Class to iterate Callable with Index of feature.
IndexIterator(const Shape &shape)
Construct IndexIterator object with Shape of feature.
IndexIterator & iter(Callable cb)
Call a function iterated.
IndexIterator & operator<<(IndexIterator &&it, Callable cb)
Call a function iterated using IndexIterator of feature Overloaded operator<<.
This file contains Shape class for feature.
Structure to have values of dimensions for feature.