Compute Library
 23.05
IAccessor Class Referenceabstract

Common interface to provide information and access to tensor like structures. More...

#include <IAccessor.h>

Public Member Functions

virtual ~IAccessor ()=default
 Virtual destructor. More...
 
virtual TensorShape shape () const =0
 Shape of the tensor. More...
 
virtual size_t element_size () const =0
 Size of each element in the tensor in bytes. More...
 
virtual size_t size () const =0
 Total size of the tensor in bytes. More...
 
virtual Format format () const =0
 Image format of the tensor. More...
 
virtual DataLayout data_layout () const =0
 Data layout of the tensor. More...
 
virtual DataType data_type () const =0
 Data type of the tensor. More...
 
virtual int num_channels () const =0
 Number of channels of the tensor. More...
 
virtual int num_elements () const =0
 Number of elements of the tensor. More...
 
virtual PaddingSize padding () const =0
 Available padding around the tensor. More...
 
virtual QuantizationInfo quantization_info () const =0
 Quantization info in case of asymmetric quantized type. More...
 
virtual const void * operator() (const Coordinates &coord) const =0
 Read only access to the specified element. More...
 
virtual void * operator() (const Coordinates &coord)=0
 Access to the specified element. More...
 

Detailed Description

Common interface to provide information and access to tensor like structures.

Definition at line 37 of file IAccessor.h.

Constructor & Destructor Documentation

◆ ~IAccessor()

virtual ~IAccessor ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ data_layout()

virtual DataLayout data_layout ( ) const
pure virtual

Data layout of the tensor.

Returns
the data layout of the tensor.

Implemented in SimpleTensor< T >, SimpleTensor< uint8_t >, CLAccessor, SimpleTensorAccessor< T >, and Accessor.

Referenced by arm_compute::test::validation::validate(), and arm_compute::test::validation::validate_wrap().

◆ data_type()

virtual DataType data_type ( ) const
pure virtual

◆ element_size()

virtual size_t element_size ( ) const
pure virtual

Size of each element in the tensor in bytes.

Returns
the size of each element in the tensor in bytes.

Implemented in SimpleTensor< T >, SimpleTensor< uint8_t >, CLAccessor, SimpleTensorAccessor< T >, and Accessor.

Referenced by arm_compute::test::validation::validate(), and arm_compute::test::validation::validate_wrap().

◆ format()

virtual Format format ( ) const
pure virtual

◆ num_channels()

virtual int num_channels ( ) const
pure virtual

Number of channels of the tensor.

Returns
the number of channels of the tensor.

Implemented in SimpleTensor< T >, SimpleTensor< uint8_t >, CLAccessor, SimpleTensorAccessor< T >, and Accessor.

Referenced by arm_compute::test::validation::validate(), and arm_compute::test::validation::validate_wrap().

◆ num_elements()

virtual int num_elements ( ) const
pure virtual

Number of elements of the tensor.

Returns
the number of elements of the tensor.

Implemented in SimpleTensor< T >, SimpleTensor< uint8_t >, CLAccessor, SimpleTensorAccessor< T >, and Accessor.

Referenced by arm_compute::test::validation::validate(), and arm_compute::test::validation::validate_wrap().

◆ operator()() [1/2]

virtual const void* operator() ( const Coordinates coord) const
pure virtual

Read only access to the specified element.

Parameters
[in]coordCoordinates of the desired element.
Returns
A pointer to the desired element.

Implemented in SimpleTensor< T >, SimpleTensor< uint8_t >, RawTensor, CLAccessor, SimpleTensorAccessor< T >, and Accessor.

◆ operator()() [2/2]

virtual void* operator() ( const Coordinates coord)
pure virtual

Access to the specified element.

Parameters
[in]coordCoordinates of the desired element.
Returns
A pointer to the desired element.

Implemented in SimpleTensor< T >, SimpleTensor< uint8_t >, RawTensor, CLAccessor, SimpleTensorAccessor< T >, and Accessor.

◆ padding()

virtual PaddingSize padding ( ) const
pure virtual

Available padding around the tensor.

Returns
the available padding around the tensor.

Implemented in SimpleTensor< T >, SimpleTensor< uint8_t >, CLAccessor, SimpleTensorAccessor< T >, and Accessor.

◆ quantization_info()

virtual QuantizationInfo quantization_info ( ) const
pure virtual

Quantization info in case of asymmetric quantized type.

Returns

Implemented in SimpleTensor< T >, SimpleTensor< uint8_t >, CLAccessor, SimpleTensorAccessor< T >, and Accessor.

◆ shape()

virtual TensorShape shape ( ) const
pure virtual

◆ size()

virtual size_t size ( ) const
pure virtual

Total size of the tensor in bytes.

Returns
the total size of the tensor in bytes.

Implemented in SimpleTensor< T >, SimpleTensor< uint8_t >, CLAccessor, SimpleTensorAccessor< T >, and Accessor.


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