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