Chris@19: Chris@19:
Chris@19:Chris@19: Next: Usage of Multi-threaded FFTW, Chris@19: Previous: Multi-threaded FFTW, Chris@19: Up: Multi-threaded FFTW Chris@19:
All of the FFTW threads code is located in the threads
Chris@19: subdirectory of the FFTW package. On Unix systems, the FFTW threads
Chris@19: libraries and header files can be automatically configured, compiled,
Chris@19: and installed along with the uniprocessor FFTW libraries simply by
Chris@19: including --enable-threads
in the flags to the configure
Chris@19: script (see Installation on Unix), or --enable-openmp
to use
Chris@19: OpenMP threads.
Chris@19:
Chris@19:
Chris@19:
The threads routines require your operating system to have some sort
Chris@19: of shared-memory threads support. Specifically, the FFTW threads
Chris@19: package works with POSIX threads (available on most Unix variants,
Chris@19: from GNU/Linux to MacOS X) and Win32 threads. OpenMP threads, which
Chris@19: are supported in many common compilers (e.g. gcc) are also supported,
Chris@19: and may give better performance on some systems. (OpenMP threads are
Chris@19: also useful if you are employing OpenMP in your own code, in order to
Chris@19: minimize conflicts between threading models.) If you have a
Chris@19: shared-memory machine that uses a different threads API, it should be
Chris@19: a simple matter of programming to include support for it; see the file
Chris@19: threads/threads.c
for more detail.
Chris@19:
Chris@19:
You can compile FFTW with both --enable-threads
and
Chris@19: --enable-openmp
at the same time, since they install libraries
Chris@19: with different names (‘fftw3_threads’ and ‘fftw3_omp’, as
Chris@19: described below). However, your programs may only link to one
Chris@19: of these two libraries at a time.
Chris@19:
Chris@19:
Ideally, of course, you should also have multiple processors in order to Chris@19: get any benefit from the threaded transforms. Chris@19: Chris@19: Chris@19: Chris@19: