annotate src/fftw-3.3.8/doc/html/Planner-Flags.html @ 167:bd3cc4d1df30

Add FFTW 3.3.8 source, and a Linux build
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 19 Nov 2019 14:52:55 +0000
parents
children
rev   line source
cannam@167 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
cannam@167 2 <html>
cannam@167 3 <!-- This manual is for FFTW
cannam@167 4 (version 3.3.8, 24 May 2018).
cannam@167 5
cannam@167 6 Copyright (C) 2003 Matteo Frigo.
cannam@167 7
cannam@167 8 Copyright (C) 2003 Massachusetts Institute of Technology.
cannam@167 9
cannam@167 10 Permission is granted to make and distribute verbatim copies of this
cannam@167 11 manual provided the copyright notice and this permission notice are
cannam@167 12 preserved on all copies.
cannam@167 13
cannam@167 14 Permission is granted to copy and distribute modified versions of this
cannam@167 15 manual under the conditions for verbatim copying, provided that the
cannam@167 16 entire resulting derived work is distributed under the terms of a
cannam@167 17 permission notice identical to this one.
cannam@167 18
cannam@167 19 Permission is granted to copy and distribute translations of this manual
cannam@167 20 into another language, under the above conditions for modified versions,
cannam@167 21 except that this permission notice may be stated in a translation
cannam@167 22 approved by the Free Software Foundation. -->
cannam@167 23 <!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
cannam@167 24 <head>
cannam@167 25 <title>FFTW 3.3.8: Planner Flags</title>
cannam@167 26
cannam@167 27 <meta name="description" content="FFTW 3.3.8: Planner Flags">
cannam@167 28 <meta name="keywords" content="FFTW 3.3.8: Planner Flags">
cannam@167 29 <meta name="resource-type" content="document">
cannam@167 30 <meta name="distribution" content="global">
cannam@167 31 <meta name="Generator" content="makeinfo">
cannam@167 32 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
cannam@167 33 <link href="index.html#Top" rel="start" title="Top">
cannam@167 34 <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
cannam@167 35 <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
cannam@167 36 <link href="Basic-Interface.html#Basic-Interface" rel="up" title="Basic Interface">
cannam@167 37 <link href="Real_002ddata-DFTs.html#Real_002ddata-DFTs" rel="next" title="Real-data DFTs">
cannam@167 38 <link href="Complex-DFTs.html#Complex-DFTs" rel="prev" title="Complex DFTs">
cannam@167 39 <style type="text/css">
cannam@167 40 <!--
cannam@167 41 a.summary-letter {text-decoration: none}
cannam@167 42 blockquote.indentedblock {margin-right: 0em}
cannam@167 43 blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
cannam@167 44 blockquote.smallquotation {font-size: smaller}
cannam@167 45 div.display {margin-left: 3.2em}
cannam@167 46 div.example {margin-left: 3.2em}
cannam@167 47 div.lisp {margin-left: 3.2em}
cannam@167 48 div.smalldisplay {margin-left: 3.2em}
cannam@167 49 div.smallexample {margin-left: 3.2em}
cannam@167 50 div.smalllisp {margin-left: 3.2em}
cannam@167 51 kbd {font-style: oblique}
cannam@167 52 pre.display {font-family: inherit}
cannam@167 53 pre.format {font-family: inherit}
cannam@167 54 pre.menu-comment {font-family: serif}
cannam@167 55 pre.menu-preformatted {font-family: serif}
cannam@167 56 pre.smalldisplay {font-family: inherit; font-size: smaller}
cannam@167 57 pre.smallexample {font-size: smaller}
cannam@167 58 pre.smallformat {font-family: inherit; font-size: smaller}
cannam@167 59 pre.smalllisp {font-size: smaller}
cannam@167 60 span.nolinebreak {white-space: nowrap}
cannam@167 61 span.roman {font-family: initial; font-weight: normal}
cannam@167 62 span.sansserif {font-family: sans-serif; font-weight: normal}
cannam@167 63 ul.no-bullet {list-style: none}
cannam@167 64 -->
cannam@167 65 </style>
cannam@167 66
cannam@167 67
cannam@167 68 </head>
cannam@167 69
cannam@167 70 <body lang="en">
cannam@167 71 <a name="Planner-Flags"></a>
cannam@167 72 <div class="header">
cannam@167 73 <p>
cannam@167 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>
cannam@167 75 </div>
cannam@167 76 <hr>
cannam@167 77 <a name="Planner-Flags-1"></a>
cannam@167 78 <h4 class="subsection">4.3.2 Planner Flags</h4>
cannam@167 79
cannam@167 80 <p>All of the planner routines in FFTW accept an integer <code>flags</code>
cannam@167 81 argument, which is a bitwise OR (&lsquo;<samp>|</samp>&rsquo;) of zero or more of the flag
cannam@167 82 constants defined below. These flags control the rigor (and time) of
cannam@167 83 the planning process, and can also impose (or lift) restrictions on the
cannam@167 84 type of transform algorithm that is employed.
cannam@167 85 </p>
cannam@167 86 <p><em>Important:</em> the planner overwrites the input array during
cannam@167 87 planning unless a saved plan (see <a href="Wisdom.html#Wisdom">Wisdom</a>) is available for that
cannam@167 88 problem, so you should initialize your input data after creating the
cannam@167 89 plan. The only exceptions to this are the <code>FFTW_ESTIMATE</code> and
cannam@167 90 <code>FFTW_WISDOM_ONLY</code> flags, as mentioned below.
cannam@167 91 </p>
cannam@167 92 <p>In all cases, if wisdom is available for the given problem that was
cannam@167 93 created with equal-or-greater planning rigor, then the more rigorous
cannam@167 94 wisdom is used. For example, in <code>FFTW_ESTIMATE</code> mode any available
cannam@167 95 wisdom is used, whereas in <code>FFTW_PATIENT</code> mode only wisdom created
cannam@167 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>.
cannam@167 97 </p>
cannam@167 98 <a name="Planning_002drigor-flags"></a>
cannam@167 99 <h4 class="subsubheading">Planning-rigor flags</h4>
cannam@167 100 <ul>
cannam@167 101 <li> <a name="index-FFTW_005fESTIMATE-2"></a>
cannam@167 102 <code>FFTW_ESTIMATE</code> specifies that, instead of actual measurements of
cannam@167 103 different algorithms, a simple heuristic is used to pick a (probably
cannam@167 104 sub-optimal) plan quickly. With this flag, the input/output arrays are
cannam@167 105 not overwritten during planning.
cannam@167 106
cannam@167 107 </li><li> <a name="index-FFTW_005fMEASURE-2"></a>
cannam@167 108 <code>FFTW_MEASURE</code> tells FFTW to find an optimized plan by actually
cannam@167 109 <em>computing</em> several FFTs and measuring their execution time.
cannam@167 110 Depending on your machine, this can take some time (often a few
cannam@167 111 seconds). <code>FFTW_MEASURE</code> is the default planning option.
cannam@167 112
cannam@167 113 </li><li> <a name="index-FFTW_005fPATIENT-2"></a>
cannam@167 114 <code>FFTW_PATIENT</code> is like <code>FFTW_MEASURE</code>, but considers a wider
cannam@167 115 range of algorithms and often produces a &ldquo;more optimal&rdquo; plan
cannam@167 116 (especially for large transforms), but at the expense of several times
cannam@167 117 longer planning time (especially for large transforms).
cannam@167 118
cannam@167 119 </li><li> <a name="index-FFTW_005fEXHAUSTIVE-1"></a>
cannam@167 120 <code>FFTW_EXHAUSTIVE</code> is like <code>FFTW_PATIENT</code>, but considers an
cannam@167 121 even wider range of algorithms, including many that we think are
cannam@167 122 unlikely to be fast, to produce the most optimal plan but with a
cannam@167 123 substantially increased planning time.
cannam@167 124
cannam@167 125 </li><li> <a name="index-FFTW_005fWISDOM_005fONLY"></a>
cannam@167 126 <code>FFTW_WISDOM_ONLY</code> is a special planning mode in which the plan
cannam@167 127 is only created if wisdom is available for the given problem, and
cannam@167 128 otherwise a <code>NULL</code> plan is returned. This can be combined with
cannam@167 129 other flags, e.g. &lsquo;<samp>FFTW_WISDOM_ONLY | FFTW_PATIENT</samp>&rsquo; creates a
cannam@167 130 plan only if wisdom is available that was created in
cannam@167 131 <code>FFTW_PATIENT</code> or <code>FFTW_EXHAUSTIVE</code> mode. The
cannam@167 132 <code>FFTW_WISDOM_ONLY</code> flag is intended for users who need to detect
cannam@167 133 whether wisdom is available; for example, if wisdom is not available
cannam@167 134 one may wish to allocate new arrays for planning so that user data is
cannam@167 135 not overwritten.
cannam@167 136
cannam@167 137 </li></ul>
cannam@167 138
cannam@167 139 <a name="Algorithm_002drestriction-flags"></a>
cannam@167 140 <h4 class="subsubheading">Algorithm-restriction flags</h4>
cannam@167 141 <ul>
cannam@167 142 <li> <a name="index-FFTW_005fDESTROY_005fINPUT"></a>
cannam@167 143 <code>FFTW_DESTROY_INPUT</code> specifies that an out-of-place transform is
cannam@167 144 allowed to <em>overwrite its input</em> array with arbitrary data; this
cannam@167 145 can sometimes allow more efficient algorithms to be employed.
cannam@167 146 <a name="index-out_002dof_002dplace"></a>
cannam@167 147
cannam@167 148 </li><li> <a name="index-FFTW_005fPRESERVE_005fINPUT-1"></a>
cannam@167 149 <code>FFTW_PRESERVE_INPUT</code> specifies that an out-of-place transform must
cannam@167 150 <em>not change its input</em> array. This is ordinarily the
cannam@167 151 <em>default</em>, except for c2r and hc2r (i.e. complex-to-real)
cannam@167 152 transforms for which <code>FFTW_DESTROY_INPUT</code> is the default. In the
cannam@167 153 latter cases, passing <code>FFTW_PRESERVE_INPUT</code> will attempt to use
cannam@167 154 algorithms that do not destroy the input, at the expense of worse
cannam@167 155 performance; for multi-dimensional c2r transforms, however, no
cannam@167 156 input-preserving algorithms are implemented and the planner will return
cannam@167 157 <code>NULL</code> if one is requested.
cannam@167 158 <a name="index-c2r-1"></a>
cannam@167 159 <a name="index-hc2r-1"></a>
cannam@167 160
cannam@167 161 </li><li> <a name="index-FFTW_005fUNALIGNED"></a>
cannam@167 162 <a name="index-alignment-1"></a>
cannam@167 163 <a name="index-fftw_005fmalloc-4"></a>
cannam@167 164 <a name="index-fftw_005falignment_005fof"></a>
cannam@167 165 <code>FFTW_UNALIGNED</code> specifies that the algorithm may not impose any
cannam@167 166 unusual alignment requirements on the input/output arrays (i.e. no
cannam@167 167 SIMD may be used). This flag is normally <em>not necessary</em>, since
cannam@167 168 the planner automatically detects misaligned arrays. The only use for
cannam@167 169 this flag is if you want to use the new-array execute interface to
cannam@167 170 execute a given plan on a different array that may not be aligned like
cannam@167 171 the original. (Using <code>fftw_malloc</code> makes this flag unnecessary
cannam@167 172 even then. You can also use <code>fftw_alignment_of</code> to detect
cannam@167 173 whether two arrays are equivalently aligned.)
cannam@167 174
cannam@167 175 </li></ul>
cannam@167 176
cannam@167 177 <a name="Limiting-planning-time"></a>
cannam@167 178 <h4 class="subsubheading">Limiting planning time</h4>
cannam@167 179
cannam@167 180 <div class="example">
cannam@167 181 <pre class="example">extern void fftw_set_timelimit(double seconds);
cannam@167 182 </pre></div>
cannam@167 183 <a name="index-fftw_005fset_005ftimelimit"></a>
cannam@167 184
cannam@167 185 <p>This function instructs FFTW to spend at most <code>seconds</code> seconds
cannam@167 186 (approximately) in the planner. If <code>seconds ==
cannam@167 187 FFTW_NO_TIMELIMIT</code> (the default value, which is negative), then
cannam@167 188 planning time is unbounded. Otherwise, FFTW plans with a
cannam@167 189 progressively wider range of algorithms until the the given time limit
cannam@167 190 is reached or the given range of algorithms is explored, returning the
cannam@167 191 best available plan.
cannam@167 192 <a name="index-FFTW_005fNO_005fTIMELIMIT"></a>
cannam@167 193 </p>
cannam@167 194
cannam@167 195 <p>For example, specifying <code>FFTW_PATIENT</code> first plans in
cannam@167 196 <code>FFTW_ESTIMATE</code> mode, then in <code>FFTW_MEASURE</code> mode, then
cannam@167 197 finally (time permitting) in <code>FFTW_PATIENT</code>. If
cannam@167 198 <code>FFTW_EXHAUSTIVE</code> is specified instead, the planner will further
cannam@167 199 progress to <code>FFTW_EXHAUSTIVE</code> mode.
cannam@167 200 </p>
cannam@167 201 <p>Note that the <code>seconds</code> argument specifies only a rough limit; in
cannam@167 202 practice, the planner may use somewhat more time if the time limit is
cannam@167 203 reached when the planner is in the middle of an operation that cannot
cannam@167 204 be interrupted. At the very least, the planner will complete planning
cannam@167 205 in <code>FFTW_ESTIMATE</code> mode (which is thus equivalent to a time limit
cannam@167 206 of 0).
cannam@167 207 </p>
cannam@167 208
cannam@167 209 <hr>
cannam@167 210 <div class="header">
cannam@167 211 <p>
cannam@167 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>
cannam@167 213 </div>
cannam@167 214
cannam@167 215
cannam@167 216
cannam@167 217 </body>
cannam@167 218 </html>