ONE - On-device Neural Engine
|
Generic Kernel Layout. More...
#include <KernelLayouts.h>
Public Member Functions | |
const KernelLayout::ID * | id (void) const override |
Return the identifier of each layout. | |
const nncc::core::ADT::kernel::Shape & | shape (void) const override |
ElemID & | at (uint32_t n, uint32_t ch, uint32_t row, uint32_t col) |
ElemID | at (uint32_t n, uint32_t ch, uint32_t row, uint32_t col) const override |
void | reorder (const nncc::core::ADT::kernel::Layout &l) |
template<typename LayoutImpl > | |
void | reorder (void) |
Public Member Functions inherited from coco::KernelLayout | |
virtual | ~KernelLayout ()=default |
Static Public Member Functions | |
static const KernelLayout::ID * | uid (void) |
static std::unique_ptr< Generic > | create (const nncc::core::ADT::kernel::Shape &shape) |
Generic Kernel Layout.
Definition at line 87 of file KernelLayouts.h.
ElemID & coco::KernelLayouts::Generic::at | ( | uint32_t | n, |
uint32_t | ch, | ||
uint32_t | row, | ||
uint32_t | col | ||
) |
|
overridevirtual |
Implements coco::KernelLayout.
Definition at line 127 of file KernelLayouts.cpp.
|
static |
Definition at line 149 of file KernelLayouts.cpp.
References shape().
Referenced by coco::KernelObject::KernelObject().
|
inlineoverridevirtual |
Return the identifier of each layout.
REQUIRED
Given l1 and l2 of KernelLayout * type, typeid(*l1) == typeif(*l2) SHOULD hold if l1->id() == l2->id() holds.
Implements coco::KernelLayout.
Definition at line 94 of file KernelLayouts.h.
References uid().
Referenced by uid().
void coco::KernelLayouts::Generic::reorder | ( | const nncc::core::ADT::kernel::Layout & | l | ) |
Definition at line 132 of file KernelLayouts.cpp.
References at(), nncc::core::ADT::kernel::Shape::count(), nncc::core::ADT::kernel::Shape::depth(), nncc::core::ADT::kernel::Shape::height(), shape(), and nncc::core::ADT::kernel::Shape::width().
|
inline |
Definition at line 102 of file KernelLayouts.h.
References reorder().
Referenced by reorder().
|
inlineoverridevirtual |
Implements coco::KernelLayout.
Definition at line 96 of file KernelLayouts.h.
Referenced by RandomDataGenerator.RandomDataGenerator::_gen_float32(), RandomDataGenerator.RandomDataGenerator::_gen_int16(), RandomDataGenerator.RandomDataGenerator::_gen_uint8(), create(), and reorder().
|
static |
Definition at line 113 of file KernelLayouts.cpp.
References id().
Referenced by id().