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