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