Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.3/doc/html/Advanced-Complex-DFTs.html @ 95:89f5e221ed7b
Add FFTW3
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Wed, 20 Mar 2013 15:35:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
94:d278df1123f9 | 95:89f5e221ed7b |
---|---|
1 <html lang="en"> | |
2 <head> | |
3 <title>Advanced Complex DFTs - FFTW 3.3.3</title> | |
4 <meta http-equiv="Content-Type" content="text/html"> | |
5 <meta name="description" content="FFTW 3.3.3"> | |
6 <meta name="generator" content="makeinfo 4.13"> | |
7 <link title="Top" rel="start" href="index.html#Top"> | |
8 <link rel="up" href="Advanced-Interface.html#Advanced-Interface" title="Advanced Interface"> | |
9 <link rel="prev" href="Advanced-Interface.html#Advanced-Interface" title="Advanced Interface"> | |
10 <link rel="next" href="Advanced-Real_002ddata-DFTs.html#Advanced-Real_002ddata-DFTs" title="Advanced Real-data DFTs"> | |
11 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> | |
12 <!-- | |
13 This manual is for FFTW | |
14 (version 3.3.3, 25 November 2012). | |
15 | |
16 Copyright (C) 2003 Matteo Frigo. | |
17 | |
18 Copyright (C) 2003 Massachusetts Institute of Technology. | |
19 | |
20 Permission is granted to make and distribute verbatim copies of | |
21 this manual provided the copyright notice and this permission | |
22 notice are preserved on all copies. | |
23 | |
24 Permission is granted to copy and distribute modified versions of | |
25 this manual under the conditions for verbatim copying, provided | |
26 that the entire resulting derived work is distributed under the | |
27 terms of a permission notice identical to this one. | |
28 | |
29 Permission is granted to copy and distribute translations of this | |
30 manual into another language, under the above conditions for | |
31 modified versions, except that this permission notice may be | |
32 stated in a translation approved by the Free Software Foundation. | |
33 --> | |
34 <meta http-equiv="Content-Style-Type" content="text/css"> | |
35 <style type="text/css"><!-- | |
36 pre.display { font-family:inherit } | |
37 pre.format { font-family:inherit } | |
38 pre.smalldisplay { font-family:inherit; font-size:smaller } | |
39 pre.smallformat { font-family:inherit; font-size:smaller } | |
40 pre.smallexample { font-size:smaller } | |
41 pre.smalllisp { font-size:smaller } | |
42 span.sc { font-variant:small-caps } | |
43 span.roman { font-family:serif; font-weight:normal; } | |
44 span.sansserif { font-family:sans-serif; font-weight:normal; } | |
45 --></style> | |
46 </head> | |
47 <body> | |
48 <div class="node"> | |
49 <a name="Advanced-Complex-DFTs"></a> | |
50 <p> | |
51 Next: <a rel="next" accesskey="n" href="Advanced-Real_002ddata-DFTs.html#Advanced-Real_002ddata-DFTs">Advanced Real-data DFTs</a>, | |
52 Previous: <a rel="previous" accesskey="p" href="Advanced-Interface.html#Advanced-Interface">Advanced Interface</a>, | |
53 Up: <a rel="up" accesskey="u" href="Advanced-Interface.html#Advanced-Interface">Advanced Interface</a> | |
54 <hr> | |
55 </div> | |
56 | |
57 <h4 class="subsection">4.4.1 Advanced Complex DFTs</h4> | |
58 | |
59 <pre class="example"> fftw_plan fftw_plan_many_dft(int rank, const int *n, int howmany, | |
60 fftw_complex *in, const int *inembed, | |
61 int istride, int idist, | |
62 fftw_complex *out, const int *onembed, | |
63 int ostride, int odist, | |
64 int sign, unsigned flags); | |
65 </pre> | |
66 <p><a name="index-fftw_005fplan_005fmany_005fdft-232"></a> | |
67 This routine plans multiple multidimensional complex DFTs, and it | |
68 extends the <code>fftw_plan_dft</code> routine (see <a href="Complex-DFTs.html#Complex-DFTs">Complex DFTs</a>) to | |
69 compute <code>howmany</code> transforms, each having rank <code>rank</code> and size | |
70 <code>n</code>. In addition, the transform data need not be contiguous, but | |
71 it may be laid out in memory with an arbitrary stride. To account for | |
72 these possibilities, <code>fftw_plan_many_dft</code> adds the new parameters | |
73 <code>howmany</code>, {<code>i</code>,<code>o</code>}<code>nembed</code>, | |
74 {<code>i</code>,<code>o</code>}<code>stride</code>, and | |
75 {<code>i</code>,<code>o</code>}<code>dist</code>. The FFTW basic interface | |
76 (see <a href="Complex-DFTs.html#Complex-DFTs">Complex DFTs</a>) provides routines specialized for ranks 1, 2, | |
77 and 3, but the advanced interface handles only the general-rank | |
78 case. | |
79 | |
80 <p><code>howmany</code> is the number of transforms to compute. The resulting | |
81 plan computes <code>howmany</code> transforms, where the input of the | |
82 <code>k</code>-th transform is at location <code>in+k*idist</code> (in C pointer | |
83 arithmetic), and its output is at location <code>out+k*odist</code>. Plans | |
84 obtained in this way can often be faster than calling FFTW multiple | |
85 times for the individual transforms. The basic <code>fftw_plan_dft</code> | |
86 interface corresponds to <code>howmany=1</code> (in which case the <code>dist</code> | |
87 parameters are ignored). | |
88 <a name="index-howmany-parameter-233"></a><a name="index-dist-234"></a> | |
89 | |
90 <p>Each of the <code>howmany</code> transforms has rank <code>rank</code> and size | |
91 <code>n</code>, as in the basic interface. In addition, the advanced | |
92 interface allows the input and output arrays of each transform to be | |
93 row-major subarrays of larger rank-<code>rank</code> arrays, described by | |
94 <code>inembed</code> and <code>onembed</code> parameters, respectively. | |
95 {<code>i</code>,<code>o</code>}<code>nembed</code> must be arrays of length <code>rank</code>, | |
96 and <code>n</code> should be elementwise less than or equal to | |
97 {<code>i</code>,<code>o</code>}<code>nembed</code>. Passing <code>NULL</code> for an | |
98 <code>nembed</code> parameter is equivalent to passing <code>n</code> (i.e. same | |
99 physical and logical dimensions, as in the basic interface.) | |
100 | |
101 <p>The <code>stride</code> parameters indicate that the <code>j</code>-th element of | |
102 the input or output arrays is located at <code>j*istride</code> or | |
103 <code>j*ostride</code>, respectively. (For a multi-dimensional array, | |
104 <code>j</code> is the ordinary row-major index.) When combined with the | |
105 <code>k</code>-th transform in a <code>howmany</code> loop, from above, this means | |
106 that the (<code>j</code>,<code>k</code>)-th element is at <code>j*stride+k*dist</code>. | |
107 (The basic <code>fftw_plan_dft</code> interface corresponds to a stride of 1.) | |
108 <a name="index-stride-235"></a> | |
109 | |
110 <p>For in-place transforms, the input and output <code>stride</code> and | |
111 <code>dist</code> parameters should be the same; otherwise, the planner may | |
112 return <code>NULL</code>. | |
113 | |
114 <p>Arrays <code>n</code>, <code>inembed</code>, and <code>onembed</code> are not used after | |
115 this function returns. You can safely free or reuse them. | |
116 | |
117 <p><strong>Examples</strong>: | |
118 One transform of one 5 by 6 array contiguous in memory: | |
119 <pre class="example"> int rank = 2; | |
120 int n[] = {5, 6}; | |
121 int howmany = 1; | |
122 int idist = odist = 0; /* unused because howmany = 1 */ | |
123 int istride = ostride = 1; /* array is contiguous in memory */ | |
124 int *inembed = n, *onembed = n; | |
125 </pre> | |
126 <p>Transform of three 5 by 6 arrays, each contiguous in memory, | |
127 stored in memory one after another: | |
128 <pre class="example"> int rank = 2; | |
129 int n[] = {5, 6}; | |
130 int howmany = 3; | |
131 int idist = odist = n[0]*n[1]; /* = 30, the distance in memory | |
132 between the first element | |
133 of the first array and the | |
134 first element of the second array */ | |
135 int istride = ostride = 1; /* array is contiguous in memory */ | |
136 int *inembed = n, *onembed = n; | |
137 </pre> | |
138 <p>Transform each column of a 2d array with 10 rows and 3 columns: | |
139 <pre class="example"> int rank = 1; /* not 2: we are computing 1d transforms */ | |
140 int n[] = {10}; /* 1d transforms of length 10 */ | |
141 int howmany = 3; | |
142 int idist = odist = 1; | |
143 int istride = ostride = 3; /* distance between two elements in | |
144 the same column */ | |
145 int *inembed = n, *onembed = n; | |
146 </pre> | |
147 <!-- =========> --> | |
148 </body></html> | |
149 |