Subversion Repositories shark

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head><title>
FFTW FAQ - Section 4
</title>
<link rev="made" href="mailto:fftw@theory.lcs.mit.edu">
<link rel="Contents" href="index.html">
<link rel="Start" href="index.html">
<link rel="Next" href="section5.html"><link rel="Previous" href="section3.html"><link rel="Bookmark" title="FFTW FAQ" href="index.html">
</head><body text="#000000" bgcolor="#FFFFFF"><h1>
FFTW FAQ - Section 4 <br>
Internals of FFTW
</h1>

<ul>
<li><a href="#howworks" rel=subdocument>Q4.1. How does FFTW work?</a>
<li><a href="#whyfast" rel=subdocument>Q4.2. Why is FFTW so fast?</a>
<li><a href="#wisdom" rel=subdocument>Q4.3. What is this <code>wisdom</code> thing?</a>
<li><a href="#whywisdom" rel=subdocument>Q4.4. Why do you use <code>wisdom</code>? I just wanted to save a plan.</a>
</ul><hr>

<h2><A name="howworks">
Question 4.1.  How does FFTW work?
</A></h2>

The innovation (if it can be so called) in FFTW consists in having an
interpreter execute the transform.  The program for the interpreter
(the <i>plan</i>) is computed at runtime according to the
characteristics of your machine/compiler.  This peculiar software
architecture allows FFTW to adapt itself to almost any machine.

<p>
For more details, see the paper &quot;The Fastest Fourier Transform in
the West&quot;, by M. Frigo and S. G. Johnson, available at
<A href="http://theory.lcs.mit.edu/~fftw/">the FFTW web page</A>.  See also &quot;FFTW: An Adaptive Software Architecture for the
FFT&quot;, in ICASSP '98.  
<h2><A name="whyfast">
Question 4.2.  Why is FFTW so fast?
</A></h2>

This is a complex question, and there is no simple answer.  In fact,
the authors do not fully know the answer, either.  In addition to many
small performance hacks throughout FFTW, there are three general
reasons for FFTW's speed.  
<ul>
<li>    FFTW uses an internal interpreter to adapt itself to
a machine.  See <A href="#howworks">Q4.1 `How does FFTW work?'</A>.  
<li>    FFTW uses a code generator to produce highly-optimized
routines for computing small transforms.

<li>    FFTW uses explicit divide-and-conquer to take advantage
of the memory hierarchy.  
</ul>
For more details on these three topics, see the paper &quot;The
Fastest Fourier Transform in the West&quot;, by M. Frigo and S. G. Johnson,
available at <A href="http://theory.lcs.mit.edu/~fftw/">the FFTW web page</A>.  
<h2><A name="wisdom">
Question 4.3.  What is this <code>wisdom</code> thing?
</A></h2>

<code>wisdom</code> is the name of the mechanism that FFTW uses to save
and restore plans.  Rather than just saving plans, FFTW remembers what
it learns about your machine, and becomes wiser and wiser as time
passes by.  You can save <code>wisdom</code> for later use.  
<h2><A name="whywisdom">
Question 4.4.  Why do you use <code>wisdom</code>? I just wanted to save a plan.
</A></h2>

<code>wisdom</code> could be implemented with less effort than a general
plan-saving mechanism would have required.  In addition,
<code>wisdom</code> provides additional benefits.  For example, if you
are planning transforms of size 1024, and later you want a transform
of size 2048, most of the calculations of the 1024 case can be reused.
 
<p>
In short, <code>wisdom</code> does more things with less effort, and seemed like The Right Thing to do.  <hr>
Next: <a href="section5.html" rel=precedes>Known bugs</a>.<br>
Back: <a href="section3.html" rev=precedes>Using FFTW</a>.<br>
<a href="index.html" rev=subdocument>Return to contents</a>.<p>
<address>
<A href="http://theory.lcs.mit.edu/~fftw/">Matteo Frigo and Steven G. Johnson</A> / <A href="mailto:fftw@theory.lcs.mit.edu">fftw@theory.lcs.mit.edu</A>
- 18 May 1999
</address><br>
Extracted from FFTW Frequently Asked Questions with Answers,
Copyright &copy; 1999 Massachusetts Institute of Technology.
</body></html>