Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: cmsis_dsp/StatisticsFunctions/arm_std_f32.c
- Revision:
- 5:3762170b6d4d
- Parent:
- 3:7a284390b0ce
--- a/cmsis_dsp/StatisticsFunctions/arm_std_f32.c Mon Jun 23 09:30:09 2014 +0100
+++ b/cmsis_dsp/StatisticsFunctions/arm_std_f32.c Fri Nov 20 08:45:18 2015 +0000
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------
-* Copyright (C) 2010-2013 ARM Limited. All rights reserved.
+* Copyright (C) 2010-2014 ARM Limited. All rights reserved.
*
-* $Date: 17. January 2013
-* $Revision: V1.4.1
+* $Date: 19. March 2015
+* $Revision: V.1.4.5
*
* Project: CMSIS DSP Library
* Title: arm_std_f32.c
@@ -86,13 +86,19 @@
float32_t sumOfSquares = 0.0f; /* Sum of squares */
float32_t in; /* input value */
uint32_t blkCnt; /* loop counter */
-
+
#ifndef ARM_MATH_CM0_FAMILY
/* Run the below code for Cortex-M4 and Cortex-M3 */
float32_t meanOfSquares, mean, squareOfMean;
+ if(blockSize == 1)
+ {
+ *pResult = 0;
+ return;
+ }
+
/*loop Unrolling */
blkCnt = blockSize >> 2u;
@@ -158,6 +164,12 @@
float32_t squareOfSum; /* Square of Sum */
float32_t var; /* Temporary varaince storage */
+ if(blockSize == 1)
+ {
+ *pResult = 0;
+ return;
+ }
+
/* Loop over blockSize number of values */
blkCnt = blockSize;