Standard deviation
SSE2
FwStatus | fwsStdDev_32f | ( | const Fw32f * pSrc, int len, Fw32f * pStdDev, FwHintAlgorithm hint ); | |
FwStatus | fwsStdDev_64f | ( | const Fw64f * pSrc, int len, Fw64f * pStdDev ); | |
FwStatus | fwsStdDev_16s32s_Sfs | ( | const Fw16s * pSrc, int len, Fw32s * pStdDev, int scaleFactor ); | |
FwStatus | fwsStdDev_16s_Sfs | ( | const Fw16s * pSrc, int len, Fw16s * pStdDev, int scaleFactor ); |
hint | Hints whether to choose a fast or accurate computation algorithm. | |
len | Specifies the number of elements in a buffer. | |
pSrc | Pointer to a source buffer. | |
pStdDev | Pointer to the destination buffer that contains the standard deviation of the values in the source buffer. | |
scaleFactor | Specifies an integer scaling factor for the Sfs operation. The returned result is multiplied by 2^(-scaleFactor). |
These functions step through vector elements in a source buffer, calculate the standard deviation of the elements, and write the result to a location specified by a pointer.
The following formula is used.
StdDev = Sqrt(((n = 0) - (len-1)) Sum(Square(pSrc[n]-pMean))/len-1)
The 16-bit signed versions perform an integer scaling operation on the result.