diff options
author | Usama Arif <usama.arif@arm.com> | 2019-05-20 13:44:34 +0100 |
---|---|---|
committer | Usama Arif <usama.arif@arm.com> | 2019-05-22 15:13:21 +0000 |
commit | 28f0dd99fba11ed9b7165eca17d801bdfb421576 (patch) | |
tree | cb8bb464cdcea9946179ccf8add3158e50eefa48 /src/runtime/NEON/functions/NEReductionOperation.cpp | |
parent | a4a08ad5e33867f9938a3fbaf9b6dcc56ad8f7b5 (diff) | |
download | ComputeLibrary-28f0dd99fba11ed9b7165eca17d801bdfb421576.tar.gz |
COMPMID-2279: Implement REDUCE_MAX operator for NEON
Change-Id: Iccd25b8aab1dd871c0d86ec3816b1cbf48370066
Signed-off-by: Usama Arif <usama.arif@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1193
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Pablo Marquez <pablo.tello@arm.com>
Diffstat (limited to 'src/runtime/NEON/functions/NEReductionOperation.cpp')
-rw-r--r-- | src/runtime/NEON/functions/NEReductionOperation.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
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<float>::max()); + break; + } + case DataType::F16: + { + pixelValue = PixelValue(static_cast<half>(-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: |