From 28f0dd99fba11ed9b7165eca17d801bdfb421576 Mon Sep 17 00:00:00 2001 From: Usama Arif Date: Mon, 20 May 2019 13:44:34 +0100 Subject: COMPMID-2279: Implement REDUCE_MAX operator for NEON Change-Id: Iccd25b8aab1dd871c0d86ec3816b1cbf48370066 Signed-off-by: Usama Arif Reviewed-on: https://review.mlplatform.org/c/1193 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Pablo Marquez --- .../NEON/functions/NEReductionOperation.cpp | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/runtime/NEON') diff --git a/src/runtime/NEON/functions/NEReductionOperation.cpp b/src/runtime/NEON/functions/NEReductionOperation.cpp index 81bb32f5dc..dc6cf59019 100644 --- a/src/runtime/NEON/functions/NEReductionOperation.cpp +++ b/src/runtime/NEON/functions/NEReductionOperation.cpp @@ -112,6 +112,32 @@ void NEReductionOperation::configure(ITensor *input, ITensor *output, unsigned i } break; } + case ReductionOperation::MAX: + { + switch(input->info()->data_type()) + { + case DataType::F32: + { + pixelValue = PixelValue(-std::numeric_limits::max()); + break; + } + case DataType::F16: + { + pixelValue = PixelValue(static_cast(-65504.0f)); + break; + } + case DataType::QASYMM8: + { + pixelValue = PixelValue(0, input->info()->data_type(), input->info()->quantization_info()); + break; + } + default: + { + ARM_COMPUTE_ERROR("Unsupported DataType"); + } + } + break; + } case ReductionOperation::ARG_IDX_MAX: case ReductionOperation::ARG_IDX_MIN: case ReductionOperation::MEAN_SUM: -- cgit v1.2.1