cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: FFTW 3.3.8: Cycle Counters cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: cannam@167:
cannam@167:

cannam@167: Next: , Previous: , Up: Installation and Customization   [Contents][Index]

cannam@167:
cannam@167:
cannam@167: cannam@167:

10.3 Cycle Counters

cannam@167: cannam@167: cannam@167:

FFTW’s planner actually executes and times different possible FFT cannam@167: algorithms in order to pick the fastest plan for a given n. In cannam@167: order to do this in as short a time as possible, however, the timer must cannam@167: have a very high resolution, and to accomplish this we employ the cannam@167: hardware cycle counters that are available on most CPUs. cannam@167: Currently, FFTW supports the cycle counters on x86, PowerPC/POWER, Alpha, cannam@167: UltraSPARC (SPARC v9), IA64, PA-RISC, and MIPS processors. cannam@167:

cannam@167: cannam@167:

Access to the cycle counters, unfortunately, is a compiler and/or cannam@167: operating-system dependent task, often requiring inline assembly cannam@167: language, and it may be that your compiler is not supported. If you are cannam@167: not supported, FFTW will by default fall back on its estimator cannam@167: (effectively using FFTW_ESTIMATE for all plans). cannam@167: cannam@167:

cannam@167:

You can add support by editing the file kernel/cycle.h; normally, cannam@167: this will involve adapting one of the examples already present in order cannam@167: to use the inline-assembler syntax for your C compiler, and will only cannam@167: require a couple of lines of code. Anyone adding support for a new cannam@167: system to cycle.h is encouraged to email us at fftw@fftw.org. cannam@167:

cannam@167:

If a cycle counter is not available on your system (e.g. some embedded cannam@167: processor), and you don’t want to use estimated plans, as a last resort cannam@167: you can use the --with-slow-timer option to configure (on cannam@167: Unix) or #define WITH_SLOW_TIMER in config.h (elsewhere). cannam@167: This will use the much lower-resolution gettimeofday function, or even cannam@167: clock if the former is unavailable, and planning will be cannam@167: extremely slow. cannam@167:

cannam@167:
cannam@167:
cannam@167:

cannam@167: Next: , Previous: , Up: Installation and Customization   [Contents][Index]

cannam@167:
cannam@167: cannam@167: cannam@167: cannam@167: cannam@167: