annotate src/fftw-3.3.5/doc/html/New_002darray-Execute-Functions.html @ 169:223a55898ab9 tip default

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