Function Descriptions
3.24 Mean of Real and Imaginary Parts of a Complex Vector
Description:
This module calculates the mean of real and imaginary parts of a complex vector.
Y
re
=
ΣX
re
N
Y
im
=
ΣX
im
N
Header File:
FPU.h
Declaration:
complex_float mean_SP_CV_2(const complex_float
*
x, const Uint16 N)
Usage:
y = mean_SP_CV_2(x, N);
complex_float *x
input complex array
Uint16 N
length of x array
complex_float y
result
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 EVEN and a minimum of 4.
Example:
#include "FPU.h"
#define N 4
complex_float y;
complex_float x[N];
main()
{
y = mean_SP_CV_2(x, N);
}
Benchmark Information:
Number of Cycles = 2*N + 34 cycles (including the call and return)
Sep 10, 2012 57