GNU Info

Info Node: (fftw.info)Generating your own code

(fftw.info)Generating your own code


Prev: Customizing the timer Up: Installation and Customization
Enter node , (file) or (file)node

Generating your own code
========================

   If you know that you will only use transforms of a certain size (say,
powers of 2) and want to reduce the size of the library, you can
reconfigure FFTW to support only those sizes you are interested in.  You
may even generate code to enable efficient 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
2^a 3^b 5^c 7^d 11^e 13^f, where e+f is either 0 or 1, 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.

   The directory `gensrc' contains all the programs and scripts that
were used to generate FFTW.  In particular, the program
`gensrc/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 directed
acyclic graphs of FFT algorithms and performs algebraic simplifications
on them.  `genfft' is written in Objective Caml, a dialect of ML.
Objective Caml is described at `http://pauillac.inria.fr/ocaml/' and
can be downloaded from from `ftp://ftp.inria.fr/lang/caml-light'.

   If you have Objective Caml installed, you can type `sh bootstrap.sh'
in the top-level directory to re-generate the files.  If you change the
`gensrc/config' file, you can optimize FFTW for sizes that are not
currently supported efficiently (say, 17 or 19).

   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@fftw.org> if you are
interested in the subject.

   You might find it interesting to learn Caml and/or some modern
programming techniques that we used in the generator (including monadic
programming), especially if you heard the rumor that Java and
object-oriented programming are the latest advancement in the field.
The internal operation of the codelet generator is described in the
paper, "A Fast Fourier Transform Compiler," by M. Frigo, which is
available from the FFTW home page (http://www.fftw.org) and will appear
in the `Proceedings of the 1999 ACM SIGPLAN Conference on Programming
Language Design and Implementation (PLDI)'.


automatically generated by info2www version 1.2.2.9