annotate src/fftw-3.3.8/doc/html/New_002darray-Execute-Functions.html @ 83:ae30d91d2ffe

Replace these with versions built using an older toolset (so as to avoid ABI compatibilities when linking on Ubuntu 14.04 for packaging purposes)
author Chris Cannam
date Fri, 07 Feb 2020 11:51:13 +0000
parents d0c2a83c1364
children
rev   line source
Chris@82 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Chris@82 2 <html>
Chris@82 3 <!-- This manual is for FFTW
Chris@82 4 (version 3.3.8, 24 May 2018).
Chris@82 5
Chris@82 6 Copyright (C) 2003 Matteo Frigo.
Chris@82 7
Chris@82 8 Copyright (C) 2003 Massachusetts Institute of Technology.
Chris@82 9
Chris@82 10 Permission is granted to make and distribute verbatim copies of this
Chris@82 11 manual provided the copyright notice and this permission notice are
Chris@82 12 preserved on all copies.
Chris@82 13
Chris@82 14 Permission is granted to copy and distribute modified versions of this
Chris@82 15 manual under the conditions for verbatim copying, provided that the
Chris@82 16 entire resulting derived work is distributed under the terms of a
Chris@82 17 permission notice identical to this one.
Chris@82 18
Chris@82 19 Permission is granted to copy and distribute translations of this manual
Chris@82 20 into another language, under the above conditions for modified versions,
Chris@82 21 except that this permission notice may be stated in a translation
Chris@82 22 approved by the Free Software Foundation. -->
Chris@82 23 <!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
Chris@82 24 <head>
Chris@82 25 <title>FFTW 3.3.8: New-array Execute Functions</title>
Chris@82 26
Chris@82 27 <meta name="description" content="FFTW 3.3.8: New-array Execute Functions">
Chris@82 28 <meta name="keywords" content="FFTW 3.3.8: New-array Execute Functions">
Chris@82 29 <meta name="resource-type" content="document">
Chris@82 30 <meta name="distribution" content="global">
Chris@82 31 <meta name="Generator" content="makeinfo">
Chris@82 32 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Chris@82 33 <link href="index.html#Top" rel="start" title="Top">
Chris@82 34 <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
Chris@82 35 <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
Chris@82 36 <link href="FFTW-Reference.html#FFTW-Reference" rel="up" title="FFTW Reference">
Chris@82 37 <link href="Wisdom.html#Wisdom" rel="next" title="Wisdom">
Chris@82 38 <link href="64_002dbit-Guru-Interface.html#g_t64_002dbit-Guru-Interface" rel="prev" title="64-bit Guru Interface">
Chris@82 39 <style type="text/css">
Chris@82 40 <!--
Chris@82 41 a.summary-letter {text-decoration: none}
Chris@82 42 blockquote.indentedblock {margin-right: 0em}
Chris@82 43 blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
Chris@82 44 blockquote.smallquotation {font-size: smaller}
Chris@82 45 div.display {margin-left: 3.2em}
Chris@82 46 div.example {margin-left: 3.2em}
Chris@82 47 div.lisp {margin-left: 3.2em}
Chris@82 48 div.smalldisplay {margin-left: 3.2em}
Chris@82 49 div.smallexample {margin-left: 3.2em}
Chris@82 50 div.smalllisp {margin-left: 3.2em}
Chris@82 51 kbd {font-style: oblique}
Chris@82 52 pre.display {font-family: inherit}
Chris@82 53 pre.format {font-family: inherit}
Chris@82 54 pre.menu-comment {font-family: serif}
Chris@82 55 pre.menu-preformatted {font-family: serif}
Chris@82 56 pre.smalldisplay {font-family: inherit; font-size: smaller}
Chris@82 57 pre.smallexample {font-size: smaller}
Chris@82 58 pre.smallformat {font-family: inherit; font-size: smaller}
Chris@82 59 pre.smalllisp {font-size: smaller}
Chris@82 60 span.nolinebreak {white-space: nowrap}
Chris@82 61 span.roman {font-family: initial; font-weight: normal}
Chris@82 62 span.sansserif {font-family: sans-serif; font-weight: normal}
Chris@82 63 ul.no-bullet {list-style: none}
Chris@82 64 -->
Chris@82 65 </style>
Chris@82 66
Chris@82 67
Chris@82 68 </head>
Chris@82 69
Chris@82 70 <body lang="en">
Chris@82 71 <a name="New_002darray-Execute-Functions"></a>
Chris@82 72 <div class="header">
Chris@82 73 <p>
Chris@82 74 Next: <a href="Wisdom.html#Wisdom" accesskey="n" rel="next">Wisdom</a>, Previous: <a href="Guru-Interface.html#Guru-Interface" accesskey="p" rel="prev">Guru Interface</a>, Up: <a href="FFTW-Reference.html#FFTW-Reference" accesskey="u" rel="up">FFTW Reference</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
Chris@82 75 </div>
Chris@82 76 <hr>
Chris@82 77 <a name="New_002darray-Execute-Functions-1"></a>
Chris@82 78 <h3 class="section">4.6 New-array Execute Functions</h3>
Chris@82 79 <a name="index-execute-2"></a>
Chris@82 80 <a name="index-new_002darray-execution"></a>
Chris@82 81
Chris@82 82 <p>Normally, one executes a plan for the arrays with which the plan was
Chris@82 83 created, by calling <code>fftw_execute(plan)</code> as described in <a href="Using-Plans.html#Using-Plans">Using Plans</a>.
Chris@82 84 <a name="index-fftw_005fexecute-2"></a>
Chris@82 85 However, it is possible for sophisticated users to apply a given plan
Chris@82 86 to a <em>different</em> array using the &ldquo;new-array execute&rdquo; functions
Chris@82 87 detailed below, provided that the following conditions are met:
Chris@82 88 </p>
Chris@82 89 <ul>
Chris@82 90 <li> The array size, strides, etcetera are the same (since those are set by
Chris@82 91 the plan).
Chris@82 92
Chris@82 93 </li><li> The input and output arrays are the same (in-place) or different
Chris@82 94 (out-of-place) if the plan was originally created to be in-place or
Chris@82 95 out-of-place, respectively.
Chris@82 96
Chris@82 97 </li><li> For split arrays, the separations between the real and imaginary
Chris@82 98 parts, <code>ii-ri</code> and <code>io-ro</code>, are the same as they were for
Chris@82 99 the input and output arrays when the plan was created. (This
Chris@82 100 condition is automatically satisfied for interleaved arrays.)
Chris@82 101
Chris@82 102 </li><li> The <em>alignment</em> of the new input/output arrays is the same as that
Chris@82 103 of the input/output arrays when the plan was created, unless the plan
Chris@82 104 was created with the <code>FFTW_UNALIGNED</code> flag.
Chris@82 105 <a name="index-FFTW_005fUNALIGNED-1"></a>
Chris@82 106 Here, the alignment is a platform-dependent quantity (for example, it is
Chris@82 107 the address modulo 16 if SSE SIMD instructions are used, but the address
Chris@82 108 modulo 4 for non-SIMD single-precision FFTW on the same machine). In
Chris@82 109 general, only arrays allocated with <code>fftw_malloc</code> are guaranteed to
Chris@82 110 be equally aligned (see <a href="SIMD-alignment-and-fftw_005fmalloc.html#SIMD-alignment-and-fftw_005fmalloc">SIMD alignment and fftw_malloc</a>).
Chris@82 111
Chris@82 112 </li></ul>
Chris@82 113
Chris@82 114 <a name="index-alignment-2"></a>
Chris@82 115 <p>The alignment issue is especially critical, because if you don&rsquo;t use
Chris@82 116 <code>fftw_malloc</code> then you may have little control over the alignment
Chris@82 117 of arrays in memory. For example, neither the C++ <code>new</code> function
Chris@82 118 nor the Fortran <code>allocate</code> statement provide strong enough
Chris@82 119 guarantees about data alignment. If you don&rsquo;t use <code>fftw_malloc</code>,
Chris@82 120 therefore, you probably have to use <code>FFTW_UNALIGNED</code> (which
Chris@82 121 disables most SIMD support). If possible, it is probably better for
Chris@82 122 you to simply create multiple plans (creating a new plan is quick once
Chris@82 123 one exists for a given size), or better yet re-use the same array for
Chris@82 124 your transforms.
Chris@82 125 </p>
Chris@82 126 <a name="index-fftw_005falignment_005fof-1"></a>
Chris@82 127 <p>For rare circumstances in which you cannot control the alignment of
Chris@82 128 allocated memory, but wish to determine where a given array is
Chris@82 129 aligned like the original array for which a plan was created, you can
Chris@82 130 use the <code>fftw_alignment_of</code> function:
Chris@82 131 </p><div class="example">
Chris@82 132 <pre class="example">int fftw_alignment_of(double *p);
Chris@82 133 </pre></div>
Chris@82 134 <p>Two arrays have equivalent alignment (for the purposes of applying a
Chris@82 135 plan) if and only if <code>fftw_alignment_of</code> returns the same value
Chris@82 136 for the corresponding pointers to their data (typecast to <code>double*</code>
Chris@82 137 if necessary).
Chris@82 138 </p>
Chris@82 139 <p>If you are tempted to use the new-array execute interface because you
Chris@82 140 want to transform a known bunch of arrays of the same size, you should
Chris@82 141 probably go use the advanced interface instead (see <a href="Advanced-Interface.html#Advanced-Interface">Advanced Interface</a>)).
Chris@82 142 </p>
Chris@82 143 <p>The new-array execute functions are:
Chris@82 144 </p>
Chris@82 145 <div class="example">
Chris@82 146 <pre class="example">void fftw_execute_dft(
Chris@82 147 const fftw_plan p,
Chris@82 148 fftw_complex *in, fftw_complex *out);
Chris@82 149
Chris@82 150 void fftw_execute_split_dft(
Chris@82 151 const fftw_plan p,
Chris@82 152 double *ri, double *ii, double *ro, double *io);
Chris@82 153
Chris@82 154 void fftw_execute_dft_r2c(
Chris@82 155 const fftw_plan p,
Chris@82 156 double *in, fftw_complex *out);
Chris@82 157
Chris@82 158 void fftw_execute_split_dft_r2c(
Chris@82 159 const fftw_plan p,
Chris@82 160 double *in, double *ro, double *io);
Chris@82 161
Chris@82 162 void fftw_execute_dft_c2r(
Chris@82 163 const fftw_plan p,
Chris@82 164 fftw_complex *in, double *out);
Chris@82 165
Chris@82 166 void fftw_execute_split_dft_c2r(
Chris@82 167 const fftw_plan p,
Chris@82 168 double *ri, double *ii, double *out);
Chris@82 169
Chris@82 170 void fftw_execute_r2r(
Chris@82 171 const fftw_plan p,
Chris@82 172 double *in, double *out);
Chris@82 173 </pre></div>
Chris@82 174 <a name="index-fftw_005fexecute_005fdft"></a>
Chris@82 175 <a name="index-fftw_005fexecute_005fsplit_005fdft"></a>
Chris@82 176 <a name="index-fftw_005fexecute_005fdft_005fr2c"></a>
Chris@82 177 <a name="index-fftw_005fexecute_005fsplit_005fdft_005fr2c"></a>
Chris@82 178 <a name="index-fftw_005fexecute_005fdft_005fc2r"></a>
Chris@82 179 <a name="index-fftw_005fexecute_005fsplit_005fdft_005fc2r"></a>
Chris@82 180 <a name="index-fftw_005fexecute_005fr2r"></a>
Chris@82 181
Chris@82 182 <p>These execute the <code>plan</code> to compute the corresponding transform on
Chris@82 183 the input/output arrays specified by the subsequent arguments. The
Chris@82 184 input/output array arguments have the same meanings as the ones passed
Chris@82 185 to the guru planner routines in the preceding sections. The <code>plan</code>
Chris@82 186 is not modified, and these routines can be called as many times as
Chris@82 187 desired, or intermixed with calls to the ordinary <code>fftw_execute</code>.
Chris@82 188 </p>
Chris@82 189 <p>The <code>plan</code> <em>must</em> have been created for the transform type
Chris@82 190 corresponding to the execute function, e.g. it must be a complex-DFT
Chris@82 191 plan for <code>fftw_execute_dft</code>. Any of the planner routines for that
Chris@82 192 transform type, from the basic to the guru interface, could have been
Chris@82 193 used to create the plan, however.
Chris@82 194 </p>
Chris@82 195 <hr>
Chris@82 196 <div class="header">
Chris@82 197 <p>
Chris@82 198 Next: <a href="Wisdom.html#Wisdom" accesskey="n" rel="next">Wisdom</a>, Previous: <a href="Guru-Interface.html#Guru-Interface" accesskey="p" rel="prev">Guru Interface</a>, Up: <a href="FFTW-Reference.html#FFTW-Reference" accesskey="u" rel="up">FFTW Reference</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
Chris@82 199 </div>
Chris@82 200
Chris@82 201
Chris@82 202
Chris@82 203 </body>
Chris@82 204 </html>