21.02
|
Interface for GLES Compute tensor. More...
#include <IGCTensor.h>
Public Member Functions | |
IGCTensor () | |
Default constructor. More... | |
IGCTensor (const IGCTensor &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
IGCTensor & | operator= (const IGCTensor &)=delete |
Prevent instances of this class from being copy assigned (As this class contains pointers) More... | |
IGCTensor (IGCTensor &&)=default | |
Allow instances of this class to be moved. More... | |
IGCTensor & | operator= (IGCTensor &&)=default |
Allow instances of this class to be moved. More... | |
virtual | ~IGCTensor ()=default |
Virtual destructor. More... | |
void | map (bool blocking=true) |
Map on an allocated buffer. More... | |
void | unmap () |
Unmap an allocated and mapped buffer. More... | |
void | clear () |
Clear the contents of the tensor synchronously. More... | |
uint8_t * | buffer () const override |
Interface to be implemented by the child class to return a pointer to CPU memory. More... | |
virtual GLuint | gc_buffer () const =0 |
Interface to be implemented by the child class to return the tensor's gles compute buffer id. More... | |
bool | needs_shifting () const |
Flag indicating whether the tensor has been left aligned by a kernel and therefore needs shifting. More... | |
void | set_needs_shifting (bool needs_shifting) |
Set the flag indicating whether or not a tensor needs shifting. More... | |
Public Member Functions inherited from ITensor | |
virtual ITensorInfo * | info () const =0 |
Interface to be implemented by the child class to return the tensor's metadata. More... | |
virtual ITensorInfo * | info ()=0 |
Interface to be implemented by the child class to return the tensor's metadata. More... | |
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... | |
Interface for GLES Compute tensor.
Definition at line 35 of file IGCTensor.h.
IGCTensor | ( | ) |
Default constructor.
Definition at line 28 of file IGCTensor.cpp.
Prevent instances of this class from being copied (As this class contains pointers)
|
virtualdefault |
Virtual destructor.
|
overridevirtual |
Interface to be implemented by the child class to return a pointer to CPU memory.
Implements ITensor.
Reimplemented in GCTensor.
Definition at line 51 of file IGCTensor.cpp.
void clear | ( | ) |
Clear the contents of the tensor synchronously.
Definition at line 44 of file IGCTensor.cpp.
References ITensor::info(), IGCTensor::map(), and IGCTensor::unmap().
|
pure virtual |
Interface to be implemented by the child class to return the tensor's gles compute buffer id.
Implemented in GCTensor.
Referenced by IGCKernel::kernel().
void map | ( | bool | blocking = true | ) |
Map on an allocated buffer.
[in] | blocking | (Optional) If true, then the mapping will be ready to use by the time this method returns, else it is the caller's responsibility to flush the queue and wait for the mapping operation to have completed before using the returned mapping pointer. |
Definition at line 33 of file IGCTensor.cpp.
Referenced by IGCTensor::clear(), GCTensor::map(), arm_compute::test::print_tensor(), and arm_compute::test::sync_tensor_if_necessary().
bool needs_shifting | ( | ) | const |
Flag indicating whether the tensor has been left aligned by a kernel and therefore needs shifting.
Definition at line 56 of file IGCTensor.cpp.
Referenced by GCTensorShiftKernel::run(), and IGCTensor::set_needs_shifting().
Prevent instances of this class from being copy assigned (As this class contains pointers)
void set_needs_shifting | ( | bool | needs_shifting | ) |
Set the flag indicating whether or not a tensor needs shifting.
[in] | needs_shifting | Indicates if the tensor is left aligned or not. |
Definition at line 61 of file IGCTensor.cpp.
References IGCTensor::needs_shifting().
Referenced by GCDepthwiseConvolutionLayer3x3Kernel::run(), GCActivationLayerKernel::run(), GCDepthConcatenateLayerKernel::run(), GCDirectConvolutionLayerKernel< kernel_size >::run(), GCPoolingLayerKernel::run(), GCArithmeticAdditionKernel::run(), GCNormalizePlanarYUVLayerKernel::run(), and GCBatchNormalizationLayerKernel::run().
void unmap | ( | ) |
Unmap an allocated and mapped buffer.
Definition at line 38 of file IGCTensor.cpp.
Referenced by IGCTensor::clear(), arm_compute::test::print_tensor(), arm_compute::test::sync_tensor_if_necessary(), and GCTensor::unmap().