CMSIS-DSP
Version 1.9.0
CMSIS DSP Software Library
|
Functions | |
void | arm_std_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult) |
Standard deviation of the elements of a floating-point vector. More... | |
void | arm_std_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult) |
Standard deviation of the elements of a floating-point vector. More... | |
void | arm_std_q15 (const q15_t *pSrc, uint32_t blockSize, q15_t *pResult) |
Standard deviation of the elements of a Q15 vector. More... | |
void | arm_std_q31 (const q31_t *pSrc, uint32_t blockSize, q31_t *pResult) |
Standard deviation of the elements of a Q31 vector. More... | |
Calculates the standard deviation of the elements in the input vector.
The float implementation is relying on arm_var_f32 which is using a two-pass algorithm to avoid problem of numerical instabilities and cancellation errors.
Fixed point versions are using the standard textbook algorithm since the fixed point numerical behavior is different from the float one.
Algorithm for fixed point versions is summarized below:
Result = sqrt((sumOfSquares - sum2 / blockSize) / (blockSize - 1))
sumOfSquares = pSrc[0] * pSrc[0] + pSrc[1] * pSrc[1] + ... + pSrc[blockSize-1] * pSrc[blockSize-1] sum = pSrc[0] + pSrc[1] + pSrc[2] + ... + pSrc[blockSize-1]
There are separate functions for floating point, Q31, and Q15 data types.
void arm_std_f16 | ( | const float16_t * | pSrc, |
uint32_t | blockSize, | ||
float16_t * | pResult | ||
) |
[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | standard deviation value returned here |
[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | standard deviation value returned here |
[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | standard deviation value returned here |
[in] | pSrc | points to the input vector. |
[in] | blockSize | number of samples in input vector. |
[out] | pResult | standard deviation value returned here. |