RENEWLab  1.1.0
RENEW project
1D real and complex FFT
Collaboration diagram for 1D real and complex FFT:

Typedefs

typedef struct mufft_plan_1d mufft_plan_1d
 Opaque type representing a 1D FFT. More...
 

Functions

mufft_plan_1dmufft_create_plan_1d_c2c (unsigned N, int direction, unsigned flags)
 Create a plan for a 1D complex-to-complex inverse or forward FFT. More...
 
mufft_plan_1dmufft_create_plan_1d_r2c (unsigned N, unsigned flags)
 Create a plan for real-to-complex forward transform. More...
 
mufft_plan_1dmufft_create_plan_1d_c2r (unsigned N, unsigned flags)
 Create a plan for complex-to-real inverse transform. More...
 
void mufft_execute_plan_1d (mufft_plan_1d *plan, void *output, const void *input)
 Executes a 1D FFT plan. More...
 
void mufft_free_plan_1d (mufft_plan_1d *plan)
 Free a previously allocated 1D FFT plan. More...
 

Detailed Description

The FFT performed by these functions are not normalized. A forward transform followed by an inverse transform will scale the output by the transform size. The FFTs implemented take input in regular order, no permutation step is required. Similarly, the output of the FFT is in regular order, without any permutation. If input is laid out as (x[0], x[1], x[2], x[3], ..., x[N - 1]) the FFT transform will output (X[0], X[1], X[2], X[3], ..., X[N - 1]) as expected.

Typedef Documentation

◆ mufft_plan_1d

typedef struct mufft_plan_1d mufft_plan_1d

Opaque type representing a 1D FFT.

Function Documentation

◆ mufft_create_plan_1d_c2c()

mufft_plan_1d* mufft_create_plan_1d_c2c ( unsigned  N,
int  direction,
unsigned  flags 
)

Create a plan for a 1D complex-to-complex inverse or forward FFT.

Parameters
NThe transform size. Must be power-of-two and at least 2.
directionForward (MUFFT_FORWARD) or inverse (MUFFT_INVERSE) transform.
flagsFlags for the planning. See Planning options.
Returns
A 1D transform plan, or NULL if an error occured.
Here is the caller graph for this function:

◆ mufft_create_plan_1d_c2r()

mufft_plan_1d* mufft_create_plan_1d_c2r ( unsigned  N,
unsigned  flags 
)

Create a plan for complex-to-real inverse transform.

The complex-to-real transform is optimized for the case when the output data of the transform is purely real. The transform is implemented as an N / 2 complex inverse transform with an initial butterfly pass to turn the real N-point transform into an N / 2 complex transform. The transform may have different numerical precision characteristics compared to the purely complex transform.

Parameters
NThe transform size. Must be power-of-two and at least 4. The required input for the transform is N / 2 + 1 complex values.
flagsFlags for the planning. See Planning options.
Returns
A 1D transform plan, or NULL if an error occured.

◆ mufft_create_plan_1d_r2c()

mufft_plan_1d* mufft_create_plan_1d_r2c ( unsigned  N,
unsigned  flags 
)

Create a plan for real-to-complex forward transform.

The real-to-complex transform is optimized for the case when the input data to the transform is purely real. The transform is implemented as an N / 2 complex transform with a final butterfly pass to complete the transform. The transform may have different numerical precision characteristics compared to the purely complex transform.

Parameters
NThe transform size. Must be power-of-two and at least 4. The required storage for the output is N / 2 + 1 complex values due to redundancies in the frequency plane as X(k) = X(N - k)* when the input to an FFT is real.
flagsFlags for the planning. See Planning options. If MUFFT_FLAG_FULL_R2C flag is added, the transform will output the full N complex frequency samples, instead of the minimum N / 2 + 1 samples.
Returns
A 1D transform plan, or NULL if an error occured.

◆ mufft_execute_plan_1d()

void mufft_execute_plan_1d ( mufft_plan_1d plan,
void *  output,
const void *  input 
)

Executes a 1D FFT plan.

Parameters
planPreviously allocated 1D FFT plan.
outputOutput of the transform. The data must be aligned. See Memory allocation.
inputInput to the transform. The data must be aligned. See Memory allocation.
Here is the caller graph for this function:

◆ mufft_free_plan_1d()

void mufft_free_plan_1d ( mufft_plan_1d plan)

Free a previously allocated 1D FFT plan.

Parameters
planA plan. May be NULL in which case nothing happens.
Here is the caller graph for this function: