24.02.1
|
Basic implementation of the tensor interface. More...
#include <Tensor.h>
Public Member Functions | |
Tensor (IRuntimeContext *ctx=nullptr) | |
Constructor. More... | |
~Tensor ()=default | |
Destructor: free the tensor's memory. More... | |
Tensor (Tensor &&)=default | |
Allow instances of this class to be move constructed. More... | |
Tensor & | operator= (Tensor &&)=default |
Allow instances of this class to be moved. More... | |
TensorAllocator * | allocator () |
Return a pointer to the tensor's allocator. More... | |
ITensorInfo * | info () const override |
Interface to be implemented by the child class to return the tensor's metadata. More... | |
ITensorInfo * | info () override |
Interface to be implemented by the child class to return the tensor's metadata. More... | |
uint8_t * | buffer () const override |
Interface to be implemented by the child class to return a pointer to CPU memory. More... | |
void | associate_memory_group (IMemoryGroup *memory_group) override |
Associates a memory managable object with the memory group that manages it. More... | |
Public Member Functions inherited from ITensor | |
virtual | ~ITensor ()=default |
Default virtual destructor. More... | |
uint8_t * | ptr_to_element (const Coordinates &id) const |
Return a pointer to the element at the passed coordinates. More... | |
void | copy_from (const ITensor &src) |
Copy the content of another tensor. More... | |
void | print (std::ostream &s, IOFormatInfo io_fmt=IOFormatInfo()) const |
Print a tensor to a given stream using user defined formatting information. More... | |
bool | is_used () const |
Flags if the tensor is used or not. More... | |
void | mark_as_unused () const |
Marks a tensor as unused. More... | |
void | mark_as_used () const |
Marks a tensor as used. More... | |
Public Member Functions inherited from IMemoryManageable | |
virtual | ~IMemoryManageable ()=default |
Default virtual destructor. More... | |
Tensor | ( | IRuntimeContext * | ctx = nullptr | ) |
Constructor.
[in] | ctx | (Optional) Pointer to the runtime context. |
Definition at line 28 of file Tensor.cpp.
|
default |
Destructor: free the tensor's memory.
TensorAllocator * allocator | ( | ) |
Return a pointer to the tensor's allocator.
Definition at line 47 of file Tensor.cpp.
Referenced by NETensorHandle::allocate(), CPPBoxWithNonMaximaSuppressionLimit::configure(), CPPDetectionPostProcessLayer::configure(), NEFFT2D::configure(), NERNNLayer::configure(), NEFFT1D::configure(), NEL2NormalizeLayer::configure(), CpuDirectConv2d::configure(), NEReductionOperation::configure(), CpuDirectConv3d::configure(), NEDetectionPostProcessLayer::configure(), NEInstanceNormalizationLayer::configure(), NENormalizationLayer::configure(), NEFFTConvolutionLayer::configure(), NEGenerateProposalsLayer::configure(), NELSTMLayerQuantized::configure(), NELSTMLayer::configure(), NEDeconvolutionLayer::configure(), NEQLSTMLayer::configure(), CpuAuxTensorHandler::CpuAuxTensorHandler(), NETensorHandle::free(), main(), NETensorHandle::NETensorHandle(), NumPyAccessor::NumPyAccessor(), NEFFTConvolutionLayer::prepare(), NEDeconvolutionLayer::prepare(), NELSTMLayerQuantized::prepare(), NEQLSTMLayer::prepare(), NEFullyConnectedLayerReshapeWeightsManaged::release(), NETensorHandle::release_if_unused(), NEFullyConnectedLayerReshapeWeightsManaged::run(), NEFFTConvolutionLayer::run(), CpuGemmConv2d::run(), and arm_compute::test::validation::TEST_CASE().
|
overridevirtual |
Associates a memory managable object with the memory group that manages it.
[in] | memory_group | Memory group that manages the object. |
Implements IMemoryManageable.
Definition at line 52 of file Tensor.cpp.
References TensorAllocator::set_associated_memory_group().
|
overridevirtual |
Interface to be implemented by the child class to return a pointer to CPU memory.
Implements ITensor.
Definition at line 42 of file Tensor.cpp.
References TensorAllocator::data().
Referenced by NEFFT1D::configure(), CpuDirectConv2d::configure(), CpuDirectConv3d::configure(), NEFFTConvolutionLayer::configure(), NEDeconvolutionLayer::configure(), main(), NEQLSTMLayer::prepare(), CPPDetectionPostProcessLayer::run(), NEFFTConvolutionLayer::run(), NELSTMLayer::run(), and arm_compute::test::validation::TEST_CASE().
|
overridevirtual |
Interface to be implemented by the child class to return the tensor's metadata.
Implements ITensor.
Definition at line 32 of file Tensor.cpp.
References ITensorAllocator::info().
Referenced by NumPyAccessor::access_tensor(), CPPDetectionPostProcessLayer::configure(), NEInstanceNormalizationLayer::configure(), NEFFTConvolutionLayer::configure(), NEGenerateProposalsLayer::configure(), NELSTMLayerQuantized::configure(), NELSTMLayer::configure(), NEQLSTMLayer::configure(), arm_compute::test::validation::DATA_TEST_CASE(), main(), NEQLSTMLayer::prepare(), NELSTMLayer::run(), and arm_compute::test::validation::TEST_CASE().
|
overridevirtual |
Interface to be implemented by the child class to return the tensor's metadata.
Implements ITensor.