annotate Lib/fftw-3.2.1/doc/html/.svn/text-base/Real_002ddata-DFT-Array-Format.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>Real-data DFT Array Format - 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="Basic-Interface.html#Basic-Interface" title="Basic Interface">
d@0 9 <link rel="prev" href="Real_002ddata-DFTs.html#Real_002ddata-DFTs" title="Real-data DFTs">
d@0 10 <link rel="next" href="Real_002dto_002dReal-Transforms.html#Real_002dto_002dReal-Transforms" title="Real-to-Real Transforms">
d@0 11 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
d@0 12 <!--
d@0 13 This manual is for FFTW
d@0 14 (version 3.2.1, 5 February 2009).
d@0 15
d@0 16 Copyright (C) 2003 Matteo Frigo.
d@0 17
d@0 18 Copyright (C) 2003 Massachusetts Institute of Technology.
d@0 19
d@0 20 Permission is granted to make and distribute verbatim copies of
d@0 21 this manual provided the copyright notice and this permission
d@0 22 notice are preserved on all copies.
d@0 23
d@0 24 Permission is granted to copy and distribute modified versions of
d@0 25 this manual under the conditions for verbatim copying, provided
d@0 26 that the entire resulting derived work is distributed under the
d@0 27 terms of a permission notice identical to this one.
d@0 28
d@0 29 Permission is granted to copy and distribute translations of this
d@0 30 manual into another language, under the above conditions for
d@0 31 modified versions, except that this permission notice may be
d@0 32 stated in a translation approved by the Free Software Foundation.
d@0 33 -->
d@0 34 <meta http-equiv="Content-Style-Type" content="text/css">
d@0 35 <style type="text/css"><!--
d@0 36 pre.display { font-family:inherit }
d@0 37 pre.format { font-family:inherit }
d@0 38 pre.smalldisplay { font-family:inherit; font-size:smaller }
d@0 39 pre.smallformat { font-family:inherit; font-size:smaller }
d@0 40 pre.smallexample { font-size:smaller }
d@0 41 pre.smalllisp { font-size:smaller }
d@0 42 span.sc { font-variant:small-caps }
d@0 43 span.roman { font-family:serif; font-weight:normal; }
d@0 44 span.sansserif { font-family:sans-serif; font-weight:normal; }
d@0 45 --></style>
d@0 46 </head>
d@0 47 <body>
d@0 48 <div class="node">
d@0 49 <p>
d@0 50 <a name="Real-data-DFT-Array-Format"></a>
d@0 51 <a name="Real_002ddata-DFT-Array-Format"></a>
d@0 52 Next:&nbsp;<a rel="next" accesskey="n" href="Real_002dto_002dReal-Transforms.html#Real_002dto_002dReal-Transforms">Real-to-Real Transforms</a>,
d@0 53 Previous:&nbsp;<a rel="previous" accesskey="p" href="Real_002ddata-DFTs.html#Real_002ddata-DFTs">Real-data DFTs</a>,
d@0 54 Up:&nbsp;<a rel="up" accesskey="u" href="Basic-Interface.html#Basic-Interface">Basic Interface</a>
d@0 55 <hr>
d@0 56 </div>
d@0 57
d@0 58 <h4 class="subsection">4.3.4 Real-data DFT Array Format</h4>
d@0 59
d@0 60 <p><a name="index-r2c_002fc2r-multi_002ddimensional-array-format-190"></a>
d@0 61 The output of a DFT of real data (r2c) contains symmetries that, in
d@0 62 principle, make half of the outputs redundant (see <a href="What-FFTW-Really-Computes.html#What-FFTW-Really-Computes">What FFTW Really Computes</a>). (Similarly for the input of an inverse c2r transform.) In
d@0 63 practice, it is not possible to entirely realize these savings in an
d@0 64 efficient and understandable format that generalizes to
d@0 65 multi-dimensional transforms. Instead, the output of the r2c
d@0 66 transforms is <em>slightly</em> over half of the output of the
d@0 67 corresponding complex transform. We do not &ldquo;pack&rdquo; the data in any
d@0 68 way, but store it as an ordinary array of <code>fftw_complex</code> values.
d@0 69 In fact, this data is simply a subsection of what would be the array in
d@0 70 the corresponding complex transform.
d@0 71
d@0 72 <p>Specifically, for a real transform of d (= <code>rank</code>)
d@0 73 dimensions n<sub>0</sub>&nbsp;&times;&nbsp;n<sub>1</sub>&nbsp;&times;&nbsp;n<sub>2</sub>&nbsp;&times;&nbsp;&hellip;&nbsp;&times;&nbsp;n<sub>d-1</sub>, the complex data is an n<sub>0</sub>&nbsp;&times;&nbsp;n<sub>1</sub>&nbsp;&times;&nbsp;n<sub>2</sub>&nbsp;&times;&nbsp;&hellip;&nbsp;&times;&nbsp;(n<sub>d-1</sub>/2 + 1) array of
d@0 74 <code>fftw_complex</code> values in row-major order (with the division rounded
d@0 75 down). That is, we only store the <em>lower</em> half (non-negative
d@0 76 frequencies), plus one element, of the last dimension of the data from
d@0 77 the ordinary complex transform. (We could have instead taken half of
d@0 78 any other dimension, but implementation turns out to be simpler if the
d@0 79 last, contiguous, dimension is used.)
d@0 80
d@0 81 <p><a name="index-out_002dof_002dplace-191"></a>For an out-of-place transform, the real data is simply an array with
d@0 82 physical dimensions n<sub>0</sub>&nbsp;&times;&nbsp;n<sub>1</sub>&nbsp;&times;&nbsp;n<sub>2</sub>&nbsp;&times;&nbsp;&hellip;&nbsp;&times;&nbsp;n<sub>d-1</sub> in row-major order.
d@0 83
d@0 84 <p><a name="index-in_002dplace-192"></a><a name="index-padding-193"></a>For an in-place transform, some complications arise since the complex data
d@0 85 is slightly larger than the real data. In this case, the final
d@0 86 dimension of the real data must be <em>padded</em> with extra values to
d@0 87 accommodate the size of the complex data&mdash;two extra if the last
d@0 88 dimension is even and one if it is odd. That is, the last dimension of
d@0 89 the real data must physically contain
d@0 90 2 * (n<sub>d-1</sub>/2+1)<code>double</code> values (exactly enough to hold the complex data). This
d@0 91 physical array size does not, however, change the <em>logical</em> array
d@0 92 size&mdash;only
d@0 93 n<sub>d-1</sub>values are actually stored in the last dimension, and
d@0 94 n<sub>d-1</sub>is the last dimension passed to the planner.
d@0 95
d@0 96 <!-- =========> -->
d@0 97 </body></html>
d@0 98