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