24.02
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_IARRAY_H
25 #define ARM_COMPUTE_IARRAY_H
40 IArray() : _num_values(0), _max_size(0){};
80 at(_num_values) = val;
104 virtual T *
buffer()
const = 0;
111 virtual T &
at(
size_t index)
const
size_t num_values() const
Number of values currently stored in the array.
void resize(size_t num)
Resizes the array to contain "num" elements.
void clear()
Clear all the points from the array.
size_t max_num_values() const
Maximum number of values which can be stored in this array.
virtual T * buffer() const =0
Pointer to the first element of the array.
bool overflow() const
Did we lose some values because the array is too small?
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
bool push_back(const T &val)
Append the passed argument to the end of the array if there is room.
IArray()
Default constructor.
virtual ~IArray()=default
Default virtual destructor.
IArray(size_t max_num_values)
Constructor: initializes an array which can contain up to max_num_points values.
Copyright (c) 2017-2024 Arm Limited.
virtual T & at(size_t index) const
Reference to the element of the array located at the given index.