annotate src/fftw-3.3.3/doc/html/Guru-Complex-DFTs.html @ 10:37bf6b4a2645

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