diff options
author | John Richardson <john.richardson@arm.com> | 2017-09-05 11:21:56 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | f89a49f7bdd8d03400060488596c8757745e19cf (patch) | |
tree | 7e98eb703794e2bce9b9f2fbcbfc9c29714cf8fe /tests/CL/CLArrayAccessor.h | |
parent | f3aeee133c1c9c98c6828e935cf4f9801fbda9e1 (diff) | |
download | ComputeLibrary-f89a49f7bdd8d03400060488596c8757745e19cf.tar.gz |
COMPMID-503: Move MinMaxLocation to new validation
Change-Id: I2d518b3a3f15e2c4786488593dac244c1d74a0f9
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/86533
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
Diffstat (limited to 'tests/CL/CLArrayAccessor.h')
-rw-r--r-- | tests/CL/CLArrayAccessor.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/CL/CLArrayAccessor.h b/tests/CL/CLArrayAccessor.h index a38907dd78..a516a9d96a 100644 --- a/tests/CL/CLArrayAccessor.h +++ b/tests/CL/CLArrayAccessor.h @@ -60,7 +60,7 @@ public: _array.unmap(); } - int num_values() const override + size_t num_values() const override { return _array.num_values(); } @@ -75,6 +75,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: CLArray<T> &_array; }; |