Sum
SSE2
FwStatus | fwsSum_32f | ( | const Fw32f * pSrc, int len, Fw32f * pSum, FwHintAlgorithm hint ); | |
FwStatus | fwsSum_32fc | ( | const Fw32fc * pSrc, int len, Fw32fc * pSum, FwHintAlgorithm hint ); | |
FwStatus | fwsSum_64f | ( | const Fw64f * pSrc, int len, Fw64f * pSum ); | |
FwStatus | fwsSum_64fc | ( | const Fw64fc * pSrc, int len, Fw64fc * pSum ); | |
FwStatus | fwsSum_16s_Sfs | ( | const Fw16s * pSrc, int len, Fw16s * pSum, int scaleFactor ); | |
FwStatus | fwsSum_32s_Sfs | ( | const Fw32s * pSrc, int len, Fw32s * pSum, int scaleFactor ); | |
FwStatus | fwsSum_16s32s_Sfs | ( | const Fw16s * pSrc, int len, Fw32s * pSum, int scaleFactor ); | |
FwStatus | fwsSum_16sc_Sfs | ( | const Fw16sc * pSrc, int len, Fw16sc * pSum, int scaleFactor ); | |
FwStatus | fwsSum_16sc32sc_Sfs | ( | const Fw16sc * pSrc, int len, Fw32sc * pSum, 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. | |
pSum | Pointer to the destination buffer that contains the sum of all the elements 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 sum of the elements, and write the result to a location specified by a pointer.
The following formula is used.
Sum = ((n = 0) - (len-1)) Sum(pSrc[n])
The 16-bit signed and signed complex and 32-bit signed versions perform an integer scaling operation on the result.