diff options
author | Isabella Gottardi <isabella.gottardi@arm.com> | 2017-06-23 15:02:11 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:16:08 +0100 |
commit | b797fa235f714440ffa7a2ad4eef7ae14ee45da4 (patch) | |
tree | efdefae2963d612c1bb1f84b8b74823c64804702 /tests/validation/ReferenceCPP.h | |
parent | ac4e873dad6aa6291fc36aff62047a896db04f6a (diff) | |
download | ComputeLibrary-b797fa235f714440ffa7a2ad4eef7ae14ee45da4.tar.gz |
COMPMID-424 - Implemented reference implementation and tests (NEON and CL) for TableLookup
Change-Id: I53098ee750ab07fe64e9e2af8df91954d64017f5
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79411
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Steven Niu <steven.niu@arm.com>
Diffstat (limited to 'tests/validation/ReferenceCPP.h')
-rw-r--r-- | tests/validation/ReferenceCPP.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/validation/ReferenceCPP.h b/tests/validation/ReferenceCPP.h index d3c77a2243..8a5d853806 100644 --- a/tests/validation/ReferenceCPP.h +++ b/tests/validation/ReferenceCPP.h @@ -24,10 +24,10 @@ #ifndef __ARM_COMPUTE_TEST_REFERENCE_REFERENCE_CPP_H__ #define __ARM_COMPUTE_TEST_REFERENCE_REFERENCE_CPP_H__ -#include "Reference.h" - #include "RawTensor.h" +#include "Reference.h" +#include <map> #include <memory> #include <ostream> #include <vector> @@ -223,9 +223,17 @@ public: * @param[in] rounding_policy Rounding policy. */ static void fixed_point_pixel_wise_multiplication(const RawTensor &src1, const RawTensor &src2, RawTensor &dst, float scale, ConvertPolicy convert_policy, RoundingPolicy rounding_policy); + /** Table Lookup f@p src to @p dst + * + * @param[in] src Input tensor. + * @param[out] dst Result tensor. + * @param[in] lut Input lookup table. + */ + template <typename T> + static void table_lookup(const RawTensor &src, RawTensor &dst, std::map<T, T> &lut); /** Threshold of@p src to @p dst * - * @param[in] src First tensor. + * @param[in] src Input tensor. * @param[out] dst Result tensor. * @param[in] threshold Threshold. When the threhold type is RANGE, this is used as the lower threshold. * @param[in] false_value value to set when the condition is not respected. |