From bcf8a968da4b26926df8bb770df16d82146bcb54 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Fri, 12 Oct 2018 10:51:31 +0100 Subject: COMPMID-1580 Implement ReduceMean in NEON Change-Id: Id974efad304c2513b8824a6561ad45ee60b9e7fb Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/153763 Reviewed-by: Giuseppe Rossini Reviewed-by: Isabella Gottardi Tested-by: bsgcomp --- tests/validation/reference/ReductionOperation.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/validation/reference/ReductionOperation.cpp') diff --git a/tests/validation/reference/ReductionOperation.cpp b/tests/validation/reference/ReductionOperation.cpp index 11947bd293..499263f11e 100644 --- a/tests/validation/reference/ReductionOperation.cpp +++ b/tests/validation/reference/ReductionOperation.cpp @@ -76,7 +76,7 @@ template SimpleTensor reduction_operation(const SimpleTensor &src, const TensorShape &dst_shape, unsigned int axis, ReductionOperation op) { // Create reference - SimpleTensor dst{ dst_shape, src.data_type() }; + SimpleTensor dst{ dst_shape, src.data_type(), 1, src.quantization_info() }; const unsigned int src_width = src.shape().x(); const unsigned int src_height = src.shape().y(); const unsigned int src_depth = src.shape().z(); @@ -102,7 +102,7 @@ SimpleTensor reduction_operation(const SimpleTensor &src, const TensorShap { res /= src_width; } - dst[du] = static_cast(res); + dst[du] = saturate_cast(res); } else { @@ -136,7 +136,7 @@ SimpleTensor reduction_operation(const SimpleTensor &src, const TensorShap { res /= src_height; } - dst[du * src_width + x] = static_cast(res); + dst[du * src_width + x] = saturate_cast(res); } else { @@ -175,7 +175,7 @@ SimpleTensor reduction_operation(const SimpleTensor &src, const TensorShap { res /= src_depth; } - dst[du * src_width * src_height + y * src_width + x] = static_cast(res); + dst[du * src_width * src_height + y * src_width + x] = saturate_cast(res); } else { @@ -218,7 +218,7 @@ SimpleTensor reduction_operation(const SimpleTensor &src, const TensorShap res /= src_batch; } - dst[du * src_depth * src_height * src_width + z * src_width * src_height + y * src_width + x] = static_cast(res); + dst[du * src_depth * src_height * src_width + z * src_width * src_height + y * src_width + x] = saturate_cast(res); } else { -- cgit v1.2.1