Compute Library
 23.08
ITensorHandle Class Referenceabstract

Tensor handle interface object. More...

#include <ITensorHandle.h>

Public Member Functions

virtual ~ITensorHandle ()=default
 Default virtual destructor. More...
 
virtual void allocate ()=0
 Allocates backend memory for the handle. More...
 
virtual void free ()=0
 Allocates backend memory for the handle. More...
 
virtual void manage (IMemoryGroup *mg)=0
 Set backend tensor to be managed by a memory group. More...
 
virtual void map (bool blocking)=0
 Maps backend tensor object. More...
 
virtual void unmap ()=0
 Un-maps a backend tensor object. More...
 
virtual void release_if_unused ()=0
 Releases backend tensor if is marked as unused. More...
 
virtual arm_compute::ITensortensor ()=0
 Backend tensor object accessor. More...
 
virtual const arm_compute::ITensortensor () const =0
 Backend tensor object const accessor. More...
 
virtual ITensorHandleparent_handle ()=0
 Return the parent tensor handle if is a subtensor else this. More...
 
virtual bool is_subtensor () const =0
 Checks if a backing tensor is a sub-tensor object or not. More...
 
virtual Target target () const =0
 Returns target type. More...
 

Detailed Description

Tensor handle interface object.

Definition at line 38 of file ITensorHandle.h.

Constructor & Destructor Documentation

◆ ~ITensorHandle()

virtual ~ITensorHandle ( )
virtualdefault

Default virtual destructor.

Member Function Documentation

◆ allocate()

virtual void allocate ( )
pure virtual

Allocates backend memory for the handle.

Implemented in CLSubTensorHandle, NESubTensorHandle, CLTensorHandle, and NETensorHandle.

◆ free()

virtual void free ( )
pure virtual

Allocates backend memory for the handle.

Implemented in CLSubTensorHandle, NESubTensorHandle, CLTensorHandle, and NETensorHandle.

◆ is_subtensor()

virtual bool is_subtensor ( ) const
pure virtual

Checks if a backing tensor is a sub-tensor object or not.

Returns
True if the backend tensor is a sub-tensor else false

Implemented in CLSubTensorHandle, NESubTensorHandle, CLTensorHandle, and NETensorHandle.

◆ manage()

virtual void manage ( IMemoryGroup mg)
pure virtual

Set backend tensor to be managed by a memory group.

Parameters
[in]mgMemory group

Implemented in CLSubTensorHandle, NESubTensorHandle, CLTensorHandle, and NETensorHandle.

◆ map()

virtual void map ( bool  blocking)
pure virtual

Maps backend tensor object.

Parameters
[in]blockingFlags if the mapping operations should be blocking

Implemented in CLSubTensorHandle, NESubTensorHandle, CLTensorHandle, and NETensorHandle.

◆ parent_handle()

virtual ITensorHandle* parent_handle ( )
pure virtual

Return the parent tensor handle if is a subtensor else this.

Returns
Parent tensor handle

Implemented in CLSubTensorHandle, NESubTensorHandle, CLTensorHandle, and NETensorHandle.

Referenced by CLSubTensorHandle::parent_handle(), and NESubTensorHandle::parent_handle().

◆ release_if_unused()

virtual void release_if_unused ( )
pure virtual

Releases backend tensor if is marked as unused.

Note
This has no effect on sub-tensors
Warning
Parent tensors don't keep track of sub-tensors, thus if a parent is set as unused then all sub-tensors will be invalidated, on the other hand if a sub-tensor is marked as unused then the parent tensor won't be released

Implemented in CLSubTensorHandle, NESubTensorHandle, CLTensorHandle, and NETensorHandle.

◆ target()

virtual Target target ( ) const
pure virtual

Returns target type.

Returns
Target type

Implemented in CLSubTensorHandle, NESubTensorHandle, CLTensorHandle, and NETensorHandle.

◆ tensor() [1/2]

virtual const arm_compute::ITensor& tensor ( ) const
pure virtual

Backend tensor object const accessor.

Implemented in CLSubTensorHandle, NESubTensorHandle, CLTensorHandle, and NETensorHandle.

◆ tensor() [2/2]

◆ unmap()

virtual void unmap ( )
pure virtual

Un-maps a backend tensor object.

Implemented in CLSubTensorHandle, NESubTensorHandle, CLTensorHandle, and NETensorHandle.


The documentation for this class was generated from the following file: