aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/Utils.h
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2019-12-12 16:16:09 +0000
committerMichalis Spyrou <michalis.spyrou@arm.com>2019-12-19 16:58:40 +0000
commite7be8a072967f9ae547468a7625e11477ea32221 (patch)
tree1ea27ef9ac9d4896decfac4e5431e80ec84e3885 /arm_compute/core/Utils.h
parent62bdd8c4d605d75214ac3ca674cd647911ea9bbc (diff)
downloadComputeLibrary-e7be8a072967f9ae547468a7625e11477ea32221.tar.gz
COMPMID-2980 (Nightly) armv7a build failures
Change-Id: I8c2a20fc345694d1ad6e0fe63e4f22fb73e6c1df Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-on: https://review.mlplatform.org/c/2463 Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/Utils.h')
-rw-r--r--arm_compute/core/Utils.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/arm_compute/core/Utils.h b/arm_compute/core/Utils.h
index c11fffec97..18c5471f8f 100644
--- a/arm_compute/core/Utils.h
+++ b/arm_compute/core/Utils.h
@@ -557,15 +557,15 @@ inline DataType get_promoted_data_type(DataType dt)
*/
inline std::tuple<PixelValue, PixelValue> get_min_max(DataType dt)
{
- PixelValue min(0);
- PixelValue max(0);
+ PixelValue min{};
+ PixelValue max{};
switch(dt)
{
case DataType::U8:
case DataType::QASYMM8:
{
- min = PixelValue(std::numeric_limits<uint8_t>::lowest());
- max = PixelValue(std::numeric_limits<uint8_t>::max());
+ min = PixelValue(static_cast<int32_t>(std::numeric_limits<uint8_t>::lowest()));
+ max = PixelValue(static_cast<int32_t>(std::numeric_limits<uint8_t>::max()));
break;
}
case DataType::S8:
@@ -573,22 +573,22 @@ inline std::tuple<PixelValue, PixelValue> get_min_max(DataType dt)
case DataType::QASYMM8_SIGNED:
case DataType::QSYMM8_PER_CHANNEL:
{
- min = PixelValue(std::numeric_limits<int8_t>::lowest());
- max = PixelValue(std::numeric_limits<int8_t>::max());
+ min = PixelValue(static_cast<int32_t>(std::numeric_limits<int8_t>::lowest()));
+ max = PixelValue(static_cast<int32_t>(std::numeric_limits<int8_t>::max()));
break;
}
case DataType::U16:
case DataType::QASYMM16:
{
- min = PixelValue(std::numeric_limits<uint16_t>::lowest());
- max = PixelValue(std::numeric_limits<uint16_t>::max());
+ min = PixelValue(static_cast<int32_t>(std::numeric_limits<uint16_t>::lowest()));
+ max = PixelValue(static_cast<int32_t>(std::numeric_limits<uint16_t>::max()));
break;
}
case DataType::S16:
case DataType::QSYMM16:
{
- min = PixelValue(std::numeric_limits<int16_t>::lowest());
- max = PixelValue(std::numeric_limits<int16_t>::max());
+ min = PixelValue(static_cast<int32_t>(std::numeric_limits<int16_t>::lowest()));
+ max = PixelValue(static_cast<int32_t>(std::numeric_limits<int16_t>::max()));
break;
}
case DataType::U32: