|
WSClean
|
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. | |
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:
| 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.
1.8.11