ArmNN
NotReleased
|
#include <SampleTensorHandle.hpp>
Public Member Functions | |
SampleTensorHandle (const TensorInfo &tensorInfo, std::shared_ptr< SampleMemoryManager > &memoryManager) | |
SampleTensorHandle (const TensorInfo &tensorInfo, std::shared_ptr< SampleMemoryManager > &memoryManager, MemorySourceFlags importFlags) | |
~SampleTensorHandle () | |
virtual void | Manage () override |
virtual void | Allocate () override |
virtual ITensorHandle * | GetParent () const override |
virtual const void * | Map (bool) const override |
virtual void | Unmap () const override |
Unmap the tensor data. More... | |
TensorShape | GetStrides () const override |
TensorShape | GetShape () const override |
const TensorInfo & | GetTensorInfo () const |
virtual MemorySourceFlags | GetImportFlags () const override |
Get flags describing supported import sources. More... | |
virtual bool | Import (void *memory, MemorySource source) override |
Public Member Functions inherited from ITensorHandle | |
virtual | ~ITensorHandle () |
void * | Map (bool blocking=true) |
void | Unmap () |
Unmap the tensor data that was previously mapped with call to Map(). More... | |
virtual void | CopyOutTo (void *memory) const =0 |
virtual void | CopyInFrom (const void *memory)=0 |
Definition at line 15 of file SampleTensorHandle.hpp.
SampleTensorHandle | ( | const TensorInfo & | tensorInfo, |
std::shared_ptr< SampleMemoryManager > & | memoryManager | ||
) |
Definition at line 11 of file SampleTensorHandle.cpp.
Referenced by SampleTensorHandle::GetImportFlags().
SampleTensorHandle | ( | const TensorInfo & | tensorInfo, |
std::shared_ptr< SampleMemoryManager > & | memoryManager, | ||
MemorySourceFlags | importFlags | ||
) |
Definition at line 23 of file SampleTensorHandle.cpp.
~SampleTensorHandle | ( | ) |
Definition at line 36 of file SampleTensorHandle.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 53 of file SampleTensorHandle.cpp.
References TensorInfo::GetNumBytes().
|
inlineoverridevirtual |
Get flags describing supported import sources.
Reimplemented from ITensorHandle.
Definition at line 56 of file SampleTensorHandle.hpp.
References SampleTensorHandle::Import(), and SampleTensorHandle::SampleTensorHandle().
|
inlineoverridevirtual |
Get the parent tensor if this is a subtensor.
Implements ITensorHandle.
Definition at line 30 of file SampleTensorHandle.hpp.
References SampleTensorHandle::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 46 of file SampleTensorHandle.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 41 of file SampleTensorHandle.hpp.
References armnn::GetUnpaddedTensorStrides().
|
inline |
Definition at line 51 of file SampleTensorHandle.hpp.
|
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 91 of file SampleTensorHandle.cpp.
References armnn::Malloc.
Referenced by SampleTensorHandle::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 48 of file SampleTensorHandle.cpp.
References 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 74 of file SampleTensorHandle.cpp.
Referenced by SampleTensorHandle::GetParent().
|
inlineoverridevirtual |
Unmap the tensor data.
Implements ITensorHandle.
Definition at line 38 of file SampleTensorHandle.hpp.