annotate fft/fftw/fftw-3.3.4/doc/html/Guru-Complex-DFTs.html @ 40:223f770b5341 kissfft-double tip

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