annotate src/fftw-3.3.8/doc/html/Planner-Flags.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: Planner Flags</title>
Chris@82 26
Chris@82 27 <meta name="description" content="FFTW 3.3.8: Planner Flags">
Chris@82 28 <meta name="keywords" content="FFTW 3.3.8: Planner Flags">
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="Basic-Interface.html#Basic-Interface" rel="up" title="Basic Interface">
Chris@82 37 <link href="Real_002ddata-DFTs.html#Real_002ddata-DFTs" rel="next" title="Real-data DFTs">
Chris@82 38 <link href="Complex-DFTs.html#Complex-DFTs" rel="prev" title="Complex DFTs">
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="Planner-Flags"></a>
Chris@82 72 <div class="header">
Chris@82 73 <p>
Chris@82 74 Next: <a href="Real_002ddata-DFTs.html#Real_002ddata-DFTs" accesskey="n" rel="next">Real-data DFTs</a>, Previous: <a href="Complex-DFTs.html#Complex-DFTs" accesskey="p" rel="prev">Complex DFTs</a>, Up: <a href="Basic-Interface.html#Basic-Interface" accesskey="u" rel="up">Basic Interface</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="Planner-Flags-1"></a>
Chris@82 78 <h4 class="subsection">4.3.2 Planner Flags</h4>
Chris@82 79
Chris@82 80 <p>All of the planner routines in FFTW accept an integer <code>flags</code>
Chris@82 81 argument, which is a bitwise OR (&lsquo;<samp>|</samp>&rsquo;) of zero or more of the flag
Chris@82 82 constants defined below. These flags control the rigor (and time) of
Chris@82 83 the planning process, and can also impose (or lift) restrictions on the
Chris@82 84 type of transform algorithm that is employed.
Chris@82 85 </p>
Chris@82 86 <p><em>Important:</em> the planner overwrites the input array during
Chris@82 87 planning unless a saved plan (see <a href="Wisdom.html#Wisdom">Wisdom</a>) is available for that
Chris@82 88 problem, so you should initialize your input data after creating the
Chris@82 89 plan. The only exceptions to this are the <code>FFTW_ESTIMATE</code> and
Chris@82 90 <code>FFTW_WISDOM_ONLY</code> flags, as mentioned below.
Chris@82 91 </p>
Chris@82 92 <p>In all cases, if wisdom is available for the given problem that was
Chris@82 93 created with equal-or-greater planning rigor, then the more rigorous
Chris@82 94 wisdom is used. For example, in <code>FFTW_ESTIMATE</code> mode any available
Chris@82 95 wisdom is used, whereas in <code>FFTW_PATIENT</code> mode only wisdom created
Chris@82 96 in patient or exhaustive mode can be used. See <a href="Words-of-Wisdom_002dSaving-Plans.html#Words-of-Wisdom_002dSaving-Plans">Words of Wisdom-Saving Plans</a>.
Chris@82 97 </p>
Chris@82 98 <a name="Planning_002drigor-flags"></a>
Chris@82 99 <h4 class="subsubheading">Planning-rigor flags</h4>
Chris@82 100 <ul>
Chris@82 101 <li> <a name="index-FFTW_005fESTIMATE-2"></a>
Chris@82 102 <code>FFTW_ESTIMATE</code> specifies that, instead of actual measurements of
Chris@82 103 different algorithms, a simple heuristic is used to pick a (probably
Chris@82 104 sub-optimal) plan quickly. With this flag, the input/output arrays are
Chris@82 105 not overwritten during planning.
Chris@82 106
Chris@82 107 </li><li> <a name="index-FFTW_005fMEASURE-2"></a>
Chris@82 108 <code>FFTW_MEASURE</code> tells FFTW to find an optimized plan by actually
Chris@82 109 <em>computing</em> several FFTs and measuring their execution time.
Chris@82 110 Depending on your machine, this can take some time (often a few
Chris@82 111 seconds). <code>FFTW_MEASURE</code> is the default planning option.
Chris@82 112
Chris@82 113 </li><li> <a name="index-FFTW_005fPATIENT-2"></a>
Chris@82 114 <code>FFTW_PATIENT</code> is like <code>FFTW_MEASURE</code>, but considers a wider
Chris@82 115 range of algorithms and often produces a &ldquo;more optimal&rdquo; plan
Chris@82 116 (especially for large transforms), but at the expense of several times
Chris@82 117 longer planning time (especially for large transforms).
Chris@82 118
Chris@82 119 </li><li> <a name="index-FFTW_005fEXHAUSTIVE-1"></a>
Chris@82 120 <code>FFTW_EXHAUSTIVE</code> is like <code>FFTW_PATIENT</code>, but considers an
Chris@82 121 even wider range of algorithms, including many that we think are
Chris@82 122 unlikely to be fast, to produce the most optimal plan but with a
Chris@82 123 substantially increased planning time.
Chris@82 124
Chris@82 125 </li><li> <a name="index-FFTW_005fWISDOM_005fONLY"></a>
Chris@82 126 <code>FFTW_WISDOM_ONLY</code> is a special planning mode in which the plan
Chris@82 127 is only created if wisdom is available for the given problem, and
Chris@82 128 otherwise a <code>NULL</code> plan is returned. This can be combined with
Chris@82 129 other flags, e.g. &lsquo;<samp>FFTW_WISDOM_ONLY | FFTW_PATIENT</samp>&rsquo; creates a
Chris@82 130 plan only if wisdom is available that was created in
Chris@82 131 <code>FFTW_PATIENT</code> or <code>FFTW_EXHAUSTIVE</code> mode. The
Chris@82 132 <code>FFTW_WISDOM_ONLY</code> flag is intended for users who need to detect
Chris@82 133 whether wisdom is available; for example, if wisdom is not available
Chris@82 134 one may wish to allocate new arrays for planning so that user data is
Chris@82 135 not overwritten.
Chris@82 136
Chris@82 137 </li></ul>
Chris@82 138
Chris@82 139 <a name="Algorithm_002drestriction-flags"></a>
Chris@82 140 <h4 class="subsubheading">Algorithm-restriction flags</h4>
Chris@82 141 <ul>
Chris@82 142 <li> <a name="index-FFTW_005fDESTROY_005fINPUT"></a>
Chris@82 143 <code>FFTW_DESTROY_INPUT</code> specifies that an out-of-place transform is
Chris@82 144 allowed to <em>overwrite its input</em> array with arbitrary data; this
Chris@82 145 can sometimes allow more efficient algorithms to be employed.
Chris@82 146 <a name="index-out_002dof_002dplace"></a>
Chris@82 147
Chris@82 148 </li><li> <a name="index-FFTW_005fPRESERVE_005fINPUT-1"></a>
Chris@82 149 <code>FFTW_PRESERVE_INPUT</code> specifies that an out-of-place transform must
Chris@82 150 <em>not change its input</em> array. This is ordinarily the
Chris@82 151 <em>default</em>, except for c2r and hc2r (i.e. complex-to-real)
Chris@82 152 transforms for which <code>FFTW_DESTROY_INPUT</code> is the default. In the
Chris@82 153 latter cases, passing <code>FFTW_PRESERVE_INPUT</code> will attempt to use
Chris@82 154 algorithms that do not destroy the input, at the expense of worse
Chris@82 155 performance; for multi-dimensional c2r transforms, however, no
Chris@82 156 input-preserving algorithms are implemented and the planner will return
Chris@82 157 <code>NULL</code> if one is requested.
Chris@82 158 <a name="index-c2r-1"></a>
Chris@82 159 <a name="index-hc2r-1"></a>
Chris@82 160
Chris@82 161 </li><li> <a name="index-FFTW_005fUNALIGNED"></a>
Chris@82 162 <a name="index-alignment-1"></a>
Chris@82 163 <a name="index-fftw_005fmalloc-4"></a>
Chris@82 164 <a name="index-fftw_005falignment_005fof"></a>
Chris@82 165 <code>FFTW_UNALIGNED</code> specifies that the algorithm may not impose any
Chris@82 166 unusual alignment requirements on the input/output arrays (i.e. no
Chris@82 167 SIMD may be used). This flag is normally <em>not necessary</em>, since
Chris@82 168 the planner automatically detects misaligned arrays. The only use for
Chris@82 169 this flag is if you want to use the new-array execute interface to
Chris@82 170 execute a given plan on a different array that may not be aligned like
Chris@82 171 the original. (Using <code>fftw_malloc</code> makes this flag unnecessary
Chris@82 172 even then. You can also use <code>fftw_alignment_of</code> to detect
Chris@82 173 whether two arrays are equivalently aligned.)
Chris@82 174
Chris@82 175 </li></ul>
Chris@82 176
Chris@82 177 <a name="Limiting-planning-time"></a>
Chris@82 178 <h4 class="subsubheading">Limiting planning time</h4>
Chris@82 179
Chris@82 180 <div class="example">
Chris@82 181 <pre class="example">extern void fftw_set_timelimit(double seconds);
Chris@82 182 </pre></div>
Chris@82 183 <a name="index-fftw_005fset_005ftimelimit"></a>
Chris@82 184
Chris@82 185 <p>This function instructs FFTW to spend at most <code>seconds</code> seconds
Chris@82 186 (approximately) in the planner. If <code>seconds ==
Chris@82 187 FFTW_NO_TIMELIMIT</code> (the default value, which is negative), then
Chris@82 188 planning time is unbounded. Otherwise, FFTW plans with a
Chris@82 189 progressively wider range of algorithms until the the given time limit
Chris@82 190 is reached or the given range of algorithms is explored, returning the
Chris@82 191 best available plan.
Chris@82 192 <a name="index-FFTW_005fNO_005fTIMELIMIT"></a>
Chris@82 193 </p>
Chris@82 194
Chris@82 195 <p>For example, specifying <code>FFTW_PATIENT</code> first plans in
Chris@82 196 <code>FFTW_ESTIMATE</code> mode, then in <code>FFTW_MEASURE</code> mode, then
Chris@82 197 finally (time permitting) in <code>FFTW_PATIENT</code>. If
Chris@82 198 <code>FFTW_EXHAUSTIVE</code> is specified instead, the planner will further
Chris@82 199 progress to <code>FFTW_EXHAUSTIVE</code> mode.
Chris@82 200 </p>
Chris@82 201 <p>Note that the <code>seconds</code> argument specifies only a rough limit; in
Chris@82 202 practice, the planner may use somewhat more time if the time limit is
Chris@82 203 reached when the planner is in the middle of an operation that cannot
Chris@82 204 be interrupted. At the very least, the planner will complete planning
Chris@82 205 in <code>FFTW_ESTIMATE</code> mode (which is thus equivalent to a time limit
Chris@82 206 of 0).
Chris@82 207 </p>
Chris@82 208
Chris@82 209 <hr>
Chris@82 210 <div class="header">
Chris@82 211 <p>
Chris@82 212 Next: <a href="Real_002ddata-DFTs.html#Real_002ddata-DFTs" accesskey="n" rel="next">Real-data DFTs</a>, Previous: <a href="Complex-DFTs.html#Complex-DFTs" accesskey="p" rel="prev">Complex DFTs</a>, Up: <a href="Basic-Interface.html#Basic-Interface" accesskey="u" rel="up">Basic Interface</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 213 </div>
Chris@82 214
Chris@82 215
Chris@82 216
Chris@82 217 </body>
Chris@82 218 </html>