From fd1a8d82f6ffef540df69b6ae7b746c89fcef6e6 Mon Sep 17 00:00:00 2001 From: Oskar Weigl Date: Thu, 27 Sep 2018 22:12:18 -0700 Subject: [PATCH] restore unrelated changes inadvertently reverted due to bad commit separation --- .../FilteringFunctions/arm_conv_partial_f32.c | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/Source/FilteringFunctions/arm_conv_partial_f32.c b/Source/FilteringFunctions/arm_conv_partial_f32.c index 60140ff5..f3b15b4a 100644 --- a/Source/FilteringFunctions/arm_conv_partial_f32.c +++ b/Source/FilteringFunctions/arm_conv_partial_f32.c @@ -420,7 +420,14 @@ arm_status arm_conv_partial_f32( count += 4U; /* Update the inputA and inputB pointers for next MAC calculation */ - px = pIn1 + count; + if ((int32_t)firstIndex - (int32_t)srcBLen + 1 > 0) + { + px = pIn1 + firstIndex - srcBLen + 1 + count; + } + else + { + px = pIn1 + count; + } py = pSrc2; /* Decrement the loop counter */ @@ -473,7 +480,14 @@ arm_status arm_conv_partial_f32( count++; /* Update the inputA and inputB pointers for next MAC calculation */ - px = pIn1 + count; + if ((int32_t)firstIndex - (int32_t)srcBLen + 1 > 0) + { + px = pIn1 + firstIndex - srcBLen + 1 + count; + } + else + { + px = pIn1 + count; + } py = pSrc2; /* Decrement the loop counter */ @@ -510,7 +524,14 @@ arm_status arm_conv_partial_f32( count++; /* Update the inputA and inputB pointers for next MAC calculation */ - px = pIn1 + count; + if ((int32_t)firstIndex - (int32_t)srcBLen + 1 > 0) + { + px = pIn1 + firstIndex - srcBLen + 1 + count; + } + else + { + px = pIn1 + count; + } py = pSrc2; /* Decrement the loop counter */