annotate fft/fftw/fftw-3.3.4/doc/html/Planner-Flags.html @ 40:223f770b5341 kissfft-double tip

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