arm_compute v19.08
diff --git a/src/runtime/CL/functions/CLReductionOperation.cpp b/src/runtime/CL/functions/CLReductionOperation.cpp
index 9f99d2d..38f0a75 100644
--- a/src/runtime/CL/functions/CLReductionOperation.cpp
+++ b/src/runtime/CL/functions/CLReductionOperation.cpp
@@ -105,6 +105,16 @@
intermediate_kernel_op = ReductionOperation::PROD;
last_kernel_op = ReductionOperation::PROD;
break;
+ case ReductionOperation::MIN:
+ first_kernel_op = ReductionOperation::MIN;
+ intermediate_kernel_op = ReductionOperation::MIN;
+ last_kernel_op = ReductionOperation::MIN;
+ break;
+ case ReductionOperation::MAX:
+ first_kernel_op = ReductionOperation::MAX;
+ intermediate_kernel_op = ReductionOperation::MAX;
+ last_kernel_op = ReductionOperation::MAX;
+ break;
default:
ARM_COMPUTE_ERROR("Not supported");
}
@@ -179,6 +189,60 @@
last_kernel_op = ReductionOperation::PROD;
pixelValue = PixelValue(1, input->info()->data_type());
break;
+ case ReductionOperation::MIN:
+ first_kernel_op = ReductionOperation::MIN;
+ intermediate_kernel_op = ReductionOperation::MIN;
+ last_kernel_op = ReductionOperation::MIN;
+ 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(255, input->info()->data_type(), input->info()->quantization_info());
+ break;
+ }
+ default:
+ {
+ ARM_COMPUTE_ERROR("Unsupported DataType");
+ }
+ }
+ break;
+ case ReductionOperation::MAX:
+ first_kernel_op = ReductionOperation::MAX;
+ intermediate_kernel_op = ReductionOperation::MAX;
+ last_kernel_op = 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;
default:
ARM_COMPUTE_ERROR("Not supported");
}