WSClean
Public Member Functions | List of all members
FFTWMultiThreadEnabler Class Reference

Used to initialize and enable fftw's multithreading. More...

#include <fftwmultithreadenabler.h>

Public Member Functions

 FFTWMultiThreadEnabler (bool reportNrThreads=true)
 Constructor that sets FFTW to use multiple threads. More...
 
 FFTWMultiThreadEnabler (size_t nThreads, bool reportNrThreads=true)
 Constructor that sets FFTW to use multiple threads. More...
 
 ~FFTWMultiThreadEnabler ()
 Destructor that resets the FFTWs threads.
 

Detailed Description

Used to initialize and enable fftw's multithreading.

While an instance of this class exists, multi-threading is enabled. When the class is destructed, multi-threading is again disabled.

To make the FFTs in for example the FFTConvolver or FFTResampler multi-threaded, it is enough to construct an instance of this class and keep it until done. For example:

void doMultiThreadedFFTActions
{
FFTResampler resampler(..);
...
}
Examples:
wspredictionexample.cpp.

Constructor & Destructor Documentation

FFTWMultiThreadEnabler::FFTWMultiThreadEnabler ( bool  reportNrThreads = true)

Constructor that sets FFTW to use multiple threads.

This will set FFTW to use as many threads as there are cores in the system.

FFTWMultiThreadEnabler::FFTWMultiThreadEnabler ( size_t  nThreads,
bool  reportNrThreads = true 
)

Constructor that sets FFTW to use multiple threads.

This will set FFTW to use the given number of threads.


The documentation for this class was generated from the following file: