23#ifndef __NNFW_MISC_KERNEL_INDEX_ITERATOR_H__
24#define __NNFW_MISC_KERNEL_INDEX_ITERATOR_H__
58 for (int32_t nth = 0; nth < _shape.
N; ++nth)
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(nth, ch, row, col);
Class to iterate Callable with Index of kernel.
IndexIterator & iter(Callable cb)
Call a function iterated.
IndexIterator(const Shape &shape)
Construct IndexIterator object with Shape of kernel.
IndexIterator iterate(const Shape &shape)
Create an object of IndexIterator for kernel.
IndexIterator & operator<<(IndexIterator &&it, Callable cb)
Call a function iterated using IndexIterator of kernel Overloaded operator<<.
This file contains Shape structure.