Fast Fourier Transform (FFT)
Signal Processing (SP) Module » Transforms

One dimensional fast fourier transform. More...

## Functions

ITPP_EXPORT bool | itpp::have_fourier_transforms ()
| Run-time test if library is built with Fast Fourier Transforms enabled.
ITPP_EXPORT void | itpp::fft (const cvec &in, cvec &out)
| Fast Fourier Transform.
ITPP_EXPORT cvec | itpp::fft (const cvec &in)
| Fast Fourier Transform.
ITPP_EXPORT cvec | itpp::fft (const cvec &in, const int N)
| Fast Fourier Transform with zero-padding up to size N.
ITPP_EXPORT void | itpp::ifft (const cvec &in, cvec &out)
| Inverse Fast Fourier Transform.
ITPP_EXPORT cvec | itpp::ifft (const cvec &in)
| Inverse Fast Fourier Transform.
ITPP_EXPORT cvec | itpp::ifft (const cvec &in, const int N)
| Inverse Fast Fourier Transform with zero-padding up to size N.
ITPP_EXPORT void | itpp::fft_real (const vec &in, cvec &out)
| Real Fast Fourier Transform.
ITPP_EXPORT cvec | itpp::fft_real (const vec &in)
| Real Fast Fourier Transform.
ITPP_EXPORT cvec | itpp::fft_real (const vec &in, const int N)
| Real Fast Fourier Transform with zero-padding up to size N.
ITPP_EXPORT void | itpp::ifft_real (const cvec &in, vec &out)
| Inverse Real Fast Fourier Transform.
ITPP_EXPORT vec | itpp::ifft_real (const cvec &in)
| Inverse Real Fast Fourier Transform.
ITPP_EXPORT vec | itpp::ifft_real (const cvec &in, const int N)
| Inverse Real Fast Fourier Transformon with zero-padding up to size N.

## Detailed Description

One dimensional fast fourier transform.

Author
  Tony Ottosson and Adam Piatyszek

The functions

X = fft(x)
itpp::fft
ITPP_EXPORT void fft(const cvec &in, cvec &out)
Fast Fourier Transform.

and

x = ifft(X)
itpp::ifft
ITPP_EXPORT void ifft(const cvec &in, cvec &out)
Inverse Fast Fourier Transform.

are the fourier and inverse fourier transforms of size N defined as:

Y = fft(X, N)

performs zero-padding up to size N and then performs an N-size fft.

The implementation is built upon one of the following libraries:

- FFTW (version 3.0.0 or higher)
- MKL (version 8.0.0 or higher)
- ACML (version 2.5.3 or higher).

Note
  FFTW-based implementation is the fastest for powers of two. Furthermore, the second time you call the routine with the same size, the calculation is much faster due to many things were calculated and stored the first time the routine was called.
  Achieving maximum runtime efficiency with the FFTW library on some computer architectures requires that data are stored in the memory with a special alignment (to 16-byte boundaries). The IT++ memory management functions and container classes do not generally allocate memory aligned this way, and as a result calling FFTW via the IT++ interface (i.e. the fft() function) may be slower than using the FFTW library directly. Therefore, FFTW users concerned about maximum possible performance may want to consider the possibility of calling the FFTW library and its memory management/allocation routines directly, bypassing the IT++ storage classes and the fft() interface to FFTW.

## Function Documentation

## fft()

ITPP_EXPORT cvec itpp::fft | ( | const cvec & | in,
|  | const int | N
| ) |  |

Fast Fourier Transform with zero-padding up to size N.

First N points of input vector are used to perform the transform if N < length(in). Padding with 0's is performed if N > length(in).

## ifft()

ITPP_EXPORT cvec itpp::ifft | ( | const cvec & | in,
|  | const int | N
| ) |  |

Inverse Fast Fourier Transform with zero-padding up to size N.

First N points of input vector are used to perform the transform if N < length(in). Padding with 0's is performed if N > length(in).

## fft_real()

ITPP_EXPORT cvec itpp::fft_real | ( | const vec & | in,
|  | const int | N
| ) |  |

Real Fast Fourier Transform with zero-padding up to size N.

First N points of input vector are used to perform the transform if N < length(in). Padding with 0's is performed if N > length(in).

## ifft_real() [1/3]

ITPP_EXPORT void itpp::ifft_real | ( | const cvec & | in,
|  | vec & | out
| ) |  |

Inverse Real Fast Fourier Transform.

Underlying implementation assumes Hermitian symmetry of the input spectra. Results are unpredictable and depending on the implementation (MKL/ACML/FFTW) if this requirement is not met.

Referenced by itpp::chebwin(), and itpp::filter_design_autocorrelation().

## ifft_real() [2/3]

ITPP_EXPORT vec itpp::ifft_real | ( | const cvec & | in | ) |

Inverse Real Fast Fourier Transform.

Underlying implementation assumes Hermittian symmetry of the input spectra. Results are unpredictable and depending on the implementation (MKL/ACML/FFTW) if this requirement is not met.

## ifft_real() [3/3]

ITPP_EXPORT vec itpp::ifft_real | ( | const cvec & | in,
|  | const int | N
| ) |  |

Inverse Real Fast Fourier Transformon with zero-padding up to size N.

First N points of input vector are used to perform the transform if N < length(in). Padding with 0's is performed if N > length(in).

Underlying implementation assumes Hermitian symmetry of the input subvector/padded sequence. Results are unpredictable and depending on the implementation (MKL/ACML/FFTW) if this requirement is not met.

Generated on Mon Jun 10 2024 11:49:31 for IT++ by Doxygen 1.9.8