aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/kernels/CpuDepthwiseConv2dNativeKernel.cpp
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2021-08-26 14:11:44 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2021-09-01 09:02:01 +0000
commitc89998fa843de85d6f107e4b346f3490a188367a (patch)
tree5c091b122a8d70b45239b52b891f25353dc1926e /src/cpu/kernels/CpuDepthwiseConv2dNativeKernel.cpp
parent7891a73ef36f4ad7b71069b3c57694f85bb79454 (diff)
downloadComputeLibrary-c89998fa843de85d6f107e4b346f3490a188367a.tar.gz
Fix strict overflow warnings
Resolves COMPMID-2138 Change-Id: I5587fe53ec99d164413cde1809d1791bf909b8df Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6171 Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/cpu/kernels/CpuDepthwiseConv2dNativeKernel.cpp')
-rw-r--r--src/cpu/kernels/CpuDepthwiseConv2dNativeKernel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cpu/kernels/CpuDepthwiseConv2dNativeKernel.cpp b/src/cpu/kernels/CpuDepthwiseConv2dNativeKernel.cpp
index d79fe87d1b..d09cc1debf 100644
--- a/src/cpu/kernels/CpuDepthwiseConv2dNativeKernel.cpp
+++ b/src/cpu/kernels/CpuDepthwiseConv2dNativeKernel.cpp
@@ -78,7 +78,7 @@ struct DepthwiseConvolutionRunInfo
x_start(w.x().start()),
x_end(w.x().end()),
x_step(static_cast<uint32_t>(num_read_elements_per_iteration * depth_multiplier)),
- x_leftover_start(std::max(static_cast<int32_t>(w.x().end()) - static_cast<int32_t>(x_step) + 1, int32_t(0))),
+ x_leftover_start(std::max(static_cast<int32_t>(w.x().end() + 1) - static_cast<int32_t>(x_step), int32_t(0))),
input_stride_y(input.strides_in_bytes().y()),
input_stride_z(input.strides_in_bytes().z()),
input_max_offset(input.strides_in_bytes().z() * input.dimension(height_idx) - (input.padding().bottom + input.padding().top) * input.strides_in_bytes().y()),