annotate src/fftw-3.3.5/doc/html/Complex-Multi_002dDimensional-DFTs.html @ 84:08ae793730bd

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