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