|
ONE - On-device Neural Engine
|
Generic element transfer. More...
#include <Instrs.h>

Public Member Functions | |
| Shuffle () | |
| Shuffle * | asShuffle (void) override |
| const Shuffle * | asShuffle (void) const override |
| Instr * | loc (void) override |
| Bag * | from (void) const |
| void | from (Bag *bag) |
| Bag * | into (void) const |
| void | into (Bag *) |
| uint32_t | size (void) const |
| Return the number of Element-wise transfers. | |
| std::set< ElemID > | range (void) const |
| Return a set of elements in the destination bag that Shuffle will update. | |
| bool | defined (const ElemID &dst) const |
| Return true if a given elem is updated after execution. | |
| const ElemID & | at (const ElemID &dst) const |
| void | insert (const ElemID &from, const ElemID &into) |
Public Member Functions inherited from coco::Instr | |
| Instr ()=default | |
| Instr (const Instr &)=delete | |
| Instr (Instr &&)=delete | |
| virtual | ~Instr () |
| template<typename T > | |
| T | accept (IVisitor< T > *v) const |
| template<typename T > | |
| T | accept (IVisitor< T > &v) const |
| template<typename T > | |
| T | accept (IVisitor< T > &&v) const |
| const InstrIndex & | index (void) const |
Public Member Functions inherited from coco::DLinkedList< Child, Parent >::Node | |
| Node () | |
| virtual | ~Node () |
| Parent * | parent (void) const |
| Child * | prev (void) const |
| Child * | next (void) const |
| void | insertBefore (Node *next) |
| void | insertAfter (Node *prev) |
| void | detach (void) |
Public Member Functions inherited from coco::Entity | |
| virtual | ~Entity ()=default |
| Module * | module (void) const |
Public Member Functions inherited from coco::Bag::Reader | |
| virtual | ~Reader ()=default |
Public Member Functions inherited from coco::Locatable | |
| virtual | ~Locatable ()=default |
Public Member Functions inherited from coco::Bag::Updater | |
| virtual | ~Updater ()=default |
|
inline |
|
inlineoverride |
|
inlineoverride |
Let M be the return of at(N). This means that N-th element in the destination bag will be filled with the value of M-th element in the source bag.
NOTE at(n) may be undefined on partial shuffle
Definition at line 160 of file Instrs.h.
Referenced by enco::hoist_object().
|
inline |
| void coco::Shuffle::from | ( | Bag * | bag | ) |
|
inline |
Definition at line 131 of file Instrs.h.
References coco::Read::bag().
Referenced by enco::generate_bypass_shuffle(), enco::hoist_object(), insert(), enco::lower_copy(), and InstrPrinter::visit().
Definition at line 36 of file Shuffle.cpp.
| void coco::Shuffle::into | ( | Bag * | b | ) |
|
inline |
Definition at line 135 of file Instrs.h.
References coco::Update::bag().
Referenced by enco::hoist_object(), insert(), and InstrPrinter::visit().
|
inlineoverridevirtual |
| std::set< ElemID > coco::Shuffle::range | ( | void | ) | const |
Return a set of elements in the destination bag that Shuffle will update.
Definition at line 24 of file Shuffle.cpp.
| uint32_t coco::Shuffle::size | ( | void | ) | const |
Return the number of Element-wise transfers.
NOTE size() SHOULD BE identical to range().size()
Definition at line 22 of file Shuffle.cpp.
Referenced by tflimport::ReshapeGraphBuilder::build().