annotate src/fftw-3.3.3/doc/html/Words-of-Wisdom_002dSaving-Plans.html @ 23:619f715526df sv_v2.1

Update Vamp plugin SDK to 2.5
author Chris Cannam
date Thu, 09 May 2013 10:52:46 +0100
parents 37bf6b4a2645
children
rev   line source
Chris@10 1 <html lang="en">
Chris@10 2 <head>
Chris@10 3 <title>Words of Wisdom-Saving Plans - 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="Other-Important-Topics.html#Other-Important-Topics" title="Other Important Topics">
Chris@10 9 <link rel="prev" href="Multi_002ddimensional-Array-Format.html#Multi_002ddimensional-Array-Format" title="Multi-dimensional Array Format">
Chris@10 10 <link rel="next" href="Caveats-in-Using-Wisdom.html#Caveats-in-Using-Wisdom" title="Caveats in Using Wisdom">
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="Words-of-Wisdom-Saving-Plans"></a>
Chris@10 50 <a name="Words-of-Wisdom_002dSaving-Plans"></a>
Chris@10 51 <p>
Chris@10 52 Next:&nbsp;<a rel="next" accesskey="n" href="Caveats-in-Using-Wisdom.html#Caveats-in-Using-Wisdom">Caveats in Using Wisdom</a>,
Chris@10 53 Previous:&nbsp;<a rel="previous" accesskey="p" href="Multi_002ddimensional-Array-Format.html#Multi_002ddimensional-Array-Format">Multi-dimensional Array Format</a>,
Chris@10 54 Up:&nbsp;<a rel="up" accesskey="u" href="Other-Important-Topics.html#Other-Important-Topics">Other Important Topics</a>
Chris@10 55 <hr>
Chris@10 56 </div>
Chris@10 57
Chris@10 58 <h3 class="section">3.3 Words of Wisdom&mdash;Saving Plans</h3>
Chris@10 59
Chris@10 60 <p><a name="index-wisdom-124"></a><a name="index-saving-plans-to-disk-125"></a>
Chris@10 61 FFTW implements a method for saving plans to disk and restoring them.
Chris@10 62 In fact, what FFTW does is more general than just saving and loading
Chris@10 63 plans. The mechanism is called <dfn>wisdom</dfn>. Here, we describe
Chris@10 64 this feature at a high level. See <a href="FFTW-Reference.html#FFTW-Reference">FFTW Reference</a>, for a less casual
Chris@10 65 but more complete discussion of how to use wisdom in FFTW.
Chris@10 66
Chris@10 67 <p>Plans created with the <code>FFTW_MEASURE</code>, <code>FFTW_PATIENT</code>, or
Chris@10 68 <code>FFTW_EXHAUSTIVE</code> options produce near-optimal FFT performance,
Chris@10 69 but may require a long time to compute because FFTW must measure the
Chris@10 70 runtime of many possible plans and select the best one. This setup is
Chris@10 71 designed for the situations where so many transforms of the same size
Chris@10 72 must be computed that the start-up time is irrelevant. For short
Chris@10 73 initialization times, but slower transforms, we have provided
Chris@10 74 <code>FFTW_ESTIMATE</code>. The <code>wisdom</code> mechanism is a way to get the
Chris@10 75 best of both worlds: you compute a good plan once, save it to
Chris@10 76 disk, and later reload it as many times as necessary. The wisdom
Chris@10 77 mechanism can actually save and reload many plans at once, not just
Chris@10 78 one.
Chris@10 79 <a name="index-FFTW_005fMEASURE-126"></a><a name="index-FFTW_005fPATIENT-127"></a><a name="index-FFTW_005fEXHAUSTIVE-128"></a><a name="index-FFTW_005fESTIMATE-129"></a>
Chris@10 80
Chris@10 81 <p>Whenever you create a plan, the FFTW planner accumulates wisdom, which
Chris@10 82 is information sufficient to reconstruct the plan. After planning,
Chris@10 83 you can save this information to disk by means of the function:
Chris@10 84 <pre class="example"> int fftw_export_wisdom_to_filename(const char *filename);
Chris@10 85 </pre>
Chris@10 86 <p><a name="index-fftw_005fexport_005fwisdom_005fto_005ffilename-130"></a>(This function returns non-zero on success.)
Chris@10 87
Chris@10 88 <p>The next time you run the program, you can restore the wisdom with
Chris@10 89 <code>fftw_import_wisdom_from_filename</code> (which also returns non-zero on success),
Chris@10 90 and then recreate the plan using the same flags as before.
Chris@10 91 <pre class="example"> int fftw_import_wisdom_from_filename(const char *filename);
Chris@10 92 </pre>
Chris@10 93 <p><a name="index-fftw_005fimport_005fwisdom_005ffrom_005ffilename-131"></a>
Chris@10 94 Wisdom is automatically used for any size to which it is applicable, as
Chris@10 95 long as the planner flags are not more &ldquo;patient&rdquo; than those with which
Chris@10 96 the wisdom was created. For example, wisdom created with
Chris@10 97 <code>FFTW_MEASURE</code> can be used if you later plan with
Chris@10 98 <code>FFTW_ESTIMATE</code> or <code>FFTW_MEASURE</code>, but not with
Chris@10 99 <code>FFTW_PATIENT</code>.
Chris@10 100
Chris@10 101 <p>The <code>wisdom</code> is cumulative, and is stored in a global, private
Chris@10 102 data structure managed internally by FFTW. The storage space required
Chris@10 103 is minimal, proportional to the logarithm of the sizes the wisdom was
Chris@10 104 generated from. If memory usage is a concern, however, the wisdom can
Chris@10 105 be forgotten and its associated memory freed by calling:
Chris@10 106 <pre class="example"> void fftw_forget_wisdom(void);
Chris@10 107 </pre>
Chris@10 108 <p><a name="index-fftw_005fforget_005fwisdom-132"></a>
Chris@10 109 Wisdom can be exported to a file, a string, or any other medium.
Chris@10 110 For details, see <a href="Wisdom.html#Wisdom">Wisdom</a>.
Chris@10 111
Chris@10 112 </body></html>
Chris@10 113