20.11
|
#include <RefTensorHandle.hpp>
Public Member Functions | |
RefTensorHandle (const TensorInfo &tensorInfo, std::shared_ptr< RefMemoryManager > &memoryManager) | |
RefTensorHandle (const TensorInfo &tensorInfo, MemorySourceFlags importFlags) | |
~RefTensorHandle () | |
virtual void | Manage () override |
Indicate to the memory manager that this resource is active. More... | |
virtual void | Allocate () override |
Indicate to the memory manager that this resource is no longer active. More... | |
virtual ITensorHandle * | GetParent () const override |
Get the parent tensor if this is a subtensor. More... | |
virtual const void * | Map (bool) const override |
Map the tensor data for access. More... | |
virtual void | Unmap () const override |
Unmap the tensor data. More... | |
TensorShape | GetStrides () const override |
Get the strides for each dimension ordered from largest to smallest where the smallest value is the same as the size of a single element in the tensor. More... | |
TensorShape | GetShape () const override |
Get the number of elements for each dimension ordered from slowest iterating dimension to fastest iterating dimension. More... | |
const TensorInfo & | GetTensorInfo () const |
virtual MemorySourceFlags | GetImportFlags () const override |
Get flags describing supported import sources. More... | |
virtual bool | Import (void *memory, MemorySource source) override |
Import externally allocated memory. More... | |
![]() | |
virtual | ~ITensorHandle () |
void * | Map (bool blocking=true) |
Map the tensor data for access. More... | |
void | Unmap () |
Unmap the tensor data that was previously mapped with call to Map(). More... | |
Definition at line 15 of file RefTensorHandle.hpp.
RefTensorHandle | ( | const TensorInfo & | tensorInfo, |
std::shared_ptr< RefMemoryManager > & | memoryManager | ||
) |
RefTensorHandle | ( | const TensorInfo & | tensorInfo, |
MemorySourceFlags | importFlags | ||
) |
Definition at line 22 of file RefTensorHandle.cpp.
~RefTensorHandle | ( | ) |
Definition at line 34 of file RefTensorHandle.cpp.
|
overridevirtual |
Indicate to the memory manager that this resource is no longer active.
This is used to compute overlapping lifetimes of resources.
Implements ITensorHandle.
Definition at line 57 of file RefTensorHandle.cpp.
References TensorInfo::GetNumBytes().
|
inlineoverridevirtual |
Get flags describing supported import sources.
Reimplemented from ITensorHandle.
Definition at line 54 of file RefTensorHandle.hpp.
References RefTensorHandle::Import(), and RefTensorHandle::RefTensorHandle().
|
inlineoverridevirtual |
Get the parent tensor if this is a subtensor.
Implements ITensorHandle.
Definition at line 28 of file RefTensorHandle.hpp.
References RefTensorHandle::Map(), and ITensorHandle::Map().
|
inlineoverridevirtual |
Get the number of elements for each dimension ordered from slowest iterating dimension to fastest iterating dimension.
Implements ITensorHandle.
Definition at line 44 of file RefTensorHandle.hpp.
References TensorInfo::GetShape().
|
inlineoverridevirtual |
Get the strides for each dimension ordered from largest to smallest where the smallest value is the same as the size of a single element in the tensor.
Implements ITensorHandle.
Definition at line 39 of file RefTensorHandle.hpp.
References armnn::GetUnpaddedTensorStrides().
|
inline |
Definition at line 49 of file RefTensorHandle.hpp.
Referenced by armnn::GetTensorInfo().
|
overridevirtual |
Import externally allocated memory.
memory | base address of the memory being imported. |
source | source of the allocation for the memory being imported. |
Reimplemented from ITensorHandle.
Definition at line 118 of file RefTensorHandle.cpp.
References armnn::Malloc.
Referenced by RefTensorHandle::GetImportFlags().
|
overridevirtual |
Indicate to the memory manager that this resource is active.
This is used to compute overlapping lifetimes of resources.
Implements ITensorHandle.
Definition at line 46 of file RefTensorHandle.cpp.
References ARMNN_ASSERT_MSG, and TensorInfo::GetNumBytes().
|
overridevirtual |
Map the tensor data for access.
blocking | hint to block the calling thread until all other accesses are complete. (backend dependent) |
Implements ITensorHandle.
Definition at line 83 of file RefTensorHandle.cpp.
References ARMNN_ASSERT, and TensorInfo::GetNumBytes().
Referenced by RefTensorHandle::GetParent().
|
inlineoverridevirtual |