From a7a5b7b2ee6adcfe86339a402f287c4d0d368659 Mon Sep 17 00:00:00 2001 From: Sanghoon Lee Date: Thu, 14 Sep 2017 12:11:03 +0100 Subject: COMPMID-508: Port TableLookup to new validation Change-Id: I9e1a683afd64c351252617ba52131ca1ee829933 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/87698 Reviewed-by: Moritz Pflanzer Reviewed-by: Pablo Tello Tested-by: Kaizen --- tests/validation/Helpers.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests/validation/Helpers.h') diff --git a/tests/validation/Helpers.h b/tests/validation/Helpers.h index 7043f1ebdc..85002eb599 100644 --- a/tests/validation/Helpers.h +++ b/tests/validation/Helpers.h @@ -185,6 +185,23 @@ inline void fill_mask_from_pattern(uint8_t *mask, int cols, int rows, MatrixPatt * @return The shape of output concatenated tensor. */ TensorShape calculate_depth_concatenate_shape(const std::vector &input_shapes); + +/** Helper function to fill the Lut random by a ILutAccessor. + * + * @param[in,out] table Accessor at the Lut. + * + */ +template +void fill_lookuptable(T &&table) +{ + std::mt19937 generator(library->seed()); + std::uniform_int_distribution distribution(std::numeric_limits::min(), std::numeric_limits::max()); + + for(int i = std::numeric_limits::min(); i <= std::numeric_limits::max(); i++) + { + table[i] = distribution(generator); + } +} } // namespace validation } // namespace test } // namespace arm_compute -- cgit v1.2.1