libdspl2.0
Digital Signal Processing Algorithm Library

fft_t Struct Reference
Fast Fourier Transform Object Data Structure. More...
#include <dspl.h>
Data Fields  
complex_t *  w 
complex_t *  t0 
complex_t *  t1 
int  n 
Detailed Description
Fast Fourier Transform Object Data Structure.
The structure stores pointers to twiddle factors and arrays of intermediate data of the fast Fourier transform algorithm.
The libdspl2.0 library uses an FFT algorithm for composite size.
 Parameters

n The size of the FFT vector for which memory is allocated in the structure arrays.
The parametern
must be equal to an integer power of two (radix 2).
w Pointer to the vector of twiddle factors.
The size of the vector is[n x 1]
.
The memory must be allocated and an array of twiddle factors must be filled with the fft_create function.
t0 Pointer to the vector of intermediate results of the FFT algorithm.
The size of the vector is[n x 1]
.
Memory must be allocated by fft_create function.
t1 Pointer to the vector of intermediate results.
The size of the vector is[n x 1]
.
The memory must be allocated with the fft_create function.
The structure is populated with the fft_create function once before using the FFT algorithm.
A pointer to an object of this structure may be reused when calling FFT functions.
Before exiting the program, dedicated memory for twiddle factors and arrays of intermediate data must be cleared by the fft_free function.
For example:
fft_t pfft = {0}; // Structure fft_t and clear all fields
int err;
// Create and fill FFT structure for 64points FFT
err = fft_create(&pfft, n);
// FFT calculation here
// FFT calculation here one more
// ...
// Clear fft structure
fft_free(&pfft);
 Note
 It is important to note that if the object
fft_t
was created for the FFT size equal ton
, it can only be used for FFT of sizen
.
It’s also worth noting that the FFT functions independently control the size, and independently allocate the memory of the FFT object, if necessary. So if you call any function using thefft_t
structure with filled data for the FFT lengthk
for calculating the FFT of lengthn
, then the structure arrays will be automatically recreated for the lengthn
.
Field Documentation
◆ n
int fft_t::n 
Definition at line 231 of file dspl.h.
Referenced by fft_create().
◆ t0
complex_t* fft_t::t0 
Definition at line 229 of file dspl.h.
Referenced by fft_create(), fft_free(), and ifft_cmplx().
◆ t1
complex_t* fft_t::t1 
Definition at line 230 of file dspl.h.
Referenced by fft(), fft_cmplx(), fft_create(), fft_free(), and ifft_cmplx().
◆ w
complex_t* fft_t::w 
Definition at line 228 of file dspl.h.
Referenced by fft_create(), and fft_free().
int DSPL_API fft_create(fft_t *pfft, int n)
Function creates and fill fft_t structure.
Definition: fft.c:774
Generated on Fri Sep 18 2020 13:02:35 for libdspl2.0 by 1.8.18