annotate src/fftw-3.3.3/doc/html/Guru-vector-and-transform-sizes.html @ 95:89f5e221ed7b

Add FFTW3
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 20 Mar 2013 15:35:50 +0000
parents
children
rev   line source
cannam@95 1 <html lang="en">
cannam@95 2 <head>
cannam@95 3 <title>Guru vector and transform sizes - 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="Interleaved-and-split-arrays.html#Interleaved-and-split-arrays" title="Interleaved and split arrays">
cannam@95 10 <link rel="next" href="Guru-Complex-DFTs.html#Guru-Complex-DFTs" title="Guru Complex 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-vector-and-transform-sizes"></a>
cannam@95 50 <p>
cannam@95 51 Next:&nbsp;<a rel="next" accesskey="n" href="Guru-Complex-DFTs.html#Guru-Complex-DFTs">Guru Complex DFTs</a>,
cannam@95 52 Previous:&nbsp;<a rel="previous" accesskey="p" href="Interleaved-and-split-arrays.html#Interleaved-and-split-arrays">Interleaved and split arrays</a>,
cannam@95 53 Up:&nbsp;<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.2 Guru vector and transform sizes</h4>
cannam@95 58
cannam@95 59 <p>The guru interface introduces one basic new data structure,
cannam@95 60 <code>fftw_iodim</code>, that is used to specify sizes and strides for
cannam@95 61 multi-dimensional transforms and vectors:
cannam@95 62
cannam@95 63 <pre class="example"> typedef struct {
cannam@95 64 int n;
cannam@95 65 int is;
cannam@95 66 int os;
cannam@95 67 } fftw_iodim;
cannam@95 68 </pre>
cannam@95 69 <p><a name="index-fftw_005fiodim-243"></a>
cannam@95 70 Here, <code>n</code> is the size of the dimension, and <code>is</code> and <code>os</code>
cannam@95 71 are the strides of that dimension for the input and output arrays. (The
cannam@95 72 stride is the separation of consecutive elements along this dimension.)
cannam@95 73
cannam@95 74 <p>The meaning of the stride parameter depends on the type of the array
cannam@95 75 that the stride refers to. <em>If the array is interleaved complex,
cannam@95 76 strides are expressed in units of complex numbers
cannam@95 77 (</em><code>fftw_complex</code><em>). If the array is split complex or real, strides
cannam@95 78 are expressed in units of real numbers (</em><code>double</code><em>).</em> This
cannam@95 79 convention is consistent with the usual pointer arithmetic in the C
cannam@95 80 language. An interleaved array is denoted by a pointer <code>p</code> to
cannam@95 81 <code>fftw_complex</code>, so that <code>p+1</code> points to the next complex
cannam@95 82 number. Split arrays are denoted by pointers to <code>double</code>, in
cannam@95 83 which case pointer arithmetic operates in units of
cannam@95 84 <code>sizeof(double)</code>.
cannam@95 85 <a name="index-stride-244"></a>
cannam@95 86
cannam@95 87 <p>The guru planner interfaces all take a (<code>rank</code>, <code>dims[rank]</code>)
cannam@95 88 pair describing the transform size, and a (<code>howmany_rank</code>,
cannam@95 89 <code>howmany_dims[howmany_rank]</code>) pair describing the &ldquo;vector&rdquo; size (a
cannam@95 90 multi-dimensional loop of transforms to perform), where <code>dims</code> and
cannam@95 91 <code>howmany_dims</code> are arrays of <code>fftw_iodim</code>.
cannam@95 92
cannam@95 93 <p>For example, the <code>howmany</code> parameter in the advanced complex-DFT
cannam@95 94 interface corresponds to <code>howmany_rank</code> = 1,
cannam@95 95 <code>howmany_dims[0].n</code> = <code>howmany</code>, <code>howmany_dims[0].is</code> =
cannam@95 96 <code>idist</code>, and <code>howmany_dims[0].os</code> = <code>odist</code>.
cannam@95 97 <a name="index-howmany-loop-245"></a><a name="index-dist-246"></a>(To compute a single transform, you can just use <code>howmany_rank</code> = 0.)
cannam@95 98
cannam@95 99 <p>A row-major multidimensional array with dimensions <code>n[rank]</code>
cannam@95 100 (see <a href="Row_002dmajor-Format.html#Row_002dmajor-Format">Row-major Format</a>) corresponds to <code>dims[i].n</code> =
cannam@95 101 <code>n[i]</code> and the recurrence <code>dims[i].is</code> = <code>n[i+1] *
cannam@95 102 dims[i+1].is</code> (similarly for <code>os</code>). The stride of the last
cannam@95 103 (<code>i=rank-1</code>) dimension is the overall stride of the array.
cannam@95 104 e.g. to be equivalent to the advanced complex-DFT interface, you would
cannam@95 105 have <code>dims[rank-1].is</code> = <code>istride</code> and
cannam@95 106 <code>dims[rank-1].os</code> = <code>ostride</code>.
cannam@95 107 <a name="index-row_002dmajor-247"></a>
cannam@95 108
cannam@95 109 <p>In general, we only guarantee FFTW to return a non-<code>NULL</code> plan if
cannam@95 110 the vector and transform dimensions correspond to a set of distinct
cannam@95 111 indices, and for in-place transforms the input/output strides should
cannam@95 112 be the same.
cannam@95 113
cannam@95 114 <!-- =========> -->
cannam@95 115 </body></html>
cannam@95 116