ONE - On-device Neural Engine
|
Class to plan memory by firstfit way. More...
#include <MemoryPlanner.h>
Public Member Functions | |
void | claim (const ir::OperandIndex &, size_t) override |
Claim memory for operand by firstfit way. | |
void | release (const ir::OperandIndex &) override |
Release memory for operand by firstfit way. | |
uint32_t | capacity () override |
Get capacity for memory planning. | |
MemoryPlans & | memory_plans () override |
Get MemoryPlans. | |
Public Member Functions inherited from onert::backend::basic::IMemoryPlanner< ir::OperandIndex > | |
virtual | ~IMemoryPlanner ()=default |
Additional Inherited Members | |
Public Types inherited from onert::backend::basic::IMemoryPlanner< ir::OperandIndex > | |
using | MemoryPlans = std::unordered_map< ir::OperandIndex, Block > |
Class to plan memory by firstfit way.
Definition at line 77 of file MemoryPlanner.h.
|
inlineoverridevirtual |
Get capacity for memory planning.
Implements onert::backend::basic::IMemoryPlanner< ir::OperandIndex >.
Definition at line 95 of file MemoryPlanner.h.
|
overridevirtual |
Claim memory for operand by firstfit way.
[in] | index | The operand index |
[in] | size | The size of the memory |
Implements onert::backend::basic::IMemoryPlanner< ir::OperandIndex >.
Definition at line 57 of file MemoryPlanner.cc.
|
inlineoverridevirtual |
Get MemoryPlans.
Implements onert::backend::basic::IMemoryPlanner< ir::OperandIndex >.
Definition at line 100 of file MemoryPlanner.h.
|
overridevirtual |
Release memory for operand by firstfit way.
[in] | index | The operand index |
Implements onert::backend::basic::IMemoryPlanner< ir::OperandIndex >.
Definition at line 87 of file MemoryPlanner.cc.
References offset(), size, onert::util::Index< T, DummyTag >::value(), and VERBOSE.