Jump to content

FFTW: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
m copy edit
Line 5: Line 5:
| caption =
| caption =
| author =
| author =
| developer = [[Matteo Frigo]] and Steven G. Johnson
| developer = Matteo Frigo and Steven G. Johnson
| released = {{Start date|1997|03|24|df=yes}}
| released = {{Start date|1997|03|24|df=yes}}
| latest release version = 3.3
| latest release version = 3.3
Line 18: Line 18:
| website = {{URL|http://www.fftw.org}}
| website = {{URL|http://www.fftw.org}}
}}
}}
'''FFTW''', for "'''Fastest Fourier Transform in the West'''", is a software [[library (computer science)|library]] for computing [[discrete Fourier transform]]s (DFTs), developed by [[Matteo Frigo]] and [[Steven G. Johnson]] at the [[Massachusetts Institute of Technology]].<ref name="Frigo2005">{{cite journal |author=Frigo M, Johnson SG |url=http://www.fftw.org/fftw-paper-ieee.pdf |title=The design and implementation of FFTW3 |journal=Proceedings of the IEEE |volume=93 |issue=2 |month=February |year=2005 |pages=216–231 |doi=10.1109/JPROC.2004.840301}}</ref><ref name="Frigo1998">{{cite journal |author=Frigo M, Johnson SG |title=FFTW: an adaptive software architecture for the FFT |journal=Proceedings of the 1998 IEEE [[International Conference on Acoustics, Speech and Signal Processing]] |volume=3 |pages=1381–1384 |year=1998 |url=http://ieeexplore.ieee.org/stamp/stamp.jsp&arnumber=681704&isnumber=14979 |doi=10.1109/ICASSP.1998.681704}}</ref><ref name="Johnson08">{{cite book |author=Johnson SG and Frigo M |url=http://cnx.org/content/m16336/ |chapter=ch.11: Implementing FFTs in practice |title=Fast Fourier Transforms |editor=C. S. Burrus |publisher=Rice University |location=Houston TX: Connexions |month=September |year=2008}}</ref>
The '''Fastest Fourier Transform in the West''' ('''FFTW'''), is a software [[library (computer science)|library]] for computing [[discrete Fourier transform]]s (DFTs), developed by Matteo Frigo and Steven G. Johnson at the [[Massachusetts Institute of Technology]].<ref name="Frigo2005">{{cite journal |author=Frigo M, Johnson SG |url=http://www.fftw.org/fftw-paper-ieee.pdf |title=The design and implementation of FFTW3 |journal=Proceedings of the IEEE |volume=93 |issue=2 |month=February |year=2005 |pages=216–231 |doi=10.1109/JPROC.2004.840301}}</ref><ref name="Frigo1998">{{cite journal |author=Frigo M, Johnson SG |title=FFTW: an adaptive software architecture for the FFT |journal=Proceedings of the 1998 IEEE [[International Conference on Acoustics, Speech and Signal Processing]] |volume=3 |pages=1381–1384 |year=1998 |url=http://ieeexplore.ieee.org/stamp/stamp.jsp&arnumber=681704&isnumber=14979 |doi=10.1109/ICASSP.1998.681704}}</ref><ref name="Johnson08">{{cite book |author=Johnson SG and Frigo M |url=http://cnx.org/content/m16336/ |chapter=ch.11: Implementing FFTs in practice |title=Fast Fourier Transforms |editor=C. S. Burrus |publisher=Rice University |location=Houston TX: Connexions |month=September |year=2008}}</ref>


FFTW is known as the fastest [[free software]] implementation of the [[Fast Fourier transform]] (FFT) [[algorithm]] (upheld by regular [[Benchmark (computing)|benchmarks]]<ref>Homepage, second paragraph [http://www.fftw.org/], and benchmarks page [http://www.fftw.org/benchfft/]</ref>). It can compute transforms of real- and [[Complex number|complex]]-valued arrays of arbitrary size and dimension in [[Big O notation|O]]([[Linearithmic function|''n''&nbsp;log&nbsp;''n'']]) time.
FFTW is known as the fastest [[free software]] implementation of the [[Fast Fourier transform]] (FFT) [[algorithm]] (upheld by regular [[Benchmark (computing)|benchmarks]]<ref>Homepage, second paragraph [http://www.fftw.org/], and benchmarks page [http://www.fftw.org/benchfft/]</ref>). It can compute transforms of real and [[Complex number|complex]]-valued arrays of arbitrary size and dimension in [[Big O notation|O]]([[Linearithmic function|''n''&nbsp;log&nbsp;''n'']]) time.


It does this by supporting a variety of algorithms: it chooses the one (a particular decomposition of the transform into smaller transforms) it [[Heuristic (computer science)|estimates]] or measures to be preferable in the particular circumstances. It works best on arrays of sizes with small [[prime factor]]s, with [[Power of two|powers of two]] being the optimal sizes and a (large) [[prime number|prime]] size being the worst case [but still [[Big O notation|O]]([[Linearithmic function|n log n]])]. To decompose transforms of [[composite number|composite]] sizes into smaller transforms, it chooses among several variants of the [[Cooley–Tukey FFT algorithm]] (corresponding to different factorizations and/or different memory-access patterns), while for prime sizes it uses either [[Rader's FFT algorithm|Rader's]] or [[Bluestein's FFT algorithm]].<ref name="Frigo2005"/> Once the transform has been broken up into subtransforms of sufficiently small sizes, FFTW uses [[hard-coded]] [[Loop unwinding|unrolled]] FFTs for these small sizes that were produced (ahead of time, not at [[run time (program lifecycle phase)|run time]]) by [[Automatic programming|code generation]]; these routines use a variety of algorithms including Cooley–Tukey variants, Rader's algorithm, and [[prime-factor FFT algorithm]]s.<ref name="Frigo2005"/>
It does this by supporting a variety of algorithms and choosing the one (a particular decomposition of the transform into smaller transforms) it [[Heuristic (computer science)|estimates]] or measures to be preferable in the particular circumstances. It works best on arrays of sizes with small [[prime factor]]s, with [[Power of two|powers of two]] being optimal and large [[prime number|prime]]s being worst case (but still [[Big O notation|O]]([[Linearithmic function|n log n]])). To decompose transforms of [[composite number|composite]] sizes into smaller transforms, it chooses among several variants of the [[Cooley–Tukey FFT algorithm]] (corresponding to different factorizations and/or different memory-access patterns), while for prime sizes it uses either [[Rader's FFT algorithm|Rader's]] or [[Bluestein's FFT algorithm]].<ref name="Frigo2005"/> Once the transform has been broken up into subtransforms of sufficiently small sizes, FFTW uses [[hard-coded]] [[Loop unwinding|unrolled]] FFTs for these small sizes that were produced (at [[compile time]] time, not at [[run time (program lifecycle phase)|run time]]) by [[Automatic programming|code generation]]; these routines use a variety of algorithms including Cooley–Tukey variants, Rader's algorithm, and [[prime-factor FFT algorithm]]s.<ref name="Frigo2005"/>


For a sufficiently large number of repeated transforms it is advantageous to use FFTW's ability to choose the fastest algorithm by actually measuring the performance of (some or all of) the supported algorithms on the given array size and [[Platform (computing)|platform]]. These measurements, which the authors call "wisdom" can be stored in a file or string for later use.
For a sufficiently large number of repeated transforms it is advantageous to use FFTW's ability to choose the fastest algorithm by measuring the performance of (some or all of) the supported algorithms on the given array size and [[Platform (computing)|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 [[Interleaving|interleaved]] in memory).
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 [[Interleaving|interleaved]] in memory).


FFTW has limited support for ''out-of-order transforms'' (using the [[Message Passing Interface|MPI]] version). The [[Cooley–Tukey FFT algorithm#Data reordering, bit reversal, and in-place algorithms|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 has limited support for ''out-of-order transforms'' (using the [[Message Passing Interface|MPI]] version). The [[Cooley–Tukey FFT algorithm#Data reordering, bit reversal, and in-place algorithms|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]]. It is also licensed commercially by [[MIT]]<ref>[http://web.mit.edu/tlo/www/industry/fftw-1.html]</ref> and is used in the commercial [[Matlab]]<ref>[http://www.mathworks.com/company/newsletters/news_notes/clevescorner/winter01_cleve.html Faster Finite Fourier Transforms: MATLAB 6 incorporates FFTW]</ref> matrix package for calculating Fast Fourier Transforms (FFTs) &mdash; that is, the Matlab functions which compute FFTs are actually based on FFTW. FFTW is written in the [[C (programming language)|C]] language, but [[Fortran]] and [[Ada (programming language)|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 '<code>genfft</code>', which is written in [[OCaml]].<ref name="FFTW FAQ">[http://www.fftw.org/faq/section2.html#languages "FFTW FAQ"]</ref>
FFTW is licensed under the [[GNU General Public License]]. It is also licensed commercially by [[MIT]]<ref>[http://web.mit.edu/tlo/www/industry/fftw-1.html]</ref> and is used in the commercial [[Matlab]]<ref>[http://www.mathworks.com/company/newsletters/news_notes/clevescorner/winter01_cleve.html Faster Finite Fourier Transforms: MATLAB 6 incorporates FFTW]</ref> matrix package for calculating FFTs &mdash; that is, the Matlab functions which compute FFTs are actually based on FFTW. FFTW is written in the [[C (programming language)|C]] language, but [[Fortran]] and [[Ada (programming language)|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 '<code>genfft</code>', which is written in [[OCaml]].<ref name="FFTW FAQ">[http://www.fftw.org/faq/section2.html#languages "FFTW FAQ"]</ref>


In 1999, FFTW won the [[J. H. Wilkinson Prize for Numerical Software]].
In 1999, FFTW won the [[J. H. Wilkinson Prize for Numerical Software]].

Revision as of 06:57, 31 March 2012

FFTW
Developer(s)Matteo Frigo and Steven G. Johnson
Initial release24 March 1997 (1997-03-24)
Stable release
3.3 / 26 July 2011; 12 years ago (2011-07-26)
Preview release
3.3.1-beta1 / 21 August 2011; 12 years ago (2011-08-21)
Repository
Written inC, OCaml
TypeNumerical software
LicenseGPL, commercial
Websitewww.fftw.org

The Fastest Fourier Transform in the West (FFTW), is a software library for computing discrete Fourier transforms (DFTs), developed by Matteo Frigo and Steven G. Johnson at the Massachusetts Institute of Technology.[1][2][3]

FFTW is known as the fastest free software implementation of the Fast Fourier transform (FFT) algorithm (upheld by regular benchmarks[4]). It can compute transforms of real and complex-valued arrays of arbitrary size and dimension in O(n log n) time.

It does this by supporting a variety of algorithms and choosing the one (a particular decomposition of the transform into smaller transforms) it estimates or measures to be preferable in the particular circumstances. It works best on arrays of sizes with small prime factors, with powers of two being optimal and large primes 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 (corresponding to different factorizations and/or different memory-access patterns), while for prime sizes it uses either Rader's or Bluestein's FFT algorithm.[1] 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 time, 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 algorithms.[1]

For a sufficiently large number of repeated transforms it is advantageous to use FFTW's ability to choose the fastest algorithm by measuring 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 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. It is also licensed commercially by MIT[5] and is used in the commercial Matlab[6] matrix package for calculating FFTs — that is, the Matlab functions which compute FFTs are actually based on FFTW. 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.[7]

In 1999, FFTW won the J. H. Wilkinson Prize for Numerical Software.

See also

References

  1. ^ a b c Frigo M, Johnson SG (2005). "The design and implementation of FFTW3" (PDF). Proceedings of the IEEE. 93 (2): 216–231. doi:10.1109/JPROC.2004.840301. {{cite journal}}: Unknown parameter |month= ignored (help)
  2. ^ Frigo M, Johnson SG (1998). "FFTW: an adaptive software architecture for the FFT". Proceedings of the 1998 IEEE International Conference on Acoustics, Speech and Signal Processing. 3: 1381–1384. doi:10.1109/ICASSP.1998.681704.
  3. ^ Johnson SG and Frigo M (2008). "ch.11: Implementing FFTs in practice". In C. S. Burrus (ed.). Fast Fourier Transforms. Houston TX: Connexions: Rice University. {{cite book}}: Unknown parameter |month= ignored (help)
  4. ^ Homepage, second paragraph [1], and benchmarks page [2]
  5. ^ [3]
  6. ^ Faster Finite Fourier Transforms: MATLAB 6 incorporates FFTW
  7. ^ "FFTW FAQ"

External links