21.02
|
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... | |
Common interface to provide information and access to array like structures.
Definition at line 35 of file IArrayAccessor.h.
using value_type = T |
Array value type.
Definition at line 39 of file IArrayAccessor.h.
|
virtualdefault |
Virtual destructor.
|
pure virtual |
Reference to the element of the array located at the given index.
[in] | index | Index of the element |
Implemented in CLArrayAccessor< T >, and ArrayAccessor< T >.
|
pure virtual |
Access to the buffer.
Implemented in CLArrayAccessor< T >, and ArrayAccessor< T >.
|
pure virtual |
Number of elements of the tensor.
Implemented in CLArrayAccessor< T >, and ArrayAccessor< T >.
|
pure virtual |
Resize array.
[in] | num | The new array size in number of elements |
Implemented in CLArrayAccessor< T >, and ArrayAccessor< T >.