Function

vDSP_dotpr2_s1_15

Calculates the dot product of a fixed-point 1.15 format, stereo vector.

Parameters

__A0

Input vector A0.

__IA0

The stride within vector A0.

__A1

Input vector A1.

__IA1

The stride within vector A1.

__B

Input vector B.

__IB

The stride within vector B.

__C0

Pointer to an allocated variable of type short; on return, it contains the dot product of A0 and B.

__C1

Pointer to an allocated variable of type short; on return, it contains the dot product of A1 and B.

__N

The number of elements.

Discussion

The functions in this group calculate the dot product of two vectors, using the following operation:

The following example shows how you calculate the luminosity of a color using the Rec. 709 luma coefficients for the color-to-grayscale conversion. Array a defines the color, 0xDa70D6, and array b defines the coefficients:

Passing these values to vDSP_dotpr calculates the luminosity and writes the result to c:

Dot Product Calculation

vDSP_dotpr

Calculates the dot product of a single-precision vector.

vDSP_dotprD

Calculates the dot product of a double-precision vector.

vDSP_dotpr_s1_15

Calculates the dot product of a fixed-point 1.15 format vector.

vDSP_dotpr_s8_24

Calculates the dot product of a fixed-point 8.24 format vector.

vDSP_dotpr2

Calculates the dot product of a single-precision stereo vector.

vDSP_dotpr2D

Calculates the dot product of a double-precision stereo vector.

vDSP_dotpr2_s8_24

Calculates the dot product of a fixed-point 8.24 format, stereo vector.

vDSP_zdotpr

Calculates the complex dot product of two single-precision complex vectors.

vDSP_zdotprD

Calculates the complex dot product of two double-precision complex vectors.

vDSP_zidotpr

Calculates the inner (conjugate) product of a single-precision complex vector.

vDSP_zidotprD

Calculates the inner (conjugate) product of a double-precision complex vector.

vDSP_zrdotpr

Calculates the dot product of a single-precision complex-real vector.

vDSP_zrdotprD

Calculates the dot product of a double-precision complex-real vector.