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