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