Bsoft 2.1.4
Bernard's software package
fft.h File Reference

General FFT for n-dimensional data. More...

#include "Complex.h"
#include "Vector3.h"
#include <fftw3.h>

Macros

#define FFTW3_VERSION   "3.3.6-pl2"
 
#define MAX_RANK   3
 

Typedefs

typedef fftwf_complex fft_complex
 
typedef int fft_direction
 
typedef fftwf_plan fft_plan
 

Functions

fft_plan fft_setup_plan (long x, long y, long z, fft_direction dir, int opt)
 Sets up a plan for fast Fourier transforms. More...
 
fft_plan fft_setup_plan (Vector3< long > size, fft_direction dir, int opt)
 
int fft_destroy_plan (fft_plan plan)
 Deallocates a plan for fast Fourier transforms. More...
 
int fftw (fft_plan plan, Complex< float > *a)
 Fast Fourier transforms a data array. More...
 

Detailed Description

General FFT for n-dimensional data.

Author
Bernard Heymann
Date
Created: 19980805
Modified: 20151002 Implementing the FFTW library

Macro Definition Documentation

◆ FFTW3_VERSION

#define FFTW3_VERSION   "3.3.6-pl2"

◆ MAX_RANK

#define MAX_RANK   3

Typedef Documentation

◆ fft_complex

typedef fftwf_complex fft_complex

◆ fft_direction

typedef int fft_direction

◆ fft_plan

typedef fftwf_plan fft_plan

Function Documentation

◆ fft_destroy_plan()

int fft_destroy_plan ( fft_plan  plan)

Deallocates a plan for fast Fourier transforms.

Parameters
planFFTW plan.
Returns
int 0.
FFTW library (www.fftw.org).

◆ fft_setup_plan() [1/2]

fft_plan fft_setup_plan ( long  x,
long  y,
long  z,
fft_direction  dir,
int  opt 
)

Sets up a plan for fast Fourier transforms.

Parameters
xx dimension.
yy dimension.
zz dimension.
dirdirection of transformation (FFTW_FORWARD or FFTW_BACKWARD)
optoptimization (0=FFTW_ESTIMATE, 1=FFTW_MEASURE, 2=FFTW_PATIENT, 3=FFTW_EXHAUSTIVE).
Returns
fft_plan FFTW plan.
FFTW library (www.fftw.org).
The size and direction determines the plan.
Both FFTW versions 2 and 3 are supported.

◆ fft_setup_plan() [2/2]

fft_plan fft_setup_plan ( Vector3< long >  size,
fft_direction  dir,
int  opt 
)

◆ fftw()

int fftw ( fft_plan  plan,
Complex< float > *  a 
)

Fast Fourier transforms a data array.

Parameters
planFourier transform plan.
*adata array.
Returns
int error code.
FFTW library (www.fftw.org).
The transform plan encodes both the direction and size of the transform.
The transformation is done in place and the resultant data are 
returned within the original array.