Function Descriptions
3.32 Multiplication of a Real Vector and a Complex Vector
Description:
This module multiplies a real vector and a complex vector.
Y
re
[i] = X[i] ∗ W
re
[i]
Y
im
[i] = X[i] ∗ W
im
[i]
Header File:
FPU.h
Declaration:
void mpy_SP_RVxCV(complex_float
*
y, const complex_float
*
w,
const float32
*
x, const Uint16 N)
Usage:
mpy_SP_RVxCV(y, x, c, N);
complex_float *y
result complex array
complex_float *w
input complex array
float32 *x
input real array
Uint16 N
length of w, x, and y arrays
The type “complex_float” is defined as
typedef struct{
float32 dat[2];
}complex_float;
Element dat[0] is the real part, dat[1] is the imaginary part.
Alignment Requirements:
None
Notes:
1. N must be at least 2
Example:
#include "FPU.h"
#define N 4
float32 x[N];
complex_float w[N], y[N];
main()
{
mpy_SP_RVxCV(y, w, x, N);
}
Benchmark Information:
Number of Cycles = 5*N + 15 cycles (including the call and return)
Sep 10, 2012 66