Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: FFTW 3.3.8: How Many Threads to Use? Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82:
Chris@82:

Chris@82: Next: , Previous: , Up: Multi-threaded FFTW   [Contents][Index]

Chris@82:
Chris@82:
Chris@82: Chris@82:

5.3 How Many Threads to Use?

Chris@82: Chris@82: Chris@82:

There is a fair amount of overhead involved in synchronizing threads, Chris@82: so the optimal number of threads to use depends upon the size of the Chris@82: transform as well as on the number of processors you have. Chris@82:

Chris@82:

As a general rule, you don’t want to use more threads than you have Chris@82: processors. (Using more threads will work, but there will be extra Chris@82: overhead with no benefit.) In fact, if the problem size is too small, Chris@82: you may want to use fewer threads than you have processors. Chris@82:

Chris@82:

You will have to experiment with your system to see what level of Chris@82: parallelization is best for your problem size. Typically, the problem Chris@82: will have to involve at least a few thousand data points before threads Chris@82: become beneficial. If you plan with FFTW_PATIENT, it will Chris@82: automatically disable threads for sizes that don’t benefit from Chris@82: parallelization. Chris@82: Chris@82:

Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: