24.02.1
|
Basic implementation of the sub-tensor interface. More...
#include <SubTensor.h>
Public Member Functions | |
SubTensor () | |
Default Constructor. More... | |
SubTensor (ITensor *parent, const TensorShape &tensor_shape, const Coordinates &coords, bool extend_parent=false) | |
Constructor. More... | |
~SubTensor ()=default | |
Destructor: free the tensor's memory. More... | |
SubTensor (const SubTensor &)=delete | |
Restrict instances of this class to be copy constructed. More... | |
SubTensor & | operator= (const SubTensor &)=delete |
Restrict instances of this class to be copied. More... | |
SubTensor (SubTensor &&)=default | |
Allow instances of this class to be move constructed. More... | |
SubTensor & | operator= (SubTensor &&)=default |
Allow instances of this class to be moved. More... | |
ITensor * | parent () |
Return the parent tensor of the subtensor. 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... | |
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... | |
Basic implementation of the sub-tensor interface.
Definition at line 37 of file SubTensor.h.
SubTensor | ( | ) |
Default Constructor.
Definition at line 30 of file SubTensor.cpp.
SubTensor | ( | ITensor * | parent, |
const TensorShape & | tensor_shape, | ||
const Coordinates & | coords, | ||
bool | extend_parent = false |
||
) |
Constructor.
[in] | parent | Parent tensor |
[in] | tensor_shape | Shape of the subtensor |
[in] | coords | Coordinates of the first subtensor element inside the parent tensor. |
[in] | extend_parent | (Optional) Extend parent with subtensor shape if subtensor indexes out of bounds |
Definition at line 34 of file SubTensor.cpp.
|
default |
Destructor: free the tensor's memory.
|
overridevirtual |
Interface to be implemented by the child class to return a pointer to CPU memory.
Implements ITensor.
Definition at line 52 of file SubTensor.cpp.
References ARM_COMPUTE_ERROR_ON, and ITensor::buffer().
|
overridevirtual |
Interface to be implemented by the child class to return the tensor's metadata.
Implements ITensor.
Definition at line 42 of file SubTensor.cpp.
|
overridevirtual |
Interface to be implemented by the child class to return the tensor's metadata.
Implements ITensor.
ITensor * parent | ( | ) |
Return the parent tensor of the subtensor.
Definition at line 58 of file SubTensor.cpp.