GNU Info

Info Node: (fftw.info)Customizing the timer

(fftw.info)Customizing the timer


Next: Generating your own code Prev: gcc and Pentium hacks Up: Installation and Customization
Enter node , (file) or (file)node

Customizing the timer
=====================

   FFTW needs a reasonably-precise clock in order to find the optimal
way to compute a transform.  On Unix systems, `configure' looks for
`gettimeofday' and other system-specific timers.  If it does not find
any high resolution clock, it defaults to using the `clock()' function,
which is very portable, but forces FFTW to run for a long time in order
to get reliable measurements.

   If your machine supports a high-resolution clock not recognized by
FFTW, it is therefore advisable to use it.  You must edit
`fftw/fftw-int.h'.  There are a few macros you must redefine.  The code
is documented and should be self-explanatory.  (By the way, `fftw-int'
stands for `fftw-internal', but for some inexplicable reason people are
still using primitive systems with 8.3 filenames.)

   Even if you don't install high-resolution timing code, we still
recommend that you look at the `FFTW_TIME_MIN' constant in
`fftw/fftw-int.h'. This constant holds the minimum time interval (in
seconds) required to get accurate timing measurements, and should be (at
least) several hundred times the resolution of your clock.  The default
constants are on the conservative side, and may cause FFTW to take
longer than necessary when you create a plan. Set `FFTW_TIME_MIN' to
whatever is appropriate on your system (be sure to set the *right*
`FFTW_TIME_MIN'...there are several definitions in `fftw-int.h',
corresponding to different platforms and timers).

   As an aid in checking the resolution of your clock, you can use the
`tests/fftw_test' program with the `-t' option (c.f. `tests/README').
Remember, the mere fact that your clock reports times in, say,
picoseconds, does not mean that it is actually *accurate* to that
resolution.


automatically generated by info2www version 1.2.2.9