From 41d886cecd6478725e9d0da93af7de5847efca1e Mon Sep 17 00:00:00 2001 From: Pablo Marquez Tello Date: Thu, 30 Sep 2021 13:56:17 +0100 Subject: Fixed the compiler warning -Werror=type-limits * Comparison is always false due to limited range of data type. rescale_value is truncated to int32_t and then is compared agains (1ll <<31) which will be always false * Resolves MLCE-508 Change-Id: I252f64d4aec8f3e120d71fc5e40c7665816173ac Signed-off-by: Pablo Marquez Tello Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6342 Tested-by: Arm Jenkins Reviewed-by: Giorgio Arena Reviewed-by: Gunes Bayir Comments-Addressed: Arm Jenkins --- src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp') diff --git a/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp b/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp index 8d1a8698c3..57fa11151b 100644 --- a/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp +++ b/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp @@ -275,11 +275,11 @@ class DepthwiseDepthfirst : public DepthwiseCommon for (int start_out_j = 0; start_out_j < static_cast(output_width);) { const int start_in_j = start_out_j * m_strat->get_stride_cols() - this->m_args.padding.left; - const int pad_left = -std::min(0, start_in_j); + int pad_left = std::min(0, start_in_j); // Compute how many output tiles we can compute with the direct kernel. int n_direct_tiles = 0; - if (!pad_top && !pad_bottom && !pad_left) + if (!pad_top && !pad_bottom && !pad_left) { // Determine the maximum number of tiles we could handle. n_direct_tiles = (output_width - start_out_j) / m_strat->get_output_cols(); @@ -323,7 +323,7 @@ class DepthwiseDepthfirst : public DepthwiseCommon end_out_j - start_out_j, static_cast(output_width) - start_out_j ); - + pad_left *= -1; // Construct the input pointer array - fill the array with pointers to // the input buffer and then fill in the required values. for (auto i = pad_top; i < m_strat->get_input_rows() - pad_bottom; i++) -- cgit v1.2.1