ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::backend::basic::DynamicTensorManager Class Reference

Class to manage dynamic tensor and its memory. More...

#include <DynamicTensorManager.h>

Public Member Functions

 DynamicTensorManager (const std::shared_ptr< TensorRegistry > &reg)
 
virtual ~DynamicTensorManager ()=default
 
void buildTensor (const ir::OperandIndex &ind, const ir::OperandInfo &tensor_info)
 
std::shared_ptr< DynamicMemoryManagerdynamic_mem_mgr ()
 

Detailed Description

Class to manage dynamic tensor and its memory.

Definition at line 41 of file DynamicTensorManager.h.

Constructor & Destructor Documentation

◆ DynamicTensorManager()

onert::backend::basic::DynamicTensorManager::DynamicTensorManager ( const std::shared_ptr< TensorRegistry > &  reg)

Definition at line 29 of file DynamicTensorManager.cc.

30 : _dynamic_mem_mgr{new DynamicMemoryManager()}, _tensors{reg}
31{
32 // DO NOTHING
33}

◆ ~DynamicTensorManager()

virtual onert::backend::basic::DynamicTensorManager::~DynamicTensorManager ( )
virtualdefault

Member Function Documentation

◆ buildTensor()

void onert::backend::basic::DynamicTensorManager::buildTensor ( const ir::OperandIndex ind,
const ir::OperandInfo tensor_info 
)

Definition at line 35 of file DynamicTensorManager.cc.

37{
38 assert(_tensors->getNativeTensor(ind) == nullptr);
39 auto tensor = std::make_unique<Tensor>(tensor_info, _dynamic_mem_mgr.get());
40 _tensors->setNativeTensor(ind, std::move(tensor));
41}

◆ dynamic_mem_mgr()

std::shared_ptr< DynamicMemoryManager > onert::backend::basic::DynamicTensorManager::dynamic_mem_mgr ( )
inline

Definition at line 50 of file DynamicTensorManager.h.

50{ return _dynamic_mem_mgr; }

Referenced by onert::backend::basic::StaticTensorManager::buildTensor().


The documentation for this class was generated from the following files: