cannam@95
|
1 <html lang="en">
|
cannam@95
|
2 <head>
|
cannam@95
|
3 <title>Guru Complex DFTs - FFTW 3.3.3</title>
|
cannam@95
|
4 <meta http-equiv="Content-Type" content="text/html">
|
cannam@95
|
5 <meta name="description" content="FFTW 3.3.3">
|
cannam@95
|
6 <meta name="generator" content="makeinfo 4.13">
|
cannam@95
|
7 <link title="Top" rel="start" href="index.html#Top">
|
cannam@95
|
8 <link rel="up" href="Guru-Interface.html#Guru-Interface" title="Guru Interface">
|
cannam@95
|
9 <link rel="prev" href="Guru-vector-and-transform-sizes.html#Guru-vector-and-transform-sizes" title="Guru vector and transform sizes">
|
cannam@95
|
10 <link rel="next" href="Guru-Real_002ddata-DFTs.html#Guru-Real_002ddata-DFTs" title="Guru Real-data DFTs">
|
cannam@95
|
11 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
cannam@95
|
12 <!--
|
cannam@95
|
13 This manual is for FFTW
|
cannam@95
|
14 (version 3.3.3, 25 November 2012).
|
cannam@95
|
15
|
cannam@95
|
16 Copyright (C) 2003 Matteo Frigo.
|
cannam@95
|
17
|
cannam@95
|
18 Copyright (C) 2003 Massachusetts Institute of Technology.
|
cannam@95
|
19
|
cannam@95
|
20 Permission is granted to make and distribute verbatim copies of
|
cannam@95
|
21 this manual provided the copyright notice and this permission
|
cannam@95
|
22 notice are preserved on all copies.
|
cannam@95
|
23
|
cannam@95
|
24 Permission is granted to copy and distribute modified versions of
|
cannam@95
|
25 this manual under the conditions for verbatim copying, provided
|
cannam@95
|
26 that the entire resulting derived work is distributed under the
|
cannam@95
|
27 terms of a permission notice identical to this one.
|
cannam@95
|
28
|
cannam@95
|
29 Permission is granted to copy and distribute translations of this
|
cannam@95
|
30 manual into another language, under the above conditions for
|
cannam@95
|
31 modified versions, except that this permission notice may be
|
cannam@95
|
32 stated in a translation approved by the Free Software Foundation.
|
cannam@95
|
33 -->
|
cannam@95
|
34 <meta http-equiv="Content-Style-Type" content="text/css">
|
cannam@95
|
35 <style type="text/css"><!--
|
cannam@95
|
36 pre.display { font-family:inherit }
|
cannam@95
|
37 pre.format { font-family:inherit }
|
cannam@95
|
38 pre.smalldisplay { font-family:inherit; font-size:smaller }
|
cannam@95
|
39 pre.smallformat { font-family:inherit; font-size:smaller }
|
cannam@95
|
40 pre.smallexample { font-size:smaller }
|
cannam@95
|
41 pre.smalllisp { font-size:smaller }
|
cannam@95
|
42 span.sc { font-variant:small-caps }
|
cannam@95
|
43 span.roman { font-family:serif; font-weight:normal; }
|
cannam@95
|
44 span.sansserif { font-family:sans-serif; font-weight:normal; }
|
cannam@95
|
45 --></style>
|
cannam@95
|
46 </head>
|
cannam@95
|
47 <body>
|
cannam@95
|
48 <div class="node">
|
cannam@95
|
49 <a name="Guru-Complex-DFTs"></a>
|
cannam@95
|
50 <p>
|
cannam@95
|
51 Next: <a rel="next" accesskey="n" href="Guru-Real_002ddata-DFTs.html#Guru-Real_002ddata-DFTs">Guru Real-data DFTs</a>,
|
cannam@95
|
52 Previous: <a rel="previous" accesskey="p" href="Guru-vector-and-transform-sizes.html#Guru-vector-and-transform-sizes">Guru vector and transform sizes</a>,
|
cannam@95
|
53 Up: <a rel="up" accesskey="u" href="Guru-Interface.html#Guru-Interface">Guru Interface</a>
|
cannam@95
|
54 <hr>
|
cannam@95
|
55 </div>
|
cannam@95
|
56
|
cannam@95
|
57 <h4 class="subsection">4.5.3 Guru Complex DFTs</h4>
|
cannam@95
|
58
|
cannam@95
|
59 <pre class="example"> fftw_plan fftw_plan_guru_dft(
|
cannam@95
|
60 int rank, const fftw_iodim *dims,
|
cannam@95
|
61 int howmany_rank, const fftw_iodim *howmany_dims,
|
cannam@95
|
62 fftw_complex *in, fftw_complex *out,
|
cannam@95
|
63 int sign, unsigned flags);
|
cannam@95
|
64
|
cannam@95
|
65 fftw_plan fftw_plan_guru_split_dft(
|
cannam@95
|
66 int rank, const fftw_iodim *dims,
|
cannam@95
|
67 int howmany_rank, const fftw_iodim *howmany_dims,
|
cannam@95
|
68 double *ri, double *ii, double *ro, double *io,
|
cannam@95
|
69 unsigned flags);
|
cannam@95
|
70 </pre>
|
cannam@95
|
71 <p><a name="index-fftw_005fplan_005fguru_005fdft-248"></a><a name="index-fftw_005fplan_005fguru_005fsplit_005fdft-249"></a>
|
cannam@95
|
72 These two functions plan a complex-data, multi-dimensional DFT
|
cannam@95
|
73 for the interleaved and split format, respectively.
|
cannam@95
|
74 Transform dimensions are given by (<code>rank</code>, <code>dims</code>) over a
|
cannam@95
|
75 multi-dimensional vector (loop) of dimensions (<code>howmany_rank</code>,
|
cannam@95
|
76 <code>howmany_dims</code>). <code>dims</code> and <code>howmany_dims</code> should point
|
cannam@95
|
77 to <code>fftw_iodim</code> arrays of length <code>rank</code> and
|
cannam@95
|
78 <code>howmany_rank</code>, respectively.
|
cannam@95
|
79
|
cannam@95
|
80 <p><a name="index-flags-250"></a><code>flags</code> is a bitwise OR (‘<samp><span class="samp">|</span></samp>’) of zero or more planner flags,
|
cannam@95
|
81 as defined in <a href="Planner-Flags.html#Planner-Flags">Planner Flags</a>.
|
cannam@95
|
82
|
cannam@95
|
83 <p>In the <code>fftw_plan_guru_dft</code> function, the pointers <code>in</code> and
|
cannam@95
|
84 <code>out</code> point to the interleaved input and output arrays,
|
cannam@95
|
85 respectively. The sign can be either -1 (=
|
cannam@95
|
86 <code>FFTW_FORWARD</code>) or +1 (= <code>FFTW_BACKWARD</code>). If the
|
cannam@95
|
87 pointers are equal, the transform is in-place.
|
cannam@95
|
88
|
cannam@95
|
89 <p>In the <code>fftw_plan_guru_split_dft</code> function,
|
cannam@95
|
90 <code>ri</code> and <code>ii</code> point to the real and imaginary input arrays,
|
cannam@95
|
91 and <code>ro</code> and <code>io</code> point to the real and imaginary output
|
cannam@95
|
92 arrays. The input and output pointers may be the same, indicating an
|
cannam@95
|
93 in-place transform. For example, for <code>fftw_complex</code> pointers
|
cannam@95
|
94 <code>in</code> and <code>out</code>, the corresponding parameters are:
|
cannam@95
|
95
|
cannam@95
|
96 <pre class="example"> ri = (double *) in;
|
cannam@95
|
97 ii = (double *) in + 1;
|
cannam@95
|
98 ro = (double *) out;
|
cannam@95
|
99 io = (double *) out + 1;
|
cannam@95
|
100 </pre>
|
cannam@95
|
101 <p>Because <code>fftw_plan_guru_split_dft</code> accepts split arrays, strides
|
cannam@95
|
102 are expressed in units of <code>double</code>. For a contiguous
|
cannam@95
|
103 <code>fftw_complex</code> array, the overall stride of the transform should
|
cannam@95
|
104 be 2, the distance between consecutive real parts or between
|
cannam@95
|
105 consecutive imaginary parts; see <a href="Guru-vector-and-transform-sizes.html#Guru-vector-and-transform-sizes">Guru vector and transform sizes</a>. Note that the dimension strides are applied equally to the
|
cannam@95
|
106 real and imaginary parts; real and imaginary arrays with different
|
cannam@95
|
107 strides are not supported.
|
cannam@95
|
108
|
cannam@95
|
109 <p>There is no <code>sign</code> parameter in <code>fftw_plan_guru_split_dft</code>.
|
cannam@95
|
110 This function always plans for an <code>FFTW_FORWARD</code> transform. To
|
cannam@95
|
111 plan for an <code>FFTW_BACKWARD</code> transform, you can exploit the
|
cannam@95
|
112 identity that the backwards DFT is equal to the forwards DFT with the
|
cannam@95
|
113 real and imaginary parts swapped. For example, in the case of the
|
cannam@95
|
114 <code>fftw_complex</code> arrays above, the <code>FFTW_BACKWARD</code> transform
|
cannam@95
|
115 is computed by the parameters:
|
cannam@95
|
116
|
cannam@95
|
117 <pre class="example"> ri = (double *) in + 1;
|
cannam@95
|
118 ii = (double *) in;
|
cannam@95
|
119 ro = (double *) out + 1;
|
cannam@95
|
120 io = (double *) out;
|
cannam@95
|
121 </pre>
|
cannam@95
|
122 <!-- =========> -->
|
cannam@95
|
123 </body></html>
|
cannam@95
|
124
|