24.08
|
#include <RefTensorHandle.hpp>
Public Member Functions | |
RefTensorHandleDecorator (const TensorInfo &tensorInfo, const RefTensorHandle &parent) | |
~RefTensorHandleDecorator ()=default | |
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 bool | CanBeImported (void *memory, MemorySource source) override |
Implementations must determine if this memory block can be imported. More... | |
virtual std::shared_ptr< ITensorHandle > | DecorateTensorHandle (const TensorInfo &tensorInfo) override |
Returns a decorated version of this TensorHandle allowing us to override the TensorInfo for it. 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... | |
void | CopyOutTo (void *) const override |
Testing support to be able to verify and set tensor data content. More... | |
void | CopyInFrom (const void *) override |
void | Unimport () override |
Unimport externally allocated memory. More... | |
virtual const void * | Map (bool blocking=true) const=0 |
Map the tensor data for access. More... | |
void * | Map (bool blocking=true) |
Map the tensor data for access. More... | |
Public Member Functions inherited from RefTensorHandle | |
RefTensorHandle (const TensorInfo &tensorInfo, std::shared_ptr< RefMemoryManager > &memoryManager) | |
RefTensorHandle (const TensorInfo &tensorInfo) | |
RefTensorHandle (const TensorInfo &tensorInfo, const RefTensorHandle &parent) | |
~RefTensorHandle () | |
const TensorInfo & | GetTensorInfo () const |
virtual const void * | Map (bool blocking=true) const=0 |
Map the tensor data for access. More... | |
void * | Map (bool blocking=true) |
Map the tensor data for access. More... | |
Public Member Functions inherited from ITensorHandle | |
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 84 of file RefTensorHandle.hpp.
RefTensorHandleDecorator | ( | const TensorInfo & | tensorInfo, |
const RefTensorHandle & | parent | ||
) |
Definition at line 174 of file RefTensorHandle.cpp.
|
default |
|
overridevirtual |
Indicate to the memory manager that this resource is no longer active.
This is used to compute overlapping lifetimes of resources.
Reimplemented from RefTensorHandle.
Definition at line 185 of file RefTensorHandle.cpp.
|
overridevirtual |
Implementations must determine if this memory block can be imported.
This might be based on alignment or memory source type.
Reimplemented from RefTensorHandle.
Definition at line 204 of file RefTensorHandle.cpp.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Testing support to be able to verify and set tensor data content.
Reimplemented from RefTensorHandle.
Definition at line 143 of file RefTensorHandle.hpp.
|
overridevirtual |
Returns a decorated version of this TensorHandle allowing us to override the TensorInfo for it.
tensorInfo | the overidden TensorInfo. |
Reimplemented from RefTensorHandle.
Definition at line 209 of file RefTensorHandle.cpp.
|
overridevirtual |
Get flags describing supported import sources.
Reimplemented from RefTensorHandle.
Definition at line 194 of file RefTensorHandle.cpp.
References armnn::Malloc.
|
inlineoverridevirtual |
Get the parent tensor if this is a subtensor.
Reimplemented from RefTensorHandle.
Definition at line 95 of file RefTensorHandle.hpp.
|
inlineoverridevirtual |
Get the number of elements for each dimension ordered from slowest iterating dimension to fastest iterating dimension.
Reimplemented from RefTensorHandle.
Definition at line 111 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.
Reimplemented from RefTensorHandle.
Definition at line 106 of file RefTensorHandle.hpp.
References armnn::GetUnpaddedTensorStrides().
|
inline |
Definition at line 116 of file RefTensorHandle.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 RefTensorHandle.
Definition at line 199 of file RefTensorHandle.cpp.
|
overridevirtual |
Indicate to the memory manager that this resource is active.
This is used to compute overlapping lifetimes of resources.
Reimplemented from RefTensorHandle.
Definition at line 181 of file RefTensorHandle.cpp.
|
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.
|
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 131 of file RefTensorHandle.hpp.
References RefTensorHandleDecorator::Map().
virtual const void* Map |
Map the tensor data for access.
blocking | hint to block the calling thread until all other accesses are complete. (backend dependent) |
|
overridevirtual |
Map the tensor data for access.
blocking | hint to block the calling thread until all other accesses are complete. (backend dependent) |
Reimplemented from RefTensorHandle.
Definition at line 189 of file RefTensorHandle.cpp.
References RefTensorHandle::Map().
Referenced by RefTensorHandleDecorator::Map().
|
inlineoverridevirtual |
Unimport externally allocated memory.
Reimplemented from ITensorHandle.
Definition at line 150 of file RefTensorHandle.hpp.
|
inline |
Unmap the tensor data that was previously mapped with call to Map().
Definition at line 137 of file RefTensorHandle.hpp.
References RefTensorHandleDecorator::Unmap().
|
inlineoverridevirtual |
Unmap the tensor data.
Reimplemented from RefTensorHandle.
Definition at line 103 of file RefTensorHandle.hpp.
Referenced by RefTensorHandleDecorator::Unmap().