File: Planner-Flags.html

package info (click to toggle)
fftw3 3.1.2-3.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 14,024 kB
  • ctags: 10,197
  • sloc: ansic: 154,845; asm: 33,960; ml: 12,962; sh: 9,019; perl: 1,392; makefile: 883; fortran: 108
file content (151 lines) | stat: -rw-r--r-- 7,508 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<html lang="en">
<head>
<title>Planner Flags - FFTW 3.1.2</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="FFTW 3.1.2">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Basic-Interface.html#Basic-Interface" title="Basic Interface">
<link rel="prev" href="Complex-DFTs.html#Complex-DFTs" title="Complex DFTs">
<link rel="next" href="Real_002ddata-DFTs.html#Real_002ddata-DFTs" title="Real-data DFTs">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual is for FFTW
(version 3.1.2, 23 June 2006).

Copyright (C) 2003 Matteo Frigo.

Copyright (C) 2003 Massachusetts Institute of Technology.

     Permission is granted to make and distribute verbatim copies of
     this manual provided the copyright notice and this permission
     notice are preserved on all copies.

     Permission is granted to copy and distribute modified versions of
     this manual under the conditions for verbatim copying, provided
     that the entire resulting derived work is distributed under the
     terms of a permission notice identical to this one.

     Permission is granted to copy and distribute translations of this
     manual into another language, under the above conditions for
     modified versions, except that this permission notice may be
     stated in a translation approved by the Free Software Foundation.
   -->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Planner-Flags"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Real_002ddata-DFTs.html#Real_002ddata-DFTs">Real-data DFTs</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Complex-DFTs.html#Complex-DFTs">Complex DFTs</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Basic-Interface.html#Basic-Interface">Basic Interface</a>
<hr>
</div>

<h4 class="subsection">4.3.2 Planner Flags</h4>

<p>All of the planner routines in FFTW accept an integer <code>flags</code>
argument, which is a bitwise OR (`<samp><span class="samp">|</span></samp>') of zero or more of the flag
constants defined below.  These flags control the rigor (and time) of
the planning process, and can also impose (or lift) restrictions on the
type of transform algorithm that is employed.

   <p><em>Important:</em> the planner overwrites the input array during
planning, so you should initialize your input data after creating the
plan.  The only exception to this is the <code>FFTW_ESTIMATE</code> flag, as
mentioned below.

<h5 class="subsubheading">Planning-rigor flags</h5>

     <ul>
<li><a name="index-FFTW_005fESTIMATE-162"></a><code>FFTW_ESTIMATE</code> specifies that, instead of actual measurements of
different algorithms, a simple heuristic is used to pick a (probably
sub-optimal) plan quickly.  With this flag, the input/output arrays are
not overwritten during planning.

     <li><a name="index-FFTW_005fMEASURE-163"></a><code>FFTW_MEASURE</code> tells FFTW to find an optimized plan by actually
<em>computing</em> several FFTs and measuring their execution time. 
Depending on your machine, this can take some time (often a few
seconds).  <code>FFTW_MEASURE</code> is the default planning option.

     <li><a name="index-FFTW_005fPATIENT-164"></a><code>FFTW_PATIENT</code> is like <code>FFTW_MEASURE</code>, but considers a wider
range of algorithms and often produces a &ldquo;more optimal&rdquo; plan
(especially for large transforms), but at the expense of several times
longer planning time (especially for large transforms).

     <li><a name="index-FFTW_005fEXHAUSTIVE-165"></a><code>FFTW_EXHAUSTIVE</code> is like <code>FFTW_PATIENT</code>, but considers an
even wider range of algorithms, including many that we think are
unlikely to be fast, to produce the most optimal plan but with a
substantially increased planning time.

</ul>

<h5 class="subsubheading">Algorithm-restriction flags</h5>

     <ul>
<li><a name="index-FFTW_005fDESTROY_005fINPUT-166"></a><code>FFTW_DESTROY_INPUT</code> specifies that an out-of-place transform is
allowed to <em>overwrite its input</em> array with arbitrary data; this
can sometimes allow more efficient algorithms to be employed. 
<a name="index-out_002dof_002dplace-167"></a>
<li><a name="index-FFTW_005fPRESERVE_005fINPUT-168"></a><code>FFTW_PRESERVE_INPUT</code> specifies that an out-of-place transform must
<em>not change its input</em> array.  This is ordinarily the
<em>default</em>, except for c2r and hc2r (i.e. complex-to-real)
transforms for which <code>FFTW_DESTROY_INPUT</code> is the default.  In the
latter cases, passing <code>FFTW_PRESERVE_INPUT</code> will attempt to use
algorithms that do not destroy the input, at the expense of worse
performance; for multi-dimensional c2r transforms, however, no
input-preserving algorithms are implemented and the planner will return
<code>NULL</code> if one is requested. 
<a name="index-c2r-169"></a><a name="index-hc2r-170"></a>
<li><a name="index-FFTW_005fUNALIGNED-171"></a><a name="index-alignment-172"></a><code>FFTW_UNALIGNED</code> specifies that the algorithm may not
impose any unusual alignment requirements on the input/output arrays
(i.e. no SIMD may be used).  This flag is normally <em>not necessary</em>,
since the planner automatically detects misaligned arrays.  The only use
for this flag is if you want to use the guru interface to execute a
given plan on a different array that may not be aligned like the
original.  (Using <code>fftw_malloc</code> makes this flag unnecessary even
then.)

</ul>

<h5 class="subsubheading">Limiting planning time</h5>

<pre class="example">     extern void fftw_set_timelimit(double seconds);
</pre>
   <p><a name="index-fftw_005fset_005ftimelimit-173"></a>
This function instructs FFTW to spend at most <code>seconds</code> seconds
(approximately) in the planner.  If <code>seconds ==
FFTW_NO_TIMELIMIT</code> (the default value, which is negative), then
planning time is unbounded.  Otherwise, FFTW plans with a
progressively wider range of algorithms until the the given time limit
is reached or the given range of algorithms is explored, returning the
best available plan. 
<a name="index-FFTW_005fNO_005fTIMELIMIT-174"></a>
For example, specifying <code>FFTW_PATIENT</code> first plans in
<code>FFTW_ESTIMATE</code> mode, then in <code>FFTW_MEASURE</code> mode, then
finally (time permitting) in <code>FFTW_PATIENT</code>.  If
<code>FFTW_EXHAUSTIVE</code> is specified instead, the planner will further
progress to <code>FFTW_EXHAUSTIVE</code> mode.

   <p>Note that the <code>seconds</code> argument specifies only a rough limit; in
practice, the planner may use somewhat more time if the time limit is
reached when the planner is in the middle of an operation that cannot
be interrupted.  At the very least, the planner will complete planning
in <code>FFTW_ESTIMATE</code> mode (which is thus equivalent to a time limit
of 0).

<!-- =========> -->
</body></html>