Daniel Konegen / MNIST_example

Dependencies:   mbed-os

Embed: (wiki syntax)

« Back to documentation index

Mean

Functions

void arm_mean_q15 (q15_t *pSrc, uint32_t blockSize, q15_t *pResult)
 Mean value of a Q15 vector.

Function Documentation

void arm_mean_q15 ( q15_t *  pSrc,
uint32_t  blockSize,
q15_t *  pResult 
)

Mean value of a Q15 vector.

Parameters:
[in]*pSrcpoints to the input vector
[in]blockSizelength of the input vector
[out]*pResultmean value returned here
Returns:
none.

Scaling and Overflow Behavior:

The function is implemented using a 32-bit internal accumulator. The input is represented in 1.15 format and is accumulated in a 32-bit accumulator in 17.15 format. There is no risk of internal overflow with this approach, and the full precision of intermediate result is preserved. Finally, the accumulator is saturated and truncated to yield a result of 1.15 format.

Definition at line 60 of file arm_mean_q15.c.