annotate Lib/fftw-3.2.1/doc/html/.svn/text-base/More-DFTs-of-Real-Data.html.svn-base @ 9:262e084a15a9

Vectorised everything and made use of unique_ptr so there should be no more memory leaks. Hurrah for RAII
author Geogaddi\David <d.m.ronan@qmul.ac.uk>
date Wed, 12 Aug 2015 22:25:06 +0100
parents 25bf17994ef1
children
rev   line source
d@0 1 <html lang="en">
d@0 2 <head>
d@0 3 <title>More DFTs of Real Data - FFTW 3.2.1</title>
d@0 4 <meta http-equiv="Content-Type" content="text/html">
d@0 5 <meta name="description" content="FFTW 3.2.1">
d@0 6 <meta name="generator" content="makeinfo 4.8">
d@0 7 <link title="Top" rel="start" href="index.html#Top">
d@0 8 <link rel="up" href="Tutorial.html#Tutorial" title="Tutorial">
d@0 9 <link rel="prev" href="Multi_002dDimensional-DFTs-of-Real-Data.html#Multi_002dDimensional-DFTs-of-Real-Data" title="Multi-Dimensional DFTs of Real Data">
d@0 10 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
d@0 11 <!--
d@0 12 This manual is for FFTW
d@0 13 (version 3.2.1, 5 February 2009).
d@0 14
d@0 15 Copyright (C) 2003 Matteo Frigo.
d@0 16
d@0 17 Copyright (C) 2003 Massachusetts Institute of Technology.
d@0 18
d@0 19 Permission is granted to make and distribute verbatim copies of
d@0 20 this manual provided the copyright notice and this permission
d@0 21 notice are preserved on all copies.
d@0 22
d@0 23 Permission is granted to copy and distribute modified versions of
d@0 24 this manual under the conditions for verbatim copying, provided
d@0 25 that the entire resulting derived work is distributed under the
d@0 26 terms of a permission notice identical to this one.
d@0 27
d@0 28 Permission is granted to copy and distribute translations of this
d@0 29 manual into another language, under the above conditions for
d@0 30 modified versions, except that this permission notice may be
d@0 31 stated in a translation approved by the Free Software Foundation.
d@0 32 -->
d@0 33 <meta http-equiv="Content-Style-Type" content="text/css">
d@0 34 <style type="text/css"><!--
d@0 35 pre.display { font-family:inherit }
d@0 36 pre.format { font-family:inherit }
d@0 37 pre.smalldisplay { font-family:inherit; font-size:smaller }
d@0 38 pre.smallformat { font-family:inherit; font-size:smaller }
d@0 39 pre.smallexample { font-size:smaller }
d@0 40 pre.smalllisp { font-size:smaller }
d@0 41 span.sc { font-variant:small-caps }
d@0 42 span.roman { font-family:serif; font-weight:normal; }
d@0 43 span.sansserif { font-family:sans-serif; font-weight:normal; }
d@0 44 --></style>
d@0 45 </head>
d@0 46 <body>
d@0 47 <div class="node">
d@0 48 <p>
d@0 49 <a name="More-DFTs-of-Real-Data"></a>
d@0 50 Previous:&nbsp;<a rel="previous" accesskey="p" href="Multi_002dDimensional-DFTs-of-Real-Data.html#Multi_002dDimensional-DFTs-of-Real-Data">Multi-Dimensional DFTs of Real Data</a>,
d@0 51 Up:&nbsp;<a rel="up" accesskey="u" href="Tutorial.html#Tutorial">Tutorial</a>
d@0 52 <hr>
d@0 53 </div>
d@0 54
d@0 55 <h3 class="section">2.5 More DFTs of Real Data</h3>
d@0 56
d@0 57 <ul class="menu">
d@0 58 <li><a accesskey="1" href="The-Halfcomplex_002dformat-DFT.html#The-Halfcomplex_002dformat-DFT">The Halfcomplex-format DFT</a>
d@0 59 <li><a accesskey="2" href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html#Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029">Real even/odd DFTs (cosine/sine transforms)</a>
d@0 60 <li><a accesskey="3" href="The-Discrete-Hartley-Transform.html#The-Discrete-Hartley-Transform">The Discrete Hartley Transform</a>
d@0 61 </ul>
d@0 62
d@0 63 <p>FFTW supports several other transform types via a unified <dfn>r2r</dfn>
d@0 64 (real-to-real) interface,
d@0 65 <a name="index-r2r-64"></a>so called because it takes a real (<code>double</code>) array and outputs a
d@0 66 real array of the same size. These r2r transforms currently fall into
d@0 67 three categories: DFTs of real input and complex-Hermitian output in
d@0 68 halfcomplex format, DFTs of real input with even/odd symmetry
d@0 69 (a.k.a. discrete cosine/sine transforms, DCTs/DSTs), and discrete
d@0 70 Hartley transforms (DHTs), all described in more detail by the
d@0 71 following sections.
d@0 72
d@0 73 <p>The r2r transforms follow the by now familiar interface of creating an
d@0 74 <code>fftw_plan</code>, executing it with <code>fftw_execute(plan)</code>, and
d@0 75 destroying it with <code>fftw_destroy_plan(plan)</code>. Furthermore, all
d@0 76 r2r transforms share the same planner interface:
d@0 77
d@0 78 <pre class="example"> fftw_plan fftw_plan_r2r_1d(int n, double *in, double *out,
d@0 79 fftw_r2r_kind kind, unsigned flags);
d@0 80 fftw_plan fftw_plan_r2r_2d(int n0, int n1, double *in, double *out,
d@0 81 fftw_r2r_kind kind0, fftw_r2r_kind kind1,
d@0 82 unsigned flags);
d@0 83 fftw_plan fftw_plan_r2r_3d(int n0, int n1, int n2,
d@0 84 double *in, double *out,
d@0 85 fftw_r2r_kind kind0,
d@0 86 fftw_r2r_kind kind1,
d@0 87 fftw_r2r_kind kind2,
d@0 88 unsigned flags);
d@0 89 fftw_plan fftw_plan_r2r(int rank, const int *n, double *in, double *out,
d@0 90 const fftw_r2r_kind *kind, unsigned flags);
d@0 91 </pre>
d@0 92 <p><a name="index-fftw_005fplan_005fr2r_005f1d-65"></a><a name="index-fftw_005fplan_005fr2r_005f2d-66"></a><a name="index-fftw_005fplan_005fr2r_005f3d-67"></a><a name="index-fftw_005fplan_005fr2r-68"></a>
d@0 93 Just as for the complex DFT, these plan 1d/2d/3d/multi-dimensional
d@0 94 transforms for contiguous arrays in row-major order, transforming (real)
d@0 95 input to output of the same size, where <code>n</code> specifies the
d@0 96 <em>physical</em> dimensions of the arrays. All positive <code>n</code> are
d@0 97 supported (with the exception of <code>n=1</code> for the <code>FFTW_REDFT00</code>
d@0 98 kind, noted in the real-even subsection below); products of small
d@0 99 factors are most efficient (factorizing <code>n-1</code> and <code>n+1</code> for
d@0 100 <code>FFTW_REDFT00</code> and <code>FFTW_RODFT00</code> kinds, described below), but
d@0 101 an <i>O</i>(<i>n</i>&nbsp;log&nbsp;<i>n</i>) algorithm is used even for prime sizes.
d@0 102
d@0 103 <p>Each dimension has a <dfn>kind</dfn> parameter, of type
d@0 104 <code>fftw_r2r_kind</code>, specifying the kind of r2r transform to be used
d@0 105 for that dimension.
d@0 106 <a name="index-kind-_0028r2r_0029-69"></a><a name="index-fftw_005fr2r_005fkind-70"></a>(In the case of <code>fftw_plan_r2r</code>, this is an array <code>kind[rank]</code>
d@0 107 where <code>kind[i]</code> is the transform kind for the dimension
d@0 108 <code>n[i]</code>.) The kind can be one of a set of predefined constants,
d@0 109 defined in the following subsections.
d@0 110
d@0 111 <p>In other words, FFTW computes the separable product of the specified
d@0 112 r2r transforms over each dimension, which can be used e.g. for partial
d@0 113 differential equations with mixed boundary conditions. (For some r2r
d@0 114 kinds, notably the halfcomplex DFT and the DHT, such a separable
d@0 115 product is somewhat problematic in more than one dimension, however,
d@0 116 as is described below.)
d@0 117
d@0 118 <p>In the current version of FFTW, all r2r transforms except for the
d@0 119 halfcomplex type are computed via pre- or post-processing of
d@0 120 halfcomplex transforms, and they are therefore not as fast as they
d@0 121 could be. Since most other general DCT/DST codes employ a similar
d@0 122 algorithm, however, FFTW's implementation should provide at least
d@0 123 competitive performance.
d@0 124
d@0 125 <!-- =========> -->
d@0 126 </body></html>
d@0 127