Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.3/doc/html/Introduction.html @ 10:37bf6b4a2645
Add FFTW3
| author | Chris Cannam |
|---|---|
| date | Wed, 20 Mar 2013 15:35:50 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 9:c0fb53affa76 | 10:37bf6b4a2645 |
|---|---|
| 1 <html lang="en"> | |
| 2 <head> | |
| 3 <title>Introduction - FFTW 3.3.3</title> | |
| 4 <meta http-equiv="Content-Type" content="text/html"> | |
| 5 <meta name="description" content="FFTW 3.3.3"> | |
| 6 <meta name="generator" content="makeinfo 4.13"> | |
| 7 <link title="Top" rel="start" href="index.html#Top"> | |
| 8 <link rel="prev" href="index.html#Top" title="Top"> | |
| 9 <link rel="next" href="Tutorial.html#Tutorial" title="Tutorial"> | |
| 10 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> | |
| 11 <!-- | |
| 12 This manual is for FFTW | |
| 13 (version 3.3.3, 25 November 2012). | |
| 14 | |
| 15 Copyright (C) 2003 Matteo Frigo. | |
| 16 | |
| 17 Copyright (C) 2003 Massachusetts Institute of Technology. | |
| 18 | |
| 19 Permission is granted to make and distribute verbatim copies of | |
| 20 this manual provided the copyright notice and this permission | |
| 21 notice are preserved on all copies. | |
| 22 | |
| 23 Permission is granted to copy and distribute modified versions of | |
| 24 this manual under the conditions for verbatim copying, provided | |
| 25 that the entire resulting derived work is distributed under the | |
| 26 terms of a permission notice identical to this one. | |
| 27 | |
| 28 Permission is granted to copy and distribute translations of this | |
| 29 manual into another language, under the above conditions for | |
| 30 modified versions, except that this permission notice may be | |
| 31 stated in a translation approved by the Free Software Foundation. | |
| 32 --> | |
| 33 <meta http-equiv="Content-Style-Type" content="text/css"> | |
| 34 <style type="text/css"><!-- | |
| 35 pre.display { font-family:inherit } | |
| 36 pre.format { font-family:inherit } | |
| 37 pre.smalldisplay { font-family:inherit; font-size:smaller } | |
| 38 pre.smallformat { font-family:inherit; font-size:smaller } | |
| 39 pre.smallexample { font-size:smaller } | |
| 40 pre.smalllisp { font-size:smaller } | |
| 41 span.sc { font-variant:small-caps } | |
| 42 span.roman { font-family:serif; font-weight:normal; } | |
| 43 span.sansserif { font-family:sans-serif; font-weight:normal; } | |
| 44 --></style> | |
| 45 </head> | |
| 46 <body> | |
| 47 <div class="node"> | |
| 48 <a name="Introduction"></a> | |
| 49 <p> | |
| 50 Next: <a rel="next" accesskey="n" href="Tutorial.html#Tutorial">Tutorial</a>, | |
| 51 Previous: <a rel="previous" accesskey="p" href="index.html#Top">Top</a>, | |
| 52 Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a> | |
| 53 <hr> | |
| 54 </div> | |
| 55 | |
| 56 <h2 class="chapter">1 Introduction</h2> | |
| 57 | |
| 58 <p>This manual documents version 3.3.3 of FFTW, the | |
| 59 <em>Fastest Fourier Transform in the West</em>. FFTW is a comprehensive | |
| 60 collection of fast C routines for computing the discrete Fourier | |
| 61 transform (DFT) and various special cases thereof. | |
| 62 <a name="index-discrete-Fourier-transform-1"></a><a name="index-DFT-2"></a> | |
| 63 <ul> | |
| 64 <li>FFTW computes the DFT of complex data, real data, even- | |
| 65 or odd-symmetric real data (these symmetric transforms are usually | |
| 66 known as the discrete cosine or sine transform, respectively), and the | |
| 67 discrete Hartley transform (DHT) of real data. | |
| 68 | |
| 69 <li>The input data can have arbitrary length. | |
| 70 FFTW employs <i>O</i>(<i>n</i> log <i>n</i>) algorithms for all lengths, including | |
| 71 prime numbers. | |
| 72 | |
| 73 <li>FFTW supports arbitrary multi-dimensional data. | |
| 74 | |
| 75 <li>FFTW supports the SSE, SSE2, AVX, Altivec, and MIPS PS instruction | |
| 76 sets. | |
| 77 | |
| 78 <li>FFTW includes parallel (multi-threaded) transforms | |
| 79 for shared-memory systems. | |
| 80 <li>Starting with version 3.3, FFTW includes distributed-memory parallel | |
| 81 transforms using MPI. | |
| 82 </ul> | |
| 83 | |
| 84 <p>We assume herein that you are familiar with the properties and uses of | |
| 85 the DFT that are relevant to your application. Otherwise, see | |
| 86 e.g. <cite>The Fast Fourier Transform and Its Applications</cite> by E. O. Brigham | |
| 87 (Prentice-Hall, Englewood Cliffs, NJ, 1988). | |
| 88 <a href="http://www.fftw.org">Our web page</a> also has links to FFT-related | |
| 89 information online. | |
| 90 <a name="index-FFTW-3"></a> | |
| 91 <!-- TODO: revise. We don't need to brag any longer --> | |
| 92 <!-- FFTW is usually faster (and sometimes much faster) than all other --> | |
| 93 <!-- freely-available Fourier transform programs found on the Net. It is --> | |
| 94 <!-- competitive with (and often faster than) the FFT codes in Sun's --> | |
| 95 <!-- Performance Library, IBM's ESSL library, HP's CXML library, and --> | |
| 96 <!-- Intel's MKL library, which are targeted at specific machines. --> | |
| 97 <!-- Moreover, FFTW's performance is @emph{portable}. Indeed, FFTW is --> | |
| 98 <!-- unique in that it automatically adapts itself to your machine, your --> | |
| 99 <!-- cache, the size of your memory, your number of registers, and all the --> | |
| 100 <!-- other factors that normally make it impossible to optimize a program --> | |
| 101 <!-- for more than one machine. An extensive comparison of FFTW's --> | |
| 102 <!-- performance with that of other Fourier transform codes has been made, --> | |
| 103 <!-- and the results are available on the Web at --> | |
| 104 <!-- @uref{http://fftw.org/benchfft, the benchFFT home page}. --> | |
| 105 <!-- @cindex benchmark --> | |
| 106 <!-- @fpindex benchfft --> | |
| 107 | |
| 108 <p>In order to use FFTW effectively, you need to learn one basic concept | |
| 109 of FFTW's internal structure: FFTW does not use a fixed algorithm for | |
| 110 computing the transform, but instead it adapts the DFT algorithm to | |
| 111 details of the underlying hardware in order to maximize performance. | |
| 112 Hence, the computation of the transform is split into two phases. | |
| 113 First, FFTW's <dfn>planner</dfn> “learns” the fastest way to compute the | |
| 114 transform on your machine. The planner | |
| 115 <a name="index-planner-4"></a>produces a data structure called a <dfn>plan</dfn> that contains this | |
| 116 <a name="index-plan-5"></a>information. Subsequently, the plan is <dfn>executed</dfn> | |
| 117 <a name="index-execute-6"></a>to transform the array of input data as dictated by the plan. The | |
| 118 plan can be reused as many times as needed. In typical | |
| 119 high-performance applications, many transforms of the same size are | |
| 120 computed and, consequently, a relatively expensive initialization of | |
| 121 this sort is acceptable. On the other hand, if you need a single | |
| 122 transform of a given size, the one-time cost of the planner becomes | |
| 123 significant. For this case, FFTW provides fast planners based on | |
| 124 heuristics or on previously computed plans. | |
| 125 | |
| 126 <p>FFTW supports transforms of data with arbitrary length, rank, | |
| 127 multiplicity, and a general memory layout. In simple cases, however, | |
| 128 this generality may be unnecessary and confusing. Consequently, we | |
| 129 organized the interface to FFTW into three levels of increasing | |
| 130 generality. | |
| 131 <ul> | |
| 132 <li>The <dfn>basic interface</dfn> computes a single | |
| 133 transform of contiguous data. | |
| 134 <li>The <dfn>advanced interface</dfn> computes transforms | |
| 135 of multiple or strided arrays. | |
| 136 <li>The <dfn>guru interface</dfn> supports the most general data | |
| 137 layouts, multiplicities, and strides. | |
| 138 </ul> | |
| 139 We expect that most users will be best served by the basic interface, | |
| 140 whereas the guru interface requires careful attention to the | |
| 141 documentation to avoid problems. | |
| 142 <a name="index-basic-interface-7"></a><a name="index-advanced-interface-8"></a><a name="index-guru-interface-9"></a> | |
| 143 | |
| 144 <p>Besides the automatic performance adaptation performed by the planner, | |
| 145 it is also possible for advanced users to customize FFTW manually. For | |
| 146 example, if code space is a concern, we provide a tool that links only | |
| 147 the subset of FFTW needed by your application. Conversely, you may need | |
| 148 to extend FFTW because the standard distribution is not sufficient for | |
| 149 your needs. For example, the standard FFTW distribution works most | |
| 150 efficiently for arrays whose size can be factored into small primes | |
| 151 (2, 3, 5, and 7), and otherwise it uses a | |
| 152 slower general-purpose routine. If you need efficient transforms of | |
| 153 other sizes, you can use FFTW's code generator, which produces fast C | |
| 154 programs (“codelets”) for any particular array size you may care | |
| 155 about. | |
| 156 <a name="index-code-generator-10"></a><a name="index-codelet-11"></a>For example, if you need transforms of size | |
| 157 513 = 19*3<sup>3</sup>,you can customize FFTW to support the factor 19 efficiently. | |
| 158 | |
| 159 <p>For more information regarding FFTW, see the paper, “The Design and | |
| 160 Implementation of FFTW3,” by M. Frigo and S. G. Johnson, which was an | |
| 161 invited paper in <cite>Proc. IEEE</cite> <b>93</b> (2), p. 216 (2005). The | |
| 162 code generator is described in the paper “A fast Fourier transform | |
| 163 compiler”, | |
| 164 <a name="index-compiler-12"></a>by M. Frigo, in the <cite>Proceedings of the 1999 ACM SIGPLAN Conference | |
| 165 on Programming Language Design and Implementation (PLDI), Atlanta, | |
| 166 Georgia, May 1999</cite>. These papers, along with the latest version of | |
| 167 FFTW, the FAQ, benchmarks, and other links, are available at | |
| 168 <a href="http://www.fftw.org">the FFTW home page</a>. | |
| 169 | |
| 170 <p>The current version of FFTW incorporates many good ideas from the past | |
| 171 thirty years of FFT literature. In one way or another, FFTW uses the | |
| 172 Cooley-Tukey algorithm, the prime factor algorithm, Rader's algorithm | |
| 173 for prime sizes, and a split-radix algorithm (with a | |
| 174 “conjugate-pair” variation pointed out to us by Dan Bernstein). | |
| 175 FFTW's code generator also produces new algorithms that we do not | |
| 176 completely understand. | |
| 177 <a name="index-algorithm-13"></a>The reader is referred to the cited papers for the appropriate | |
| 178 references. | |
| 179 | |
| 180 <p>The rest of this manual is organized as follows. We first discuss the | |
| 181 sequential (single-processor) implementation. We start by describing | |
| 182 the basic interface/features of FFTW in <a href="Tutorial.html#Tutorial">Tutorial</a>. | |
| 183 Next, <a href="Other-Important-Topics.html#Other-Important-Topics">Other Important Topics</a> discusses data alignment | |
| 184 (see <a href="SIMD-alignment-and-fftw_005fmalloc.html#SIMD-alignment-and-fftw_005fmalloc">SIMD alignment and fftw_malloc</a>), | |
| 185 the storage scheme of multi-dimensional arrays | |
| 186 (see <a href="Multi_002ddimensional-Array-Format.html#Multi_002ddimensional-Array-Format">Multi-dimensional Array Format</a>), and FFTW's mechanism for | |
| 187 storing plans on disk (see <a href="Words-of-Wisdom_002dSaving-Plans.html#Words-of-Wisdom_002dSaving-Plans">Words of Wisdom-Saving Plans</a>). Next, | |
| 188 <a href="FFTW-Reference.html#FFTW-Reference">FFTW Reference</a> provides comprehensive documentation of all | |
| 189 FFTW's features. Parallel transforms are discussed in their own | |
| 190 chapters: <a href="Multi_002dthreaded-FFTW.html#Multi_002dthreaded-FFTW">Multi-threaded FFTW</a> and <a href="Distributed_002dmemory-FFTW-with-MPI.html#Distributed_002dmemory-FFTW-with-MPI">Distributed-memory FFTW with MPI</a>. Fortran programmers can also use FFTW, as described in | |
| 191 <a href="Calling-FFTW-from-Legacy-Fortran.html#Calling-FFTW-from-Legacy-Fortran">Calling FFTW from Legacy Fortran</a> and <a href="Calling-FFTW-from-Modern-Fortran.html#Calling-FFTW-from-Modern-Fortran">Calling FFTW from Modern Fortran</a>. <a href="Installation-and-Customization.html#Installation-and-Customization">Installation and Customization</a> explains how to | |
| 192 install FFTW in your computer system and how to adapt FFTW to your | |
| 193 needs. License and copyright information is given in <a href="License-and-Copyright.html#License-and-Copyright">License and Copyright</a>. Finally, we thank all the people who helped us in | |
| 194 <a href="Acknowledgments.html#Acknowledgments">Acknowledgments</a>. | |
| 195 | |
| 196 </body></html> | |
| 197 |
