d@0: d@0: d@0: How Many Threads to Use? - FFTW 3.2.1 d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0:
d@0:

d@0: d@0: d@0: Next: , d@0: Previous: Usage of Multi-threaded FFTW, d@0: Up: Multi-threaded FFTW d@0:


d@0:
d@0: d@0:

5.3 How Many Threads to Use?

d@0: d@0:

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

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

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