ArmNN
NotReleased
|
#include <ITensorHandle.hpp>
Public Member Functions | |
virtual | ~ITensorHandle () |
virtual void | Manage ()=0 |
virtual void | Allocate ()=0 |
virtual ITensorHandle * | GetParent () const =0 |
virtual const void * | Map (bool blocking=true) const =0 |
virtual void | Unmap () const =0 |
Unmap the tensor data. More... | |
void * | Map (bool blocking=true) |
void | Unmap () |
Unmap the tensor data that was previously mapped with call to Map(). More... | |
virtual TensorShape | GetStrides () const =0 |
virtual TensorShape | GetShape () const =0 |
virtual void | CopyOutTo (void *memory) const =0 |
virtual void | CopyInFrom (const void *memory)=0 |
virtual unsigned int | GetImportFlags () const |
Get flags describing supported import sources. More... | |
virtual bool | Import (void *memory, MemorySource source) |
Definition at line 16 of file ITensorHandle.hpp.
|
inlinevirtual |
Definition at line 19 of file ITensorHandle.hpp.
References ITensorHandle::Allocate(), ITensorHandle::GetParent(), ITensorHandle::Manage(), ITensorHandle::Map(), and ITensorHandle::Unmap().
|
pure virtual |
Indicate to the memory manager that this resource is no longer active. This is used to compute overlapping lifetimes of resources.
Implemented in NeonSubTensorHandle, ClSubTensorHandle, ConstPassthroughCpuTensorHandle, PassthroughCpuTensorHandle, ScopedCpuTensorHandle, ClTensorHandle, NeonTensorHandle, SampleTensorHandle, and RefTensorHandle.
Referenced by AllocateAndCopyDataToITensorHandle(), Graph::AllocateDynamicBuffers(), ConstPassthroughCpuTensorHandle::ConstPassthroughCpuTensorHandle(), PassthroughCpuTensorHandle::PassthroughCpuTensorHandle(), and ITensorHandle::~ITensorHandle().
|
pure virtual |
Referenced by CopyDataToITensorHandle(), and ITensorHandle::Unmap().
|
pure virtual |
Referenced by CopyDataFromITensorHandle(), and ITensorHandle::Unmap().
|
inlinevirtual |
Get flags describing supported import sources.
Reimplemented in NeonTensorHandle, SampleTensorHandle, and RefTensorHandle.
Definition at line 70 of file ITensorHandle.hpp.
Referenced by LoadedNetwork::EnqueueWorkload().
|
pure virtual |
Get the parent tensor if this is a subtensor.
Implemented in NeonSubTensorHandle, ClSubTensorHandle, NeonTensorHandle, ClTensorHandle, ConstCpuTensorHandle, SampleTensorHandle, and RefTensorHandle.
Referenced by Graph::AllocateDynamicBuffers(), and ITensorHandle::~ITensorHandle().
|
pure virtual |
Get the number of elements for each dimension ordered from slowest iterating dimension to fastest iterating dimension.
Implemented in NeonSubTensorHandle, ClSubTensorHandle, NeonTensorHandle, ClTensorHandle, ConstCpuTensorHandle, SampleTensorHandle, and RefTensorHandle.
Referenced by armnn::CopyTensorContentsGeneric(), armnnUtils::FindMinMax(), and ITensorHandle::Unmap().
|
pure virtual |
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.
Implemented in NeonSubTensorHandle, ClSubTensorHandle, NeonTensorHandle, ClTensorHandle, ConstCpuTensorHandle, SampleTensorHandle, and RefTensorHandle.
Referenced by armnn::CopyTensorContentsGeneric(), and ITensorHandle::Unmap().
|
inlinevirtual |
Import externally allocated memory
memory | base address of the memory being imported. |
source | source of the allocation for the memory being imported. |
Reimplemented in NeonTensorHandle, SampleTensorHandle, and RefTensorHandle.
Definition at line 76 of file ITensorHandle.hpp.
Referenced by LoadedNetwork::EnqueueWorkload().
|
pure virtual |
Indicate to the memory manager that this resource is active. This is used to compute overlapping lifetimes of resources.
Implemented in NeonSubTensorHandle, ClSubTensorHandle, NeonTensorHandle, ClTensorHandle, ConstCpuTensorHandle, SampleTensorHandle, and RefTensorHandle.
Referenced by Graph::AllocateDynamicBuffers(), and ITensorHandle::~ITensorHandle().
|
pure virtual |
Map the tensor data for access.
blocking | hint to block the calling thread until all other accesses are complete. (backend dependent) |
Implemented in NeonSubTensorHandle, ClSubTensorHandle, NeonTensorHandle, ClTensorHandle, ConstCpuTensorHandle, SampleTensorHandle, and RefTensorHandle.
Referenced by armnn::CopyTensorContentsGeneric(), LoadedNetwork::EnqueueWorkload(), SyncMemGenericWorkload::Execute(), armnnUtils::FindMinMax(), armnn::GetInputTensorData(), armnn::GetOutputTensorData(), RefTensorHandle::GetParent(), SampleTensorHandle::GetParent(), ITensorHandle::Map(), and ITensorHandle::~ITensorHandle().
|
inline |
Map the tensor data for access. Must be paired with call to Unmap().
blocking | hint to block the calling thread until all other accesses are complete. (backend dependent) |
Definition at line 44 of file ITensorHandle.hpp.
References ITensorHandle::Map().
|
pure virtual |
Unmap the tensor data.
Implemented in NeonSubTensorHandle, ClSubTensorHandle, NeonTensorHandle, ClTensorHandle, ConstCpuTensorHandle, SampleTensorHandle, and RefTensorHandle.
Referenced by armnn::CopyTensorContentsGeneric(), LoadedNetwork::EnqueueWorkload(), SyncMemGenericWorkload::Execute(), armnnUtils::FindMinMax(), ITensorHandle::Unmap(), and ITensorHandle::~ITensorHandle().
|
inline |
Unmap the tensor data that was previously mapped with call to Map().
Definition at line 50 of file ITensorHandle.hpp.
References ITensorHandle::CopyInFrom(), ITensorHandle::CopyOutTo(), ITensorHandle::GetShape(), ITensorHandle::GetStrides(), and ITensorHandle::Unmap().