17#ifndef __NNCC_CORE_ADT_KERNEL_OVERLAY_H__
18#define __NNCC_CORE_ADT_KERNEL_OVERLAY_H__
34template <
typename T,
typename InputIt>
class Overlay final :
public View<T>
38 : _impl{
shape, layout}, _it{it}
44 T
at(uint32_t nth, uint32_t ch, uint32_t row, uint32_t col)
const override
46 return _impl.at(_it, nth, ch, row, col);
50 T &
at(uint32_t nth, uint32_t ch, uint32_t row, uint32_t col)
override
52 return _impl.at(_it, nth, ch, row, col);
56 const Shape &
shape(
void)
const override {
return _impl.shape(); }
T at(uint32_t nth, uint32_t ch, uint32_t row, uint32_t col) const override
Overlay(const Shape &shape, const Layout &layout, InputIt it)
const Shape & shape(void) const override
T & at(uint32_t nth, uint32_t ch, uint32_t row, uint32_t col) override
Overlay< T, T * > make_overlay(const Shape &shape, T *base)
static Overlay< T, InputIt > make(const Shape &shape, InputIt it)