From 036f8c7c732ed50da3a349f1b5fb0c57e22d33fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89anna=20=C3=93=20Cath=C3=A1in?= Date: Wed, 1 Sep 2021 15:44:56 +0100 Subject: MLECO-2226 Fix for for loop in complex magnitude calculation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id5c09851d4377cc52039a4988df93cfd84dab9c0 Signed-off-by: Éanna Ó Catháin --- source/application/main/PlatformMath.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/application/main/PlatformMath.cc b/source/application/main/PlatformMath.cc index 9d18151..0043635 100644 --- a/source/application/main/PlatformMath.cc +++ b/source/application/main/PlatformMath.cc @@ -182,7 +182,7 @@ namespace math { #if ARM_DSP_AVAILABLE arm_cmplx_mag_squared_f32(ptrSrc, ptrDst, srcLen/2); #else /* ARM_DSP_AVAILABLE */ - for (uint32_t j = 0; j < srcLen; ++j) { + for (uint32_t j = 0; j < srcLen/2; ++j) { const float real = *ptrSrc++; const float im = *ptrSrc++; *ptrDst++ = real*real + im*im; -- cgit v1.2.1