Compute Library
 22.05
IArrayAccessor< T > Class Template Referenceabstract

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

#include <IArrayAccessor.h>

Public Types

using value_type = T
 Array value type. More...
 

Public Member Functions

virtual ~IArrayAccessor ()=default
 Virtual destructor. More...
 
virtual size_t num_values () const =0
 Number of elements of the tensor. More...
 
virtual T * buffer ()=0
 Access to the buffer. More...
 
virtual void resize (size_t num)=0
 Resize array. More...
 
virtual T & at (size_t index) const =0
 Reference to the element of the array located at the given index. More...
 

Detailed Description

template<typename T>
class arm_compute::test::IArrayAccessor< T >

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

Definition at line 35 of file IArrayAccessor.h.

Member Typedef Documentation

◆ value_type

using value_type = T

Array value type.

Definition at line 39 of file IArrayAccessor.h.

Constructor & Destructor Documentation

◆ ~IArrayAccessor()

virtual ~IArrayAccessor ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ at()

virtual T& at ( size_t  index) const
pure virtual

Reference to the element of the array located at the given index.

Parameters
[in]indexIndex of the element
Returns
A reference to the element of the array located at the given index.

Implemented in CLArrayAccessor< T >, and ArrayAccessor< T >.

◆ buffer()

virtual T* buffer ( )
pure virtual

Access to the buffer.

Returns
A pointer to the first element in the buffer.

Implemented in CLArrayAccessor< T >, and ArrayAccessor< T >.

◆ num_values()

virtual size_t num_values ( ) const
pure virtual

Number of elements of the tensor.

Returns
the number of elements.

Implemented in CLArrayAccessor< T >, and ArrayAccessor< T >.

◆ resize()

virtual void resize ( size_t  num)
pure virtual

Resize array.

Parameters
[in]numThe new array size in number of elements

Implemented in CLArrayAccessor< T >, and ArrayAccessor< T >.


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