From ee939fb58e3fc50ae7c92c895f8abd1dd9f20eb3 Mon Sep 17 00:00:00 2001 From: Luca Foschiani Date: Tue, 28 Jan 2020 10:38:07 +0000 Subject: COMPMID-2774: Add support for QASYMM8_SIGNED in NEReductionOperation, NEReduceMean and NEArgMinMaxLayer Signed-off-by: Luca Foschiani Change-Id: Icf198a983c8ce2c6cd8451a1190bb99115eac3af Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2652 Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Reviewed-by: Giorgio Arena Comments-Addressed: Arm Jenkins --- .../NEON/functions/NEReductionOperation.cpp | 46 +--------------------- 1 file changed, 2 insertions(+), 44 deletions(-) (limited to 'src/runtime/NEON/functions/NEReductionOperation.cpp') diff --git a/src/runtime/NEON/functions/NEReductionOperation.cpp b/src/runtime/NEON/functions/NEReductionOperation.cpp index 9d29ee007c..80ebe6731a 100644 --- a/src/runtime/NEON/functions/NEReductionOperation.cpp +++ b/src/runtime/NEON/functions/NEReductionOperation.cpp @@ -142,54 +142,12 @@ void NEReductionOperation::configure(ITensor *input, ITensor *output, unsigned i } case ReductionOperation::MIN: { - 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 = std::get<1>(get_min_max(input->info()->data_type())); - break; - } - default: - { - ARM_COMPUTE_ERROR("Unsupported DataType"); - } - } + pixelValue = std::get<1>(get_min_max(input->info()->data_type())); 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 = std::get<0>(get_min_max(input->info()->data_type())); - break; - } - default: - { - ARM_COMPUTE_ERROR("Unsupported DataType"); - } - } + pixelValue = std::get<0>(get_min_max(input->info()->data_type())); break; } case ReductionOperation::ARG_IDX_MAX: -- cgit v1.2.1