diff options
author | Giorgio Arena <giorgio.arena@arm.com> | 2017-06-13 15:49:37 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:16:42 +0100 |
commit | 2ca209eaf3e1dee31bc2287be1f4e501697456db (patch) | |
tree | 907e59dff71eb6b082632f6940b985fb5df9b11b /tests/validation/TensorVisitors.h | |
parent | d03b00acd71847fa2db1c5308c87d3b57c781bf9 (diff) | |
download | ComputeLibrary-2ca209eaf3e1dee31bc2287be1f4e501697456db.tar.gz |
COMPMID-424 NEON MinMaxLocation test.
Change-Id: I3dda0961061b52c680b5af0443ad93a00425dd4c
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/77433
Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Steven Niu <steven.niu@arm.com>
Diffstat (limited to 'tests/validation/TensorVisitors.h')
-rw-r--r-- | tests/validation/TensorVisitors.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/validation/TensorVisitors.h b/tests/validation/TensorVisitors.h index c58b9a69c0..168e212a65 100644 --- a/tests/validation/TensorVisitors.h +++ b/tests/validation/TensorVisitors.h @@ -45,6 +45,28 @@ namespace validation { namespace tensor_visitors { +// Min max location visitor +struct min_max_location_visitor : public boost::static_visitor<> +{ +public: + explicit min_max_location_visitor(int32_t &min, int32_t &max, Coordinates2DArray &min_loc, Coordinates2DArray &max_loc, uint32_t &min_count, uint32_t &max_count) + : _min(min), _max(max), _min_loc(min_loc), _max_loc(max_loc), _min_count(min_count), _max_count(max_count) + { + } + template <typename T1> + void operator()(const Tensor<T1> &in) const + { + tensor_operations::min_max_location(in, _min, _max, _min_loc, _max_loc, _min_count, _max_count); + } + +private: + int32_t &_min; + int32_t &_max; + Coordinates2DArray &_min_loc; + Coordinates2DArray &_max_loc; + uint32_t &_min_count; + uint32_t &_max_count; +}; // Absolute Difference visitor struct absolute_difference_visitor : public boost::static_visitor<> { |