annotate src/fftw-3.3.3/doc/html/Cycle-Counters.html @ 95:89f5e221ed7b

Add FFTW3
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 20 Mar 2013 15:35:50 +0000
parents
children
rev   line source
cannam@95 1 <html lang="en">
cannam@95 2 <head>
cannam@95 3 <title>Cycle Counters - FFTW 3.3.3</title>
cannam@95 4 <meta http-equiv="Content-Type" content="text/html">
cannam@95 5 <meta name="description" content="FFTW 3.3.3">
cannam@95 6 <meta name="generator" content="makeinfo 4.13">
cannam@95 7 <link title="Top" rel="start" href="index.html#Top">
cannam@95 8 <link rel="up" href="Installation-and-Customization.html#Installation-and-Customization" title="Installation and Customization">
cannam@95 9 <link rel="prev" href="Installation-on-non_002dUnix-systems.html#Installation-on-non_002dUnix-systems" title="Installation on non-Unix systems">
cannam@95 10 <link rel="next" href="Generating-your-own-code.html#Generating-your-own-code" title="Generating your own code">
cannam@95 11 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
cannam@95 12 <!--
cannam@95 13 This manual is for FFTW
cannam@95 14 (version 3.3.3, 25 November 2012).
cannam@95 15
cannam@95 16 Copyright (C) 2003 Matteo Frigo.
cannam@95 17
cannam@95 18 Copyright (C) 2003 Massachusetts Institute of Technology.
cannam@95 19
cannam@95 20 Permission is granted to make and distribute verbatim copies of
cannam@95 21 this manual provided the copyright notice and this permission
cannam@95 22 notice are preserved on all copies.
cannam@95 23
cannam@95 24 Permission is granted to copy and distribute modified versions of
cannam@95 25 this manual under the conditions for verbatim copying, provided
cannam@95 26 that the entire resulting derived work is distributed under the
cannam@95 27 terms of a permission notice identical to this one.
cannam@95 28
cannam@95 29 Permission is granted to copy and distribute translations of this
cannam@95 30 manual into another language, under the above conditions for
cannam@95 31 modified versions, except that this permission notice may be
cannam@95 32 stated in a translation approved by the Free Software Foundation.
cannam@95 33 -->
cannam@95 34 <meta http-equiv="Content-Style-Type" content="text/css">
cannam@95 35 <style type="text/css"><!--
cannam@95 36 pre.display { font-family:inherit }
cannam@95 37 pre.format { font-family:inherit }
cannam@95 38 pre.smalldisplay { font-family:inherit; font-size:smaller }
cannam@95 39 pre.smallformat { font-family:inherit; font-size:smaller }
cannam@95 40 pre.smallexample { font-size:smaller }
cannam@95 41 pre.smalllisp { font-size:smaller }
cannam@95 42 span.sc { font-variant:small-caps }
cannam@95 43 span.roman { font-family:serif; font-weight:normal; }
cannam@95 44 span.sansserif { font-family:sans-serif; font-weight:normal; }
cannam@95 45 --></style>
cannam@95 46 </head>
cannam@95 47 <body>
cannam@95 48 <div class="node">
cannam@95 49 <a name="Cycle-Counters"></a>
cannam@95 50 <p>
cannam@95 51 Next:&nbsp;<a rel="next" accesskey="n" href="Generating-your-own-code.html#Generating-your-own-code">Generating your own code</a>,
cannam@95 52 Previous:&nbsp;<a rel="previous" accesskey="p" href="Installation-on-non_002dUnix-systems.html#Installation-on-non_002dUnix-systems">Installation on non-Unix systems</a>,
cannam@95 53 Up:&nbsp;<a rel="up" accesskey="u" href="Installation-and-Customization.html#Installation-and-Customization">Installation and Customization</a>
cannam@95 54 <hr>
cannam@95 55 </div>
cannam@95 56
cannam@95 57 <h3 class="section">10.3 Cycle Counters</h3>
cannam@95 58
cannam@95 59 <p><a name="index-cycle-counter-619"></a>
cannam@95 60 FFTW's planner actually executes and times different possible FFT
cannam@95 61 algorithms in order to pick the fastest plan for a given n. In
cannam@95 62 order to do this in as short a time as possible, however, the timer must
cannam@95 63 have a very high resolution, and to accomplish this we employ the
cannam@95 64 hardware <dfn>cycle counters</dfn> that are available on most CPUs.
cannam@95 65 Currently, FFTW supports the cycle counters on x86, PowerPC/POWER, Alpha,
cannam@95 66 UltraSPARC (SPARC v9), IA64, PA-RISC, and MIPS processors.
cannam@95 67
cannam@95 68 <p><a name="index-compiler-620"></a>Access to the cycle counters, unfortunately, is a compiler and/or
cannam@95 69 operating-system dependent task, often requiring inline assembly
cannam@95 70 language, and it may be that your compiler is not supported. If you are
cannam@95 71 <em>not</em> supported, FFTW will by default fall back on its estimator
cannam@95 72 (effectively using <code>FFTW_ESTIMATE</code> for all plans).
cannam@95 73 <a name="index-FFTW_005fESTIMATE-621"></a>
cannam@95 74 You can add support by editing the file <code>kernel/cycle.h</code>; normally,
cannam@95 75 this will involve adapting one of the examples already present in order
cannam@95 76 to use the inline-assembler syntax for your C compiler, and will only
cannam@95 77 require a couple of lines of code. Anyone adding support for a new
cannam@95 78 system to <code>cycle.h</code> is encouraged to email us at <a href="mailto:fftw@fftw.org">fftw@fftw.org</a>.
cannam@95 79
cannam@95 80 <p>If a cycle counter is not available on your system (e.g. some embedded
cannam@95 81 processor), and you don't want to use estimated plans, as a last resort
cannam@95 82 you can use the <code>--with-slow-timer</code> option to <code>configure</code> (on
cannam@95 83 Unix) or <code>#define WITH_SLOW_TIMER</code> in <code>config.h</code> (elsewhere).
cannam@95 84 This will use the much lower-resolution <code>gettimeofday</code> function, or even
cannam@95 85 <code>clock</code> if the former is unavailable, and planning will be
cannam@95 86 extremely slow.
cannam@95 87
cannam@95 88 <!-- -->
cannam@95 89 </body></html>
cannam@95 90