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