Lines Matching +full:- +full:a

1 /* ----------------------------------------------------------------------
4 * Description: Standard deviation of the elements of a Q31 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
41 @brief Standard deviation of the elements of a Q31 vector.
47 The function is implemented using an internal 64-bit accumulator.
49 which yields 1.23, and intermediate multiplication yields a 2.46 format.
51 but provides only a 16 guard bits.
55 … log2(blockSize)-8 bits, as a total of blockSize additions are performed internally.
57 … Finally, the 18.46 accumulator is right shifted by 15 bits to yield a 1.31 format value.
90 /* Loop unrolling: Compute 4 outputs at a time */ in arm_std_q31()
95 /* C = A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1] */ in arm_std_q31()
96 /* C = A[0] + A[1] + ... + A[blockSize-1] */ in arm_std_q31()
99 /* Compute sum of squares and store result in a temporary variable, sumOfSquares. */ in arm_std_q31()
101 /* Compute sum and store result in a temporary variable, sum. */ in arm_std_q31()
117 blkCnt--; in arm_std_q31()
132 /* C = A[0] * A[0] + A[1] * A[1] + ... + A[blockSize-1] * A[blockSize-1] */ in arm_std_q31()
133 /* C = A[0] + A[1] + ... + A[blockSize-1] */ in arm_std_q31()
136 /* Compute sum of squares and store result in a temporary variable, sumOfSquares. */ in arm_std_q31()
138 /* Compute sum and store result in a temporary variable, sum. */ in arm_std_q31()
142 blkCnt--; in arm_std_q31()
145 /* Compute Mean of squares and store result in a temporary variable, meanOfSquares. */ in arm_std_q31()
146 meanOfSquares = (sumOfSquares / (q63_t)(blockSize - 1U)); in arm_std_q31()
149 squareOfMean = ( sum * sum / (q63_t)(blockSize * (blockSize - 1U))); in arm_std_q31()
152 arm_sqrt_q31((meanOfSquares - squareOfMean) >> 15U, pResult); in arm_std_q31()