Packed-Data Processing on the ’C64x
8-16
Figure 8–9. Graphical Representation of Dot Product
Item 0
Item 1
Item n
Item 2
Item 1
Item 0
Item 2
Item n
. . .
. . .
Input A
Input B
sum
multiply
multiply
multiply
multiply
As you can see, this does not fit the pure vector model presented in
Example 8–3. The Vector Complex Multiply also does not fit the pure vector
model, but for different reasons.
Mathematically, the vector complex multiply is a pure vector operation per-
formed on vectors of complex numbers, as its name implies. However, it is not,
in implementation, because neither the language type nor the hardware itself
directly supports a complex multiply as a single operation.
The complex multiply is built up from a number of real multiplies, with the com-
plex numbers stored in arrays of interleaved real and imaginary values. As a
result, the code requires a mix of vector and non–vector approaches to be opti-
mized. Figure 8–10 illustrates the operations that are performed on a single
iteration of the loop. As you can see, there is a lot going on in this loop.