annotate src/fftw-3.3.8/doc/html/Complex-Multi_002dDimensional-DFTs.html @ 83:ae30d91d2ffe

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