21.11
|
#include <TensorHandle.hpp>
Public Member Functions | |
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 |
Public Member Functions inherited from ITensorHandle | |
virtual | ~ITensorHandle () |
virtual void | Allocate ()=0 |
Indicate to the memory manager that this resource is no longer active. More... | |
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... | |
virtual void | Unimport () |
Unimport externally allocated memory. More... | |
Protected Member Functions | |
ConstTensorHandle (const TensorInfo &tensorInfo) | |
void | SetConstMemory (const void *mem) |
Definition at line 27 of file TensorHandle.hpp.
|
protected |
Definition at line 31 of file TensorHandle.cpp.
Referenced by ConstTensorHandle::GetShape(), and ConstTensorHandle::SetConstMemory().
|
inline |
Definition at line 31 of file TensorHandle.hpp.
References ARMNN_ASSERT, and ConstTensorHandle::GetTensorInfo().
Referenced by ConstPassthroughTensorHandle::ConstPassthroughTensorHandle(), ClConstantWorkload::Execute(), RefConstantWorkload::ExecuteAsync(), armnn::InitializeArmComputeTensorData(), armnn::PermuteTensor(), and ScopedTensorHandle::ScopedTensorHandle().
const void * GetConstTensor | ( | ) | const |
Definition at line 38 of file TensorHandle.cpp.
const void* GetConstTensor | ( | ) | const |
|
inlineoverridevirtual |
Get the parent tensor if this is a subtensor.
Implements ITensorHandle.
Definition at line 44 of file TensorHandle.hpp.
|
inlineoverridevirtual |
Get the number of elements for each dimension ordered from slowest iterating dimension to fastest iterating dimension.
Implements ITensorHandle.
Definition at line 53 of file TensorHandle.hpp.
References ConstTensorHandle::ConstTensorHandle(), and 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 49 of file TensorHandle.hpp.
References armnn::GetUnpaddedTensorStrides().
|
inline |
Definition at line 37 of file TensorHandle.hpp.
Referenced by ScopedTensorHandle::Allocate(), TestLayerVisitor::CheckConstTensors(), ClConvolution2dWorkload::ClConvolution2dWorkload(), ClDepthwiseConvolutionWorkload::ClDepthwiseConvolutionWorkload(), ClFullyConnectedWorkload::ClFullyConnectedWorkload(), ClTransposeConvolution2dWorkload::ClTransposeConvolution2dWorkload(), armnn::Convert1HWOTensorToAcl(), armnn::Convert1HWOtoMIHW(), armnn::ConvertWeightTensorFromArmnnToAcl(), ConstTensorHandle::GetConstTensor(), TensorHandle::GetTensor(), armnn::InitializeArmComputeTensorData(), NeonDepthwiseConvolutionWorkload::NeonDepthwiseConvolutionWorkload(), armnn::PermuteTensor(), RefConvolution2dWorkload::RefConvolution2dWorkload(), and ScopedTensorHandle::ScopedTensorHandle().
|
inlineoverridevirtual |
Indicate to the memory manager that this resource is active.
This is used to compute overlapping lifetimes of resources.
Implements ITensorHandle.
Definition at line 42 of file TensorHandle.hpp.
|
inlineoverridevirtual |
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 46 of file TensorHandle.hpp.
Referenced by TestLayerVisitor::CheckConstTensors().
|
inlineprotected |
Definition at line 58 of file TensorHandle.hpp.
References ARMNN_ASSERT_MSG, and ConstTensorHandle::ConstTensorHandle().
Referenced by ConstPassthroughTensorHandle::ConstPassthroughTensorHandle(), and TensorHandle::SetMemory().
|
inlineoverridevirtual |
Unmap the tensor data.
Implements ITensorHandle.
Definition at line 47 of file TensorHandle.hpp.
Referenced by TestLayerVisitor::CheckConstTensors().