The Fastest Fourier Transform in the West (FFTW) is a software
library
A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
for computing
discrete Fourier transform
In mathematics, the discrete Fourier transform (DFT) converts a finite sequence of equally-spaced Sampling (signal processing), samples of a function (mathematics), function into a same-length sequence of equally-spaced samples of the discre ...
s (DFTs) developed by Matteo Frigo and
Steven G. Johnson at the
Massachusetts Institute of Technology
The Massachusetts Institute of Technology (MIT) is a Private university, private research university in Cambridge, Massachusetts, United States. Established in 1861, MIT has played a significant role in the development of many areas of moder ...
.
FFTW is one of the fastest
free software
Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
implementations of the
fast Fourier transform
A fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT). A Fourier transform converts a signal from its original domain (often time or space) to a representation in ...
(FFT). It implements the FFT algorithm for real and
complex
Complex commonly refers to:
* Complexity, the behaviour of a system whose components interact in multiple ways so possible interactions are difficult to describe
** Complex system, a system composed of many components which may interact with each ...
-valued arrays of arbitrary size and dimension.
Library
FFTW expeditiously transforms data by supporting a variety of algorithms and choosing the one (a particular decomposition of the transform into smaller transforms) it
estimates
In the Westminster system of government, the ''Estimates'' are an outline of government spending for the following fiscal year presented by the Cabinet (government), cabinet to parliament. The Estimates are drawn up by bureaucrats in the finance ...
or measures to be preferable in the particular circumstances. It works best on arrays of sizes with small
prime factor
A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
s, with
powers of two
A power of two is a number of the form where is an integer, that is, the result of exponentiation with number two as the base and integer as the exponent. In the fast-growing hierarchy, is exactly equal to f_1^n(1). In the Hardy hi ...
being optimal and large
prime
A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
s being worst case (but still
O(
n log n)). To decompose transforms of
composite sizes into smaller transforms, it chooses among several variants of the
Cooley–Tukey FFT algorithm
The Cooley–Tukey algorithm, named after James Cooley, J. W. Cooley and John Tukey, is the most common fast Fourier transform (FFT) algorithm. It re-expresses the discrete Fourier transform (DFT) of an arbitrary composite number, composite size ...
(corresponding to different factorizations and/or different memory-access patterns), while for prime sizes it uses either
Rader's or
Bluestein's FFT algorithm.
Once the transform has been broken up into subtransforms of sufficiently small sizes, FFTW uses
hard-coded unrolled FFTs for these small sizes that were produced (at
compile time
In computer science, compile time (or compile-time) describes the time window during which a language's statements are converted into binary instructions for the processor to execute. The term is used as an adjective to describe concepts relat ...
, not at
run time) by
code generation; these routines use a variety of algorithms including Cooley–Tukey variants, Rader's algorithm, and
prime-factor FFT algorithm
The prime-factor algorithm (PFA), also called the Good–Thomas algorithm (1958/1963), is a fast Fourier transform (FFT) algorithm that re-expresses the discrete Fourier transform (DFT) of a size as a two-dimensional DFT, but ''only'' for the ca ...
s.
For a sufficiently large number of repeated transforms it is advantageous to measure the performance of some or all of the supported algorithms on the given array size and
platform. These measurements, which the authors refer to as "wisdom", can be stored in a file or string for later use.
FFTW has a "guru interface" that intends "to expose as much as possible of the flexibility in the underlying FFTW architecture". This allows, among other things, multi-dimensional transforms and multiple transforms in a single call (e.g., where the data is interleaved in memory).
FFTW has limited support for ''out-of-order transforms'' (using the
Message Passing Interface
The Message Passing Interface (MPI) is a portable message-passing standard designed to function on parallel computing architectures. The MPI standard defines the syntax and semantics of library routines that are useful to a wide range of use ...
(MPI) version). The
data reordering incurs an overhead, which for in-place transforms of arbitrary size and dimension is non-trivial to avoid. It is undocumented for which transforms this overhead is significant.
FFTW is licensed under the
GNU General Public License
The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first ...
. It is also licensed commercially (for a cost of up to $12,500) by
MIT
The Massachusetts Institute of Technology (MIT) is a private research university in Cambridge, Massachusetts, United States. Established in 1861, MIT has played a significant role in the development of many areas of modern technology and sc ...
and is used in the commercial
MATLAB
MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementat ...
matrix package for calculating FFTs. FFTW is written in the
C language, but
Fortran and
Ada interfaces exist, as well as interfaces for a few other languages. While the library itself is C, the code is actually generated from a program called '
genfft
', which is written in
OCaml
OCaml ( , formerly Objective Caml) is a General-purpose programming language, general-purpose, High-level programming language, high-level, Comparison of multi-paradigm programming languages, multi-paradigm programming language which extends the ...
.
["FFTW FAQ"](_blank)
/ref>
In 1999, FFTW won the J. H. Wilkinson Prize for Numerical Software.
See also
* FFTPACK
FFTPACK is a package of Fortran subroutines for the fast Fourier transform. It includes complex number, complex, real number, real, sine, cosine, and quarter-wave transforms. It was developed by Paul Swarztrauber of the National Center for Atmosp ...
References
External links
*
{{DEFAULTSORT:Fftw
Numerical libraries
FFT algorithms
OCaml software
Free mathematics software
Massachusetts Institute of Technology software
Software using the GNU General Public License