The latest version of FFTW may be found on the Web at the FFTW home page:
http://theory.lcs.mit.edu/~fftw
As distributed, FFTW makes very few assumptions about your system. All
you need is an ANSI C compiler (gcc
is fine). If you have a Unix
system (Linux is fine), you can simply type make install
in the
src
directory. This command will create a library called
libfftw.a
and install it in /usr/local/lib
. Also, the
header file fftw.h
is installed in /usr/local/include
.
(You can change these locations by editing the prefix
variable in
the Makefile
.) The default compiler used is gcc
, and there
are some default CFLAGS
specified in the Makefile
.
If you have a non-Unix system that does not provide make
, it is
still possible to compile the source code. However, the Makefile
we provide will probably not work, and you will have to build the
library yourself; you must also install the library and the header file
fftw.h
.
There are two things that you might want to consider doing in order to
get a better installation of FFTW. First, if your system
supports a high-resolution clock, it is advisable to use it. This will
reduce the time spent creating plans. Second, if you know that you will
only use transforms of a certain size (say, powers of ), you may
reconfigure FFTW to support only those sizes you are interested in. You
may even generate code to support transforms of a size not supported by
the default distribution. The default distribution supports transforms
of any size, but not all sizes are equally fast. The default
installation of FFTW is best at handling sizes of the form
where the exponents of and are either or
, and the other exponents are arbitrary. Other sizes are
computed by means of a slow, general-purpose routine. However, if you
have an application that requires fast transforms of size, say,
17
, there is a way to generate specialized code to handle that.
FFTW needs a reasonably precise clock in order to find the optimal
way to compute a transform. By default, FFTW uses the Unix
clock()
function for timings. This is very portable, but
it also means that FFTW must run a large number of iterations
in order to get reliable measurements.
If your machine supports a high-resolution clock, it is therefore
advisable to use it. You must edit the last part of
src/fftw.h
. There are a few macros you must redefine:
look at how we handled SOLARIS and the MacOS for examples.
The program src/genfft.ml
was used to generate the code that FFTW
uses to compute the transforms. We do not expect casual users to use
it. genfft
is a rather sophisticated program, that generates
abstract syntax trees and performs algebraic simplifications on them.
genfft
is written in Caml Light, a dialect of ML. Caml Light is
available from ftp.inria.fr
in the directory
lang/caml-light
.
If you have Caml Light installed, you can type make sources
to re-generate the sources. At this point, you can generate
any source you want, of course: just change the Makefile
and src/config.c
to make FFTW aware of the new functions you
want to use.
We do not provide more details about the code-generation process, since
we do not expect that users will need to generate their own code.
However, feel free to contact us at fftw@theory.lcs.mit.edu
if
you are interested in the subject.