diff options
Diffstat (limited to 'tests/NEON/ArrayAccessor.h')
-rw-r--r-- | tests/NEON/ArrayAccessor.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/NEON/ArrayAccessor.h b/tests/NEON/ArrayAccessor.h index e56e6538ba..26bae10e00 100644 --- a/tests/NEON/ArrayAccessor.h +++ b/tests/NEON/ArrayAccessor.h @@ -50,7 +50,7 @@ public: ArrayAccessor(ArrayAccessor &&) = default; ArrayAccessor &operator=(ArrayAccessor &&) = default; - int num_values() const override + size_t num_values() const override { return _array.num_values(); } @@ -65,6 +65,13 @@ public: _array.resize(num); } + T &at(size_t index) const override + { + ARM_COMPUTE_ERROR_ON(_array.buffer() == nullptr); + ARM_COMPUTE_ERROR_ON(index >= num_values()); + return _array.buffer()[index]; + } + private: Array<T> &_array; }; |