annotate src/fftw-3.3.8/doc/html/Complex-Multi_002dDimensional-DFTs.html @ 167:bd3cc4d1df30

Add FFTW 3.3.8 source, and a Linux build
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 19 Nov 2019 14:52:55 +0000
parents
children
rev   line source
cannam@167 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
cannam@167 2 <html>
cannam@167 3 <!-- This manual is for FFTW
cannam@167 4 (version 3.3.8, 24 May 2018).
cannam@167 5
cannam@167 6 Copyright (C) 2003 Matteo Frigo.
cannam@167 7
cannam@167 8 Copyright (C) 2003 Massachusetts Institute of Technology.
cannam@167 9
cannam@167 10 Permission is granted to make and distribute verbatim copies of this
cannam@167 11 manual provided the copyright notice and this permission notice are
cannam@167 12 preserved on all copies.
cannam@167 13
cannam@167 14 Permission is granted to copy and distribute modified versions of this
cannam@167 15 manual under the conditions for verbatim copying, provided that the
cannam@167 16 entire resulting derived work is distributed under the terms of a
cannam@167 17 permission notice identical to this one.
cannam@167 18
cannam@167 19 Permission is granted to copy and distribute translations of this manual
cannam@167 20 into another language, under the above conditions for modified versions,
cannam@167 21 except that this permission notice may be stated in a translation
cannam@167 22 approved by the Free Software Foundation. -->
cannam@167 23 <!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
cannam@167 24 <head>
cannam@167 25 <title>FFTW 3.3.8: Complex Multi-Dimensional DFTs</title>
cannam@167 26
cannam@167 27 <meta name="description" content="FFTW 3.3.8: Complex Multi-Dimensional DFTs">
cannam@167 28 <meta name="keywords" content="FFTW 3.3.8: Complex Multi-Dimensional DFTs">
cannam@167 29 <meta name="resource-type" content="document">
cannam@167 30 <meta name="distribution" content="global">
cannam@167 31 <meta name="Generator" content="makeinfo">
cannam@167 32 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
cannam@167 33 <link href="index.html#Top" rel="start" title="Top">
cannam@167 34 <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
cannam@167 35 <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
cannam@167 36 <link href="Tutorial.html#Tutorial" rel="up" title="Tutorial">
cannam@167 37 <link href="One_002dDimensional-DFTs-of-Real-Data.html#One_002dDimensional-DFTs-of-Real-Data" rel="next" title="One-Dimensional DFTs of Real Data">
cannam@167 38 <link href="Complex-One_002dDimensional-DFTs.html#Complex-One_002dDimensional-DFTs" rel="prev" title="Complex One-Dimensional DFTs">
cannam@167 39 <style type="text/css">
cannam@167 40 <!--
cannam@167 41 a.summary-letter {text-decoration: none}
cannam@167 42 blockquote.indentedblock {margin-right: 0em}
cannam@167 43 blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
cannam@167 44 blockquote.smallquotation {font-size: smaller}
cannam@167 45 div.display {margin-left: 3.2em}
cannam@167 46 div.example {margin-left: 3.2em}
cannam@167 47 div.lisp {margin-left: 3.2em}
cannam@167 48 div.smalldisplay {margin-left: 3.2em}
cannam@167 49 div.smallexample {margin-left: 3.2em}
cannam@167 50 div.smalllisp {margin-left: 3.2em}
cannam@167 51 kbd {font-style: oblique}
cannam@167 52 pre.display {font-family: inherit}
cannam@167 53 pre.format {font-family: inherit}
cannam@167 54 pre.menu-comment {font-family: serif}
cannam@167 55 pre.menu-preformatted {font-family: serif}
cannam@167 56 pre.smalldisplay {font-family: inherit; font-size: smaller}
cannam@167 57 pre.smallexample {font-size: smaller}
cannam@167 58 pre.smallformat {font-family: inherit; font-size: smaller}
cannam@167 59 pre.smalllisp {font-size: smaller}
cannam@167 60 span.nolinebreak {white-space: nowrap}
cannam@167 61 span.roman {font-family: initial; font-weight: normal}
cannam@167 62 span.sansserif {font-family: sans-serif; font-weight: normal}
cannam@167 63 ul.no-bullet {list-style: none}
cannam@167 64 -->
cannam@167 65 </style>
cannam@167 66
cannam@167 67
cannam@167 68 </head>
cannam@167 69
cannam@167 70 <body lang="en">
cannam@167 71 <a name="Complex-Multi_002dDimensional-DFTs"></a>
cannam@167 72 <div class="header">
cannam@167 73 <p>
cannam@167 74 Next: <a href="One_002dDimensional-DFTs-of-Real-Data.html#One_002dDimensional-DFTs-of-Real-Data" accesskey="n" rel="next">One-Dimensional DFTs of Real Data</a>, Previous: <a href="Complex-One_002dDimensional-DFTs.html#Complex-One_002dDimensional-DFTs" accesskey="p" rel="prev">Complex One-Dimensional DFTs</a>, Up: <a href="Tutorial.html#Tutorial" accesskey="u" rel="up">Tutorial</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
cannam@167 75 </div>
cannam@167 76 <hr>
cannam@167 77 <a name="Complex-Multi_002dDimensional-DFTs-1"></a>
cannam@167 78 <h3 class="section">2.2 Complex Multi-Dimensional DFTs</h3>
cannam@167 79
cannam@167 80 <p>Multi-dimensional transforms work much the same way as one-dimensional
cannam@167 81 transforms: you allocate arrays of <code>fftw_complex</code> (preferably
cannam@167 82 using <code>fftw_malloc</code>), create an <code>fftw_plan</code>, execute it as
cannam@167 83 many times as you want with <code>fftw_execute(plan)</code>, and clean up
cannam@167 84 with <code>fftw_destroy_plan(plan)</code> (and <code>fftw_free</code>).
cannam@167 85 </p>
cannam@167 86 <p>FFTW provides two routines for creating plans for 2d and 3d transforms,
cannam@167 87 and one routine for creating plans of arbitrary dimensionality.
cannam@167 88 The 2d and 3d routines have the following signature:
cannam@167 89 </p><div class="example">
cannam@167 90 <pre class="example">fftw_plan fftw_plan_dft_2d(int n0, int n1,
cannam@167 91 fftw_complex *in, fftw_complex *out,
cannam@167 92 int sign, unsigned flags);
cannam@167 93 fftw_plan fftw_plan_dft_3d(int n0, int n1, int n2,
cannam@167 94 fftw_complex *in, fftw_complex *out,
cannam@167 95 int sign, unsigned flags);
cannam@167 96 </pre></div>
cannam@167 97 <a name="index-fftw_005fplan_005fdft_005f2d"></a>
cannam@167 98 <a name="index-fftw_005fplan_005fdft_005f3d"></a>
cannam@167 99
cannam@167 100 <p>These routines create plans for <code>n0</code> by <code>n1</code> two-dimensional
cannam@167 101 (2d) transforms and <code>n0</code> by <code>n1</code> by <code>n2</code> 3d transforms,
cannam@167 102 respectively. All of these transforms operate on contiguous arrays in
cannam@167 103 the C-standard <em>row-major</em> order, so that the last dimension has the
cannam@167 104 fastest-varying index in the array. This layout is described further in
cannam@167 105 <a href="Multi_002ddimensional-Array-Format.html#Multi_002ddimensional-Array-Format">Multi-dimensional Array Format</a>.
cannam@167 106 </p>
cannam@167 107 <p>FFTW can also compute transforms of higher dimensionality. In order to
cannam@167 108 avoid confusion between the various meanings of the the word
cannam@167 109 &ldquo;dimension&rdquo;, we use the term <em>rank</em>
cannam@167 110 <a name="index-rank"></a>
cannam@167 111 to denote the number of independent indices in an array.<a name="DOCF2" href="#FOOT2"><sup>2</sup></a> For
cannam@167 112 example, we say that a 2d transform has rank&nbsp;2, a 3d transform has
cannam@167 113 rank&nbsp;3, and so on. You can plan transforms of arbitrary rank by
cannam@167 114 means of the following function:
cannam@167 115 </p>
cannam@167 116 <div class="example">
cannam@167 117 <pre class="example">fftw_plan fftw_plan_dft(int rank, const int *n,
cannam@167 118 fftw_complex *in, fftw_complex *out,
cannam@167 119 int sign, unsigned flags);
cannam@167 120 </pre></div>
cannam@167 121 <a name="index-fftw_005fplan_005fdft"></a>
cannam@167 122
cannam@167 123 <p>Here, <code>n</code> is a pointer to an array <code>n[rank]</code> denoting an
cannam@167 124 <code>n[0]</code> by <code>n[1]</code> by &hellip; by <code>n[rank-1]</code> transform.
cannam@167 125 Thus, for example, the call
cannam@167 126 </p><div class="example">
cannam@167 127 <pre class="example">fftw_plan_dft_2d(n0, n1, in, out, sign, flags);
cannam@167 128 </pre></div>
cannam@167 129 <p>is equivalent to the following code fragment:
cannam@167 130 </p><div class="example">
cannam@167 131 <pre class="example">int n[2];
cannam@167 132 n[0] = n0;
cannam@167 133 n[1] = n1;
cannam@167 134 fftw_plan_dft(2, n, in, out, sign, flags);
cannam@167 135 </pre></div>
cannam@167 136 <p><code>fftw_plan_dft</code> is not restricted to 2d and 3d transforms,
cannam@167 137 however, but it can plan transforms of arbitrary rank.
cannam@167 138 </p>
cannam@167 139 <p>You may have noticed that all the planner routines described so far
cannam@167 140 have overlapping functionality. For example, you can plan a 1d or 2d
cannam@167 141 transform by using <code>fftw_plan_dft</code> with a <code>rank</code> of <code>1</code>
cannam@167 142 or <code>2</code>, or even by calling <code>fftw_plan_dft_3d</code> with <code>n0</code>
cannam@167 143 and/or <code>n1</code> equal to <code>1</code> (with no loss in efficiency). This
cannam@167 144 pattern continues, and FFTW&rsquo;s planning routines in general form a
cannam@167 145 &ldquo;partial order,&rdquo; sequences of
cannam@167 146 <a name="index-partial-order"></a>
cannam@167 147 interfaces with strictly increasing generality but correspondingly
cannam@167 148 greater complexity.
cannam@167 149 </p>
cannam@167 150 <p><code>fftw_plan_dft</code> is the most general complex-DFT routine that we
cannam@167 151 describe in this tutorial, but there are also the advanced and guru interfaces,
cannam@167 152 <a name="index-advanced-interface-1"></a>
cannam@167 153 <a name="index-guru-interface-1"></a>
cannam@167 154 which allow one to efficiently combine multiple/strided transforms
cannam@167 155 into a single FFTW plan, transform a subset of a larger
cannam@167 156 multi-dimensional array, and/or to handle more general complex-number
cannam@167 157 formats. For more information, see <a href="FFTW-Reference.html#FFTW-Reference">FFTW Reference</a>.
cannam@167 158 </p>
cannam@167 159 <div class="footnote">
cannam@167 160 <hr>
cannam@167 161 <h4 class="footnotes-heading">Footnotes</h4>
cannam@167 162
cannam@167 163 <h3><a name="FOOT2" href="#DOCF2">(2)</a></h3>
cannam@167 164 <p>The
cannam@167 165 term &ldquo;rank&rdquo; is commonly used in the APL, FORTRAN, and Common Lisp
cannam@167 166 traditions, although it is not so common in the C&nbsp;world.</p>
cannam@167 167 </div>
cannam@167 168 <hr>
cannam@167 169 <div class="header">
cannam@167 170 <p>
cannam@167 171 Next: <a href="One_002dDimensional-DFTs-of-Real-Data.html#One_002dDimensional-DFTs-of-Real-Data" accesskey="n" rel="next">One-Dimensional DFTs of Real Data</a>, Previous: <a href="Complex-One_002dDimensional-DFTs.html#Complex-One_002dDimensional-DFTs" accesskey="p" rel="prev">Complex One-Dimensional DFTs</a>, Up: <a href="Tutorial.html#Tutorial" accesskey="u" rel="up">Tutorial</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
cannam@167 172 </div>
cannam@167 173
cannam@167 174
cannam@167 175
cannam@167 176 </body>
cannam@167 177 </html>