fft

Fast Fourier Transform (FFT) and inverse (plan) object

Variants: fft

Public Functions

FFT(plan) fft_create_plan(unsigned int _n, float complex * _x, float complex * _y, int _dir, int _flags)
FFT(plan) fft_create_plan_r2r_1d(unsigned int _n, float * _x, float * _y, int _type, int _flags)
int fft_destroy_plan(FFT(plan) _p)
int fft_print_plan(FFT(plan) _p)
int fft_execute(FFT(plan) _p)
int fft_run(unsigned int _n, float complex * _x, float complex * _y, int _dir, int _flags)
int fft_r2r_1d_run(unsigned int _n, float * _x, float * _y, int _type, int _flags)
int fft_shift(float complex * _x, unsigned int _n)

Interfaces

FFT(plan) fft_create_plan(unsigned int _n, float complex * _x, float complex * _y, int _dir, int _flags)

Create regular complex one-dimensional transform

  • _n : transform size
  • _x : pointer to input array, shape: (_n, 1)
  • _y : pointer to output array, shape: (_n, 1)
  • _dir : direction (e.g. LIQUID_FFT_FORWARD)
  • _flags : options, optimization

FFT(plan) fft_create_plan_r2r_1d(unsigned int _n, float * _x, float * _y, int _type, int _flags)

Create real-to-real one-dimensional transform

  • _n : transform size
  • _x : pointer to input array, shape: (_n, 1)
  • _y : pointer to output array, shape: (_n, 1)
  • _type : transform type (e.g. LIQUID_FFT_REDFT00)
  • _flags : options, optimization

int fft_destroy_plan(FFT(plan) _p)

Destroy transform and free all internally-allocated memory

  • _p :

int fft_print_plan(FFT(plan) _p)

Print transform plan and internal strategy to stdout. This includes information on the strategy for computing large transforms with many prime factors or with large prime factors.

  • _p :

int fft_execute(FFT(plan) _p)

Run the transform

  • _p :

int fft_run(unsigned int _n, float complex * _x, float complex * _y, int _dir, int _flags)

Perform n-point FFT allocating plan internally

  • _n :
  • _x : input array, shape: (_nfft, 1)
  • _y : output array, shape: (_nfft, 1)
  • _dir : fft direction: LIQUID_FFT_{FORWARD,BACKWARD}
  • _flags : fft flags

int fft_r2r_1d_run(unsigned int _n, float * _x, float * _y, int _type, int _flags)

Perform n-point real one-dimensional FFT allocating plan internally

  • _n :
  • _x : input array, shape: (_nfft, 1)
  • _y : output array, shape: (_nfft, 1)
  • _type : fft type, e.g. LIQUID_FFT_REDFT10
  • _flags : fft flags

int fft_shift(float complex * _x, unsigned int _n)

Perform _n-point fft shift

  • _x : input array, shape: (_n, 1)
  • _n : input array size