1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #27055 from hanliutong:UI-loop-condition

Fix some vectorized loop conditions.
This commit is contained in:
Alexander Smorkalov
2025-03-13 14:12:30 +03:00
committed by GitHub
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -2544,7 +2544,7 @@ double dotProd_32s(const int* src1, const int* src2, int len)
#if CV_SIMD_WIDTH == 16
const int wstep = step * 2;
v_float64 v_sum1 = vx_setzero_f64();
for (; i < len - wstep; i += wstep, src1 += wstep, src2 += wstep)
for (; i <= len - wstep; i += wstep, src1 += wstep, src2 += wstep)
{
v_int32 v_src10 = vx_load(src1);
v_int32 v_src20 = vx_load(src2);
@@ -2555,7 +2555,7 @@ double dotProd_32s(const int* src1, const int* src2, int len)
}
v_sum0 = v_add(v_sum0, v_sum1);
#endif
for (; i < len - step; i += step, src1 += step, src2 += step)
for (; i <= len - step; i += step, src1 += step, src2 += step)
{
v_int32 v_src1 = vx_load(src1);
v_int32 v_src2 = vx_load(src2);