Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.5/doc/html/Advanced-Complex-DFTs.html @ 42:2cd0e3b3e1fd
Current fftw source
author | Chris Cannam |
---|---|
date | Tue, 18 Oct 2016 13:40:26 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
41:481f5f8c5634 | 42:2cd0e3b3e1fd |
---|---|
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.5, 30 July 2016). | |
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 5.2, http://www.gnu.org/software/texinfo/ --> | |
24 <head> | |
25 <title>FFTW 3.3.5: Advanced Complex DFTs</title> | |
26 | |
27 <meta name="description" content="FFTW 3.3.5: Advanced Complex DFTs"> | |
28 <meta name="keywords" content="FFTW 3.3.5: Advanced Complex 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="Advanced-Interface.html#Advanced-Interface" rel="up" title="Advanced Interface"> | |
37 <link href="Advanced-Real_002ddata-DFTs.html#Advanced-Real_002ddata-DFTs" rel="next" title="Advanced Real-data DFTs"> | |
38 <link href="Advanced-Interface.html#Advanced-Interface" rel="prev" title="Advanced Interface"> | |
39 <style type="text/css"> | |
40 <!-- | |
41 a.summary-letter {text-decoration: none} | |
42 blockquote.smallquotation {font-size: smaller} | |
43 div.display {margin-left: 3.2em} | |
44 div.example {margin-left: 3.2em} | |
45 div.indentedblock {margin-left: 3.2em} | |
46 div.lisp {margin-left: 3.2em} | |
47 div.smalldisplay {margin-left: 3.2em} | |
48 div.smallexample {margin-left: 3.2em} | |
49 div.smallindentedblock {margin-left: 3.2em; font-size: smaller} | |
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.nocodebreak {white-space:nowrap} | |
61 span.nolinebreak {white-space:nowrap} | |
62 span.roman {font-family:serif; font-weight:normal} | |
63 span.sansserif {font-family:sans-serif; font-weight:normal} | |
64 ul.no-bullet {list-style: none} | |
65 --> | |
66 </style> | |
67 | |
68 | |
69 </head> | |
70 | |
71 <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> | |
72 <a name="Advanced-Complex-DFTs"></a> | |
73 <div class="header"> | |
74 <p> | |
75 Next: <a href="Advanced-Real_002ddata-DFTs.html#Advanced-Real_002ddata-DFTs" accesskey="n" rel="next">Advanced Real-data DFTs</a>, Previous: <a href="Advanced-Interface.html#Advanced-Interface" accesskey="p" rel="prev">Advanced Interface</a>, Up: <a href="Advanced-Interface.html#Advanced-Interface" accesskey="u" rel="up">Advanced Interface</a> [<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> | |
76 </div> | |
77 <hr> | |
78 <a name="Advanced-Complex-DFTs-1"></a> | |
79 <h4 class="subsection">4.4.1 Advanced Complex DFTs</h4> | |
80 | |
81 <div class="example"> | |
82 <pre class="example">fftw_plan fftw_plan_many_dft(int rank, const int *n, int howmany, | |
83 fftw_complex *in, const int *inembed, | |
84 int istride, int idist, | |
85 fftw_complex *out, const int *onembed, | |
86 int ostride, int odist, | |
87 int sign, unsigned flags); | |
88 </pre></div> | |
89 <a name="index-fftw_005fplan_005fmany_005fdft"></a> | |
90 | |
91 <p>This routine plans multiple multidimensional complex DFTs, and it | |
92 extends the <code>fftw_plan_dft</code> routine (see <a href="Complex-DFTs.html#Complex-DFTs">Complex DFTs</a>) to | |
93 compute <code>howmany</code> transforms, each having rank <code>rank</code> and size | |
94 <code>n</code>. In addition, the transform data need not be contiguous, but | |
95 it may be laid out in memory with an arbitrary stride. To account for | |
96 these possibilities, <code>fftw_plan_many_dft</code> adds the new parameters | |
97 <code>howmany</code>, {<code>i</code>,<code>o</code>}<code>nembed</code>, | |
98 {<code>i</code>,<code>o</code>}<code>stride</code>, and | |
99 {<code>i</code>,<code>o</code>}<code>dist</code>. The FFTW basic interface | |
100 (see <a href="Complex-DFTs.html#Complex-DFTs">Complex DFTs</a>) provides routines specialized for ranks 1, 2, | |
101 and 3, but the advanced interface handles only the general-rank | |
102 case. | |
103 </p> | |
104 <p><code>howmany</code> is the number of transforms to compute. The resulting | |
105 plan computes <code>howmany</code> transforms, where the input of the | |
106 <code>k</code>-th transform is at location <code>in+k*idist</code> (in C pointer | |
107 arithmetic), and its output is at location <code>out+k*odist</code>. Plans | |
108 obtained in this way can often be faster than calling FFTW multiple | |
109 times for the individual transforms. The basic <code>fftw_plan_dft</code> | |
110 interface corresponds to <code>howmany=1</code> (in which case the <code>dist</code> | |
111 parameters are ignored). | |
112 <a name="index-howmany-parameter"></a> | |
113 <a name="index-dist"></a> | |
114 </p> | |
115 | |
116 <p>Each of the <code>howmany</code> transforms has rank <code>rank</code> and size | |
117 <code>n</code>, as in the basic interface. In addition, the advanced | |
118 interface allows the input and output arrays of each transform to be | |
119 row-major subarrays of larger rank-<code>rank</code> arrays, described by | |
120 <code>inembed</code> and <code>onembed</code> parameters, respectively. | |
121 {<code>i</code>,<code>o</code>}<code>nembed</code> must be arrays of length <code>rank</code>, | |
122 and <code>n</code> should be elementwise less than or equal to | |
123 {<code>i</code>,<code>o</code>}<code>nembed</code>. Passing <code>NULL</code> for an | |
124 <code>nembed</code> parameter is equivalent to passing <code>n</code> (i.e. same | |
125 physical and logical dimensions, as in the basic interface.) | |
126 </p> | |
127 <p>The <code>stride</code> parameters indicate that the <code>j</code>-th element of | |
128 the input or output arrays is located at <code>j*istride</code> or | |
129 <code>j*ostride</code>, respectively. (For a multi-dimensional array, | |
130 <code>j</code> is the ordinary row-major index.) When combined with the | |
131 <code>k</code>-th transform in a <code>howmany</code> loop, from above, this means | |
132 that the (<code>j</code>,<code>k</code>)-th element is at <code>j*stride+k*dist</code>. | |
133 (The basic <code>fftw_plan_dft</code> interface corresponds to a stride of 1.) | |
134 <a name="index-stride-1"></a> | |
135 </p> | |
136 | |
137 <p>For in-place transforms, the input and output <code>stride</code> and | |
138 <code>dist</code> parameters should be the same; otherwise, the planner may | |
139 return <code>NULL</code>. | |
140 </p> | |
141 <p>Arrays <code>n</code>, <code>inembed</code>, and <code>onembed</code> are not used after | |
142 this function returns. You can safely free or reuse them. | |
143 </p> | |
144 <p><strong>Examples</strong>: | |
145 One transform of one 5 by 6 array contiguous in memory: | |
146 </p><div class="example"> | |
147 <pre class="example"> int rank = 2; | |
148 int n[] = {5, 6}; | |
149 int howmany = 1; | |
150 int idist = odist = 0; /* unused because howmany = 1 */ | |
151 int istride = ostride = 1; /* array is contiguous in memory */ | |
152 int *inembed = n, *onembed = n; | |
153 </pre></div> | |
154 | |
155 <p>Transform of three 5 by 6 arrays, each contiguous in memory, | |
156 stored in memory one after another: | |
157 </p><div class="example"> | |
158 <pre class="example"> int rank = 2; | |
159 int n[] = {5, 6}; | |
160 int howmany = 3; | |
161 int idist = odist = n[0]*n[1]; /* = 30, the distance in memory | |
162 between the first element | |
163 of the first array and the | |
164 first element of the second array */ | |
165 int istride = ostride = 1; /* array is contiguous in memory */ | |
166 int *inembed = n, *onembed = n; | |
167 </pre></div> | |
168 | |
169 <p>Transform each column of a 2d array with 10 rows and 3 columns: | |
170 </p><div class="example"> | |
171 <pre class="example"> int rank = 1; /* not 2: we are computing 1d transforms */ | |
172 int n[] = {10}; /* 1d transforms of length 10 */ | |
173 int howmany = 3; | |
174 int idist = odist = 1; | |
175 int istride = ostride = 3; /* distance between two elements in | |
176 the same column */ | |
177 int *inembed = n, *onembed = n; | |
178 </pre></div> | |
179 | |
180 <hr> | |
181 <div class="header"> | |
182 <p> | |
183 Next: <a href="Advanced-Real_002ddata-DFTs.html#Advanced-Real_002ddata-DFTs" accesskey="n" rel="next">Advanced Real-data DFTs</a>, Previous: <a href="Advanced-Interface.html#Advanced-Interface" accesskey="p" rel="prev">Advanced Interface</a>, Up: <a href="Advanced-Interface.html#Advanced-Interface" accesskey="u" rel="up">Advanced Interface</a> [<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> | |
184 </div> | |
185 | |
186 | |
187 | |
188 </body> | |
189 </html> |