20.11
|
#include <CpuTensorHandle.hpp>
Public Member Functions | |
ScopedCpuTensorHandle (const TensorInfo &tensorInfo) | |
ScopedCpuTensorHandle (const ConstTensor &tensor) | |
ScopedCpuTensorHandle (const ConstCpuTensorHandle &tensorHandle) | |
ScopedCpuTensorHandle (const ScopedCpuTensorHandle &other) | |
ScopedCpuTensorHandle & | operator= (const ScopedCpuTensorHandle &other) |
~ScopedCpuTensorHandle () | |
virtual void | Allocate () override |
Indicate to the memory manager that this resource is no longer active. More... | |
![]() | |
template<typename T > | |
T * | GetTensor () const |
template<> | |
void * | GetTensor () const |
template<> | |
void * | GetTensor () const |
![]() | |
template<typename T > | |
const T * | GetConstTensor () const |
const TensorInfo & | GetTensorInfo () const |
virtual void | Manage () override |
Indicate to the memory manager that this resource is 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... | |
template<> | |
const void * | GetConstTensor () const |
template<> | |
const void * | GetConstTensor () const |
![]() | |
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... | |
virtual unsigned int | GetImportFlags () const |
Get flags describing supported import sources. More... | |
virtual bool | Import (void *memory, MemorySource source) |
Import externally allocated memory. More... | |
Additional Inherited Members | |
![]() | |
CpuTensorHandle (const TensorInfo &tensorInfo) | |
void | SetMemory (void *mem) |
![]() | |
ConstCpuTensorHandle (const TensorInfo &tensorInfo) | |
void | SetConstMemory (const void *mem) |
Definition at line 106 of file CpuTensorHandle.hpp.
|
explicit |
Definition at line 55 of file CpuTensorHandle.cpp.
|
explicit |
Definition at line 60 of file CpuTensorHandle.cpp.
References BaseTensor< MemoryType >::GetMemoryArea(), and BaseTensor< MemoryType >::GetNumBytes().
|
explicit |
Definition at line 66 of file CpuTensorHandle.cpp.
References ConstCpuTensorHandle::GetConstTensor(), TensorInfo::GetNumBytes(), and ConstCpuTensorHandle::GetTensorInfo().
ScopedCpuTensorHandle | ( | const ScopedCpuTensorHandle & | other | ) |
Definition at line 72 of file CpuTensorHandle.cpp.
Definition at line 86 of file CpuTensorHandle.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 91 of file CpuTensorHandle.cpp.
References ARMNN_ASSERT, TensorInfo::GetNumBytes(), CpuTensorHandle::GetTensor(), ConstCpuTensorHandle::GetTensorInfo(), and CpuTensorHandle::SetMemory().
ScopedCpuTensorHandle & operator= | ( | const ScopedCpuTensorHandle & | other | ) |