DotProd

Dot Product

Supported Technologies

SSE2

Synopsis

FwStatus   fwsDotProd_16s32f ( const Fw16s * pSrc1const Fw16s * pSrc2int lenFw32f * pDp );
FwStatus   fwsDotProd_16s64s ( const Fw16s * pSrc1const Fw16s * pSrc2int lenFw64s * pDp );
FwStatus   fwsDotProd_16s16sc64sc ( const Fw16s * pSrc1const Fw16sc * pSrc2int lenFw64sc * pDp );
FwStatus   fwsDotProd_16s16sc32fc ( const Fw16s * pSrc1const Fw16sc * pSrc2int lenFw32fc * pDp );
FwStatus   fwsDotProd_32f ( const Fw32f * pSrc1const Fw32f * pSrc2int lenFw32f * pDp );
FwStatus   fwsDotProd_32f64f ( const Fw32f * pSrc1const Fw32f * pSrc2int lenFw64f * pDp );
FwStatus   fwsDotProd_32f32fc ( const Fw32f * pSrc1const Fw32fc * pSrc2int lenFw32fc * pDp );
FwStatus   fwsDotProd_32f32fc64fc ( const Fw32f * pSrc1const Fw32fc * pSrc2int lenFw64fc * pDp );
FwStatus   fwsDotProd_64f ( const Fw64f * pSrc1const Fw64f * pSrc2int lenFw64f * pDp );
FwStatus   fwsDotProd_64f64fc ( const Fw64f * pSrc1const Fw64fc * pSrc2int lenFw64fc * pDp );
FwStatus   fwsDotProd_16sc64sc ( const Fw16sc * pSrc1const Fw16sc * pSrc2int lenFw64sc * pDp );
FwStatus   fwsDotProd_16sc32fc ( const Fw16sc * pSrc1const Fw16sc * pSrc2int lenFw32fc * pDp );
FwStatus   fwsDotProd_32fc ( const Fw32fc * pSrc1const Fw32fc * pSrc2int lenFw32fc * pDp );
FwStatus   fwsDotProd_32fc64fc ( const Fw32fc * pSrc1const Fw32fc * pSrc2int lenFw64fc * pDp );
FwStatus   fwsDotProd_64fc ( const Fw64fc * pSrc1const Fw64fc * pSrc2int lenFw64fc * pDp );
FwStatus   fwsDotProd_16s_Sfs ( const Fw16s * pSrc1const Fw16s * pSrc2int lenFw16s * pDpint scaleFactor );
FwStatus   fwsDotProd_16s32s_Sfs ( const Fw16s * pSrc1const Fw16s * pSrc2int lenFw32s * pDpint scaleFactor );
FwStatus   fwsDotProd_16s16sc32sc_Sfs ( const Fw16s * pSrc1const Fw16sc * pSrc2int lenFw32sc * pDpint scaleFactor );
FwStatus   fwsDotProd_16s32s32s_Sfs ( const Fw16s * pSrc1const Fw32s * pSrc2int lenFw32s * pDpint scaleFactor );
FwStatus   fwsDotProd_16s16sc_Sfs ( const Fw16s * pSrc1const Fw16sc * pSrc2int lenFw16sc * pDpint scaleFactor );
FwStatus   fwsDotProd_32s_Sfs ( const Fw32s * pSrc1const Fw32s * pSrc2int lenFw32s * pDpint scaleFactor );
FwStatus   fwsDotProd_32s32sc_Sfs ( const Fw32s * pSrc1const Fw32sc * pSrc2int lenFw32sc * pDpint scaleFactor );
FwStatus   fwsDotProd_16sc_Sfs ( const Fw16sc * pSrc1const Fw16sc * pSrc2int lenFw16sc * pDpint scaleFactor );
FwStatus   fwsDotProd_16sc32sc_Sfs ( const Fw16sc * pSrc1const Fw16sc * pSrc2int lenFw32sc * pDpint scaleFactor );
FwStatus   fwsDotProd_32sc_Sfs ( const Fw32sc * pSrc1const Fw32sc * pSrc2int lenFw32sc * pDpint scaleFactor );

Parameters

len   Specifies the number of elements in a buffer.
pDp   Pointer to the destination buffer that contains the dot product of the source buffers.
pSrc1   Pointer to source buffer one.
pSrc2   Pointer to source buffer two.
scaleFactor   Specifies an integer scaling factor for the Sfs operation. The returned result is multiplied by 2^(-scaleFactor).

Description

These functions step through vector elements in two buffers, calculate the dot product of the vectors, and write the result to a location specified by a pointer.

The following formula is used.

 DotProduct = ((n = 0) - (len-1)) Sum(pSrc1[n]  *pSrc2[n])

There are 16-bit and 32-bit signed and signed complex versions that perform an integer scaling operation on the result.