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