Lines Matching +full:- +full:a

1 /* ----------------------------------------------------------------------
4 * Description: Variance of the elements of a floating-point vector
9 * Target Processor: Cortex-M and Cortex-A cores
10 * -------------------------------------------------------------------- */
12 * Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved.
14 * SPDX-License-Identifier: Apache-2.0
18 * You may obtain a copy of the License at
20 * www.apache.org/licenses/LICENSE-2.0
39 The underlying algorithm used is the direct method sometimes referred to as the two-pass method:
42 Result = sum(element - meanOfElements)^2) / numElement - 1
44 … meanOfElements = ( pSrc[0] * pSrc[0] + pSrc[1] * pSrc[1] + ... + pSrc[blockSize-1] ) / blockSize
56 @brief Variance of the elements of a floating-point vector.
84 /* Compute 4 outputs at a time */ in arm_var_f32()
96 blkCnt --; in arm_var_f32()
108 in = *pSrc++ - fMean; in arm_var_f32()
112 blkCnt--; in arm_var_f32()
116 *pResult = sum / (float32_t) (blockSize - 1); in arm_var_f32()
141 /* Compute 4 outputs at a time. in arm_var_f32()
142 ** a second loop below computes the remaining 1 to 3 samples. */ in arm_var_f32()
145 /* C = A[0] * A[0] + A[1] * A[1] + A[2] * A[2] + ... + A[blockSize-1] * A[blockSize-1] */ in arm_var_f32()
146 /* Compute Power and then store the result in a temporary variable, sum. */ in arm_var_f32()
153 blkCnt--; in arm_var_f32()
159 /* If the blockSize is not a multiple of 4, compute any remaining output samples here. in arm_var_f32()
165 /* C = A[0] * A[0] + A[1] * A[1] + A[2] * A[2] + ... + A[blockSize-1] * A[blockSize-1] */ in arm_var_f32()
166 /* compute power and then store the result in a temporary variable, sum. */ in arm_var_f32()
168 in = in - mean; in arm_var_f32()
172 blkCnt--; in arm_var_f32()
176 *pResult = sum / (float32_t)(blockSize - 1.0f); in arm_var_f32()
200 /* Loop unrolling: Compute 4 outputs at a time */ in arm_var_f32()
205 /* C = (A[0] + A[1] + A[2] + ... + A[blockSize-1]) */ in arm_var_f32()
214 blkCnt--; in arm_var_f32()
229 /* C = (A[0] + A[1] + A[2] + ... + A[blockSize-1]) */ in arm_var_f32()
234 blkCnt--; in arm_var_f32()
237 /* C = (A[0] + A[1] + A[2] + ... + A[blockSize-1]) / blockSize */ in arm_var_f32()
244 /* Loop unrolling: Compute 4 outputs at a time */ in arm_var_f32()
249 fValue = *pInput++ - fMean; in arm_var_f32()
252 fValue = *pInput++ - fMean; in arm_var_f32()
255 fValue = *pInput++ - fMean; in arm_var_f32()
258 fValue = *pInput++ - fMean; in arm_var_f32()
262 blkCnt--; in arm_var_f32()
277 fValue = *pInput++ - fMean; in arm_var_f32()
281 blkCnt--; in arm_var_f32()
285 *pResult = fSum / (float32_t)(blockSize - 1.0f); in arm_var_f32()