annotate Lib/fftw-3.2.1/doc/html/.svn/text-base/New_002darray-Execute-Functions.html.svn-base @ 4:345acbd06029

Vectorised most things to make lifer easier. Still no debug version though. Weird.
author Geogaddi\David <d.m.ronan@qmul.ac.uk>
date Fri, 10 Jul 2015 03:04:11 +0100
parents 25bf17994ef1
children
rev   line source
d@0 1 <html lang="en">
d@0 2 <head>
d@0 3 <title>New-array Execute Functions - 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="FFTW-Reference.html#FFTW-Reference" title="FFTW Reference">
d@0 9 <link rel="prev" href="Guru-Interface.html#Guru-Interface" title="Guru Interface">
d@0 10 <link rel="next" href="Wisdom.html#Wisdom" title="Wisdom">
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="New-array-Execute-Functions"></a>
d@0 51 <a name="New_002darray-Execute-Functions"></a>
d@0 52 Next:&nbsp;<a rel="next" accesskey="n" href="Wisdom.html#Wisdom">Wisdom</a>,
d@0 53 Previous:&nbsp;<a rel="previous" accesskey="p" href="Guru-Interface.html#Guru-Interface">Guru Interface</a>,
d@0 54 Up:&nbsp;<a rel="up" accesskey="u" href="FFTW-Reference.html#FFTW-Reference">FFTW Reference</a>
d@0 55 <hr>
d@0 56 </div>
d@0 57
d@0 58 <h3 class="section">4.6 New-array Execute Functions</h3>
d@0 59
d@0 60 <p><a name="index-execute-256"></a><a name="index-new_002darray-execution-257"></a>
d@0 61 Normally, one executes a plan for the arrays with which the plan was
d@0 62 created, by calling <code>fftw_execute(plan)</code> as described in <a href="Using-Plans.html#Using-Plans">Using Plans</a>.
d@0 63 <a name="index-fftw_005fexecute-258"></a>However, it is possible for sophisticated users to apply a given plan
d@0 64 to a <em>different</em> array using the &ldquo;new-array execute&rdquo; functions
d@0 65 detailed below, provided that the following conditions are met:
d@0 66
d@0 67 <ul>
d@0 68 <li>The array size, strides, etcetera are the same (since those are set by
d@0 69 the plan).
d@0 70
d@0 71 <li>The input and output arrays are the same (in-place) or different
d@0 72 (out-of-place) if the plan was originally created to be in-place or
d@0 73 out-of-place, respectively.
d@0 74
d@0 75 <li>For split arrays, the separations between the real and imaginary
d@0 76 parts, <code>ii-ri</code> and <code>io-ro</code>, are the same as they were for
d@0 77 the input and output arrays when the plan was created. (This
d@0 78 condition is automatically satisfied for interleaved arrays.)
d@0 79
d@0 80 <li>The <dfn>alignment</dfn> of the new input/output arrays is the same as that
d@0 81 of the input/output arrays when the plan was created, unless the plan
d@0 82 was created with the <code>FFTW_UNALIGNED</code> flag.
d@0 83 <a name="index-FFTW_005fUNALIGNED-259"></a>Here, the alignment is a platform-dependent quantity (for example, it is
d@0 84 the address modulo 16 if SSE SIMD instructions are used, but the address
d@0 85 modulo 4 for non-SIMD single-precision FFTW on the same machine). In
d@0 86 general, only arrays allocated with <code>fftw_malloc</code> are guaranteed to
d@0 87 be equally aligned (see <a href="SIMD-alignment-and-fftw_005fmalloc.html#SIMD-alignment-and-fftw_005fmalloc">SIMD alignment and fftw_malloc</a>).
d@0 88
d@0 89 </ul>
d@0 90
d@0 91 <p><a name="index-alignment-260"></a>The alignment issue is especially critical, because if you don't use
d@0 92 <code>fftw_malloc</code> then you may have little control over the alignment
d@0 93 of arrays in memory. For example, neither the C++ <code>new</code> function
d@0 94 nor the Fortran <code>allocate</code> statement provide strong enough
d@0 95 guarantees about data alignment. If you don't use <code>fftw_malloc</code>,
d@0 96 therefore, you probably have to use <code>FFTW_UNALIGNED</code> (which
d@0 97 disables most SIMD support). If possible, it is probably better for
d@0 98 you to simply create multiple plans (creating a new plan is quick once
d@0 99 one exists for a given size), or better yet re-use the same array for
d@0 100 your transforms.
d@0 101
d@0 102 <p>If you are tempted to use the new-array execute interface because you
d@0 103 want to transform a known bunch of arrays of the same size, you should
d@0 104 probably go use the advanced interface instead (see <a href="Advanced-Interface.html#Advanced-Interface">Advanced Interface</a>)).
d@0 105
d@0 106 <p>The new-array execute functions are:
d@0 107
d@0 108 <pre class="example"> void fftw_execute_dft(
d@0 109 const fftw_plan p,
d@0 110 fftw_complex *in, fftw_complex *out);
d@0 111
d@0 112 void fftw_execute_split_dft(
d@0 113 const fftw_plan p,
d@0 114 double *ri, double *ii, double *ro, double *io);
d@0 115
d@0 116 void fftw_execute_dft_r2c(
d@0 117 const fftw_plan p,
d@0 118 double *in, fftw_complex *out);
d@0 119
d@0 120 void fftw_execute_split_dft_r2c(
d@0 121 const fftw_plan p,
d@0 122 double *in, double *ro, double *io);
d@0 123
d@0 124 void fftw_execute_dft_c2r(
d@0 125 const fftw_plan p,
d@0 126 fftw_complex *in, double *out);
d@0 127
d@0 128 void fftw_execute_split_dft_c2r(
d@0 129 const fftw_plan p,
d@0 130 double *ri, double *ii, double *out);
d@0 131
d@0 132 void fftw_execute_r2r(
d@0 133 const fftw_plan p,
d@0 134 double *in, double *out);
d@0 135 </pre>
d@0 136 <p><a name="index-fftw_005fexecute_005fdft-261"></a><a name="index-fftw_005fexecute_005fsplit_005fdft-262"></a><a name="index-fftw_005fexecute_005fdft_005fr2c-263"></a><a name="index-fftw_005fexecute_005fsplit_005fdft_005fr2c-264"></a><a name="index-fftw_005fexecute_005fdft_005fc2r-265"></a><a name="index-fftw_005fexecute_005fsplit_005fdft_005fc2r-266"></a><a name="index-fftw_005fexecute_005fdft_005fr2r-267"></a>
d@0 137 These execute the <code>plan</code> to compute the corresponding transform on
d@0 138 the input/output arrays specified by the subsequent arguments. The
d@0 139 input/output array arguments have the same meanings as the ones passed
d@0 140 to the guru planner routines in the preceding sections. The <code>plan</code>
d@0 141 is not modified, and these routines can be called as many times as
d@0 142 desired, or intermixed with calls to the ordinary <code>fftw_execute</code>.
d@0 143
d@0 144 <p>The <code>plan</code> <em>must</em> have been created for the transform type
d@0 145 corresponding to the execute function, e.g. it must be a complex-DFT
d@0 146 plan for <code>fftw_execute_dft</code>. Any of the planner routines for that
d@0 147 transform type, from the basic to the guru interface, could have been
d@0 148 used to create the plan, however.
d@0 149
d@0 150 <!-- -->
d@0 151 </body></html>
d@0 152