Template Class FFTWWrapper

Class Documentation

template<typename Real>
class FFTWWrapper

The FFTWWrapper class is a convenient wrapper to abstract away the details of different precision modes for FFTW, where the types and function names differ.

Public Functions

inline FFTWWrapper()
inline FFTWWrapper(size_t fftDimension)
FFTWWrapper(const FFTWWrapper &other) = delete
FFTWWrapper(FFTWWrapper &&other) = delete
FFTWWrapper &operator=(const FFTWWrapper &other) = delete
inline FFTWWrapper &operator=(FFTWWrapper &&other)
inline ~FFTWWrapper()
inline void transform(std::complex<Real> *inBuffer, Real *outBuffer)

transform call FFTW to do an out of place complex to real FFT.

Parameters:
  • inBuffer – the location of the input data.

  • outBuffer – the location of the output data.

inline void transform(Real *inBuffer, std::complex<Real> *outBuffer)

transform call FFTW to do an out of place real to complex FFT.

Parameters:
  • inBuffer – the location of the input data.

  • outBuffer – the location of the output data.

inline void transform(std::complex<Real> *inPlaceBuffer, int direction)

transform call FFTW to do an in place complex to complex FFT.

Parameters:
  • inPlaceBuffer – the location of the input and output data.

  • direction – either FFTW_FORWARD or FFTW_BACKWARD.

inline void transform(std::complex<Real> *inBuffer, std::complex<Real> *outBuffer, int direction)

transform call FFTW to do an out of place complex to complex FFT.

Parameters:
  • inBuffer – the location of the input data.

  • outBuffer – the location of the output data.

  • direction – either FFTW_FORWARD or FFTW_BACKWARD.

Protected Attributes

typeinfo::Plan forwardPlan_ = nullptr

An FFTW plan object, describing out of place complex to complex forward transforms.

typeinfo::Plan inversePlan_ = nullptr

An FFTW plan object, describing out of place complex to complex inverse transforms.

typeinfo::Plan forwardInPlacePlan_ = nullptr

An FFTW plan object, describing in place complex to complex forward transforms.

typeinfo::Plan inverseInPlacePlan_ = nullptr

An FFTW plan object, describing in place complex to complex inverse transforms.

typeinfo::Plan realToComplexPlan_ = nullptr

An FFTW plan object, describing out of place real to complex forward transforms.

typeinfo::Plan complexToRealPlan_ = nullptr

An FFTW plan object, describing out of place complex to real inverse transforms.

size_t fftDimension_

The size of the real data.

unsigned transformFlags_

The flags to be passed to the FFTW plan creator, to determine startup cost.