3
<title>Guru Complex DFTs - FFTW 3.1.2</title>
4
<meta http-equiv="Content-Type" content="text/html">
5
<meta name="description" content="FFTW 3.1.2">
6
<meta name="generator" content="makeinfo 4.8">
7
<link title="Top" rel="start" href="index.html#Top">
8
<link rel="up" href="Guru-Interface.html#Guru-Interface" title="Guru Interface">
9
<link rel="prev" href="Guru-vector-and-transform-sizes.html#Guru-vector-and-transform-sizes" title="Guru vector and transform sizes">
10
<link rel="next" href="Guru-Real_002ddata-DFTs.html#Guru-Real_002ddata-DFTs" title="Guru Real-data DFTs">
11
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
13
This manual is for FFTW
14
(version 3.1.2, 23 June 2006).
16
Copyright (C) 2003 Matteo Frigo.
18
Copyright (C) 2003 Massachusetts Institute of Technology.
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.
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.
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.
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; }
50
<a name="Guru-Complex-DFTs"></a>
51
Next: <a rel="next" accesskey="n" href="Guru-Real_002ddata-DFTs.html#Guru-Real_002ddata-DFTs">Guru Real-data DFTs</a>,
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>,
53
Up: <a rel="up" accesskey="u" href="Guru-Interface.html#Guru-Interface">Guru Interface</a>
57
<h4 class="subsection">4.5.3 Guru Complex DFTs</h4>
59
<pre class="example"> fftw_plan fftw_plan_guru_dft(
60
int rank, const fftw_iodim *dims,
61
int howmany_rank, const fftw_iodim *howmany_dims,
62
fftw_complex *in, fftw_complex *out,
63
int sign, unsigned flags);
65
fftw_plan fftw_plan_guru_split_dft(
66
int rank, const fftw_iodim *dims,
67
int howmany_rank, const fftw_iodim *howmany_dims,
68
double *ri, double *ii, double *ro, double *io,
71
<p><a name="index-fftw_005fplan_005fguru_005fdft-238"></a><a name="index-fftw_005fplan_005fguru_005fsplit_005fdft-239"></a>
72
These two functions plan a complex-data, multi-dimensional DFT
73
for the interleaved and split format, respectively.
74
Transform dimensions are given by (<code>rank</code>, <code>dims</code>) over a
75
multi-dimensional vector (loop) of dimensions (<code>howmany_rank</code>,
76
<code>howmany_dims</code>). <code>dims</code> and <code>howmany_dims</code> should point
77
to <code>fftw_iodim</code> arrays of length <code>rank</code> and
78
<code>howmany_rank</code>, respectively.
80
<p><a name="index-flags-240"></a><code>flags</code> is a bitwise OR (`<samp><span class="samp">|</span></samp>') of zero or more planner flags,
81
as defined in <a href="Planner-Flags.html#Planner-Flags">Planner Flags</a>.
83
<p>In the <code>fftw_plan_guru_dft</code> function, the pointers <code>in</code> and
84
<code>out</code> point to the interleaved input and output arrays,
85
respectively. The sign can be either -1 (=
86
<code>FFTW_FORWARD</code>) or +1 (= <code>FFTW_BACKWARD</code>). If the
87
pointers are equal, the transform is in-place.
89
<p>In the <code>fftw_plan_guru_split_dft</code> function,
90
<code>ri</code> and <code>ii</code> point to the real and imaginary input arrays,
91
and <code>ro</code> and <code>io</code> point to the real and imaginary output
92
arrays. The input and output pointers may be the same, indicating an
93
in-place transform. For example, for <code>fftw_complex</code> pointers
94
<code>in</code> and <code>out</code>, the corresponding parameters are:
96
<pre class="example"> ri = (double *) in;
97
ii = (double *) in + 1;
99
io = (double *) out + 1;
101
<p>Because <code>fftw_plan_guru_split_dft</code> accepts split arrays, strides
102
are expressed in units of <code>double</code>. For a contiguous
103
<code>fftw_complex</code> array, the overall stride of the transform should
104
be 2, the distance between consecutive real parts or between
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
106
real and imaginary parts; real and imaginary arrays with different
107
strides are not supported.
109
<p>There is no <code>sign</code> parameter in <code>fftw_plan_guru_split_dft</code>.
110
This function always plans for an <code>FFTW_FORWARD</code> transform. To
111
plan for an <code>FFTW_BACKWARD</code> transform, you can exploit the
112
identity that the backwards DFT is equal to the forwards DFT with the
113
real and imaginary parts swapped. For example, in the case of the
114
<code>fftw_complex</code> arrays above, the <code>FFTW_BACKWARD</code> transform
115
is computed by the parameters:
117
<pre class="example"> ri = (double *) in + 1;
119
ro = (double *) out + 1;