Function Descriptions
3.17 Absolute Value of a Complex Vector
Description:
This module computes the absolute value of a complex vector. If N is even, use
abs_SP_CV_2() for better performance.
Y [i] =
p
(X
re
[i]
2
+ X
im
[i]
2
)
Header File:
FPU.h
Declaration:
void abs_SP_CV(float32
*
y, const complex_float
*
x, const Uint16 N)
Usage:
abs_SP_CV(x, y, N);
float32 *y
output array
complex_float *x
input array
Uint16 N
length of 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
Example:
#include "FPU.h"
#define N 10
float32 y[N];
complex_float x[N];
main()
{
abs_SP_CV(y, x, N); // complex absolute value
}
Benchmark Information:
Number of Cycles = 28*N+9 cycles (including the call and return)
Sep 10, 2012 50