Fast Fourier Transform

rtff::Fft

class Fft

base class for Fast fourier transform computers

Subclassed by rtff::FFTWFft, rtff::MKLFft

Public Functions

virtual void Forward(const float *real_data, std::complex<float> *complex_data) = 0

transform a buffer of real signal data to its time frequency complex representation

Parameters
  • real_data: the signal data
  • complex_data: the fourier transform of the real data

virtual void Backward(const std::complex<float> *complex_data, float *real_data) = 0

transform the complex time frequency representation back to the time domain

Parameters
  • complex_data: the time frequency data
  • real_data: the inverse fourier transform of the complex_data

Public Static Functions

std::shared_ptr<Fft> Create(uint32_t size, std::error_code &err)

Create a default computer based on various libraries depending on your system.

Parameters
  • size: the size in samples of the fft
  • err: an error code that gets set if something goes wrong

rtff::MKLFft

class MKLFft : public rtff::Fft

the Intel Math Kernel Library implementation of the Fast Fourier Transform computer

Public Functions

void Init(uint32_t size, std::error_code &err)
void Forward(const float *real_data, std::complex<float> *complex_data)

transform a buffer of real signal data to its time frequency complex representation

Parameters
  • real_data: the signal data
  • complex_data: the fourier transform of the real data

void Backward(const std::complex<float> *complex_data, float *real_data)

transform the complex time frequency representation back to the time domain

Parameters
  • complex_data: the time frequency data
  • real_data: the inverse fourier transform of the complex_data

rtff::FFTWFft

class FFTWFft : public rtff::Fft

the fftw3f Library implementation of the Fast Fourier Transform computer

Public Functions

FFTWFft()
void Init(uint32_t size, std::error_code &err)
void Forward(const float *real_data, std::complex<float> *complex_data)

transform a buffer of real signal data to its time frequency complex representation

Parameters
  • real_data: the signal data
  • complex_data: the fourier transform of the real data

void Backward(const std::complex<float> *complex_data, float *real_data)

transform the complex time frequency representation back to the time domain

Parameters
  • complex_data: the time frequency data
  • real_data: the inverse fourier transform of the complex_data

class Impl

Public Functions

Impl()
~Impl()
void Init(uint32_t nfft)
void Forward(const float *in, std::complex<float> *out)
void Backward(const std::complex<float> *in, float *out)