libdspl-2.0
Digital Signal Processing Algorithm Library

Fast Fourier Transform Object Data Structure. More...

#include <dspl.h>

Data Fields

complex_tw
 
complex_tt0
 
complex_tt1
 
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 libdspl-2.0 library uses an FFT algorithm for composite size.

Parameters
nThe size of the FFT vector for which memory is allocated in the structure arrays.
The parameter n must be equal to an integer power of two (radix 2).

wPointer 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.

t0Pointer 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.

t1Pointer 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 n = 64; // FFT size
int err;
// Create and fill FFT structure for 64-points 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 size n.

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 the fft_t structure with filled data for the FFT length k for calculating the FFT of lengthn, then the structure arrays will be automatically recreated for the length n.
Author
Sergey Bakhurin www.dsplib.org

Definition at line 226 of file dspl.h.

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 n
Definition: dspl.h:231
int DSPL_API fft_create(fft_t *pfft, int n)
Function creates and fill fft_t structure.
Definition: fft.c:774
void DSPL_API fft_free(fft_t *pfft)
Free fft_t structure.
Definition: fft.c:891
Fast Fourier Transform Object Data Structure.
Definition: dspl.h:227