ONE - On-device Neural Engine
|
#include <MemoryManager.h>
Public Member Functions | |
MemoryManager () | |
MemoryManager (const std::string) | |
virtual | ~MemoryManager ()=default |
void | allocate (void) |
uint8_t * | getBuffer (const ir::OperandIndex &ind) const |
void | deallocate (void) |
void | claimPlan (const ir::OperandIndex &ind, uint32_t size) |
void | releasePlan (const ir::OperandIndex &ind) |
Protected Attributes | |
std::unordered_map< ir::OperandIndex, Block > | _tensor_mem_map |
std::shared_ptr< IMemoryPlanner< ir::OperandIndex > > | _mem_planner |
std::shared_ptr< Allocator > | _mem_alloc |
Definition at line 34 of file MemoryManager.h.
onert::backend::basic::MemoryManager::MemoryManager | ( | ) |
Definition at line 32 of file MemoryManager.cc.
onert::backend::basic::MemoryManager::MemoryManager | ( | const std::string | planner_id | ) |
Definition at line 37 of file MemoryManager.cc.
|
virtualdefault |
References getBuffer().
void onert::backend::basic::MemoryManager::allocate | ( | void | ) |
Definition at line 62 of file MemoryManager.cc.
References _mem_alloc, and _mem_planner.
void onert::backend::basic::MemoryManager::claimPlan | ( | const ir::OperandIndex & | ind, |
uint32_t | size | ||
) |
Definition at line 55 of file MemoryManager.cc.
References _mem_planner, onert::backend::basic::IMemoryPlanner< Index >::claim(), and size.
|
inline |
uint8_t * onert::backend::basic::MemoryManager::getBuffer | ( | const ir::OperandIndex & | ind | ) | const |
Definition at line 68 of file MemoryManager.cc.
References _mem_alloc, and _mem_planner.
Referenced by ~MemoryManager().
void onert::backend::basic::MemoryManager::releasePlan | ( | const ir::OperandIndex & | ind | ) |
Definition at line 60 of file MemoryManager.cc.
References _mem_planner.
|
protected |
Definition at line 55 of file MemoryManager.h.
Referenced by onert::backend::train::TrainableMemoryManager::allocate(), allocate(), deallocate(), and getBuffer().
|
protected |
Definition at line 54 of file MemoryManager.h.
Referenced by onert::backend::train::TrainableMemoryManager::allocate(), allocate(), claimPlan(), getBuffer(), onert::backend::train::TrainableMemoryManager::getOptVarBuffer(), and releasePlan().
|
protected |
Definition at line 53 of file MemoryManager.h.