Chris@19: Chris@19: Chris@19: Generating your own code - FFTW 3.3.4 Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19:
Chris@19: Chris@19:

Chris@19: Previous: Cycle Counters, Chris@19: Up: Installation and Customization Chris@19:


Chris@19:
Chris@19: Chris@19:

10.4 Generating your own code

Chris@19: Chris@19:

Chris@19: The directory genfft contains the programs that were used to Chris@19: generate FFTW's “codelets,” which are hard-coded transforms of small Chris@19: sizes. Chris@19: We do not expect casual users to employ the generator, which is a rather Chris@19: sophisticated program that generates directed acyclic graphs of FFT Chris@19: algorithms and performs algebraic simplifications on them. It was Chris@19: written in Objective Caml, a dialect of ML, which is available at Chris@19: http://caml.inria.fr/ocaml/index.en.html. Chris@19: Chris@19: Chris@19:

If you have Objective Caml installed (along with recent versions of Chris@19: GNU autoconf, automake, and libtool), then you Chris@19: can change the set of codelets that are generated or play with the Chris@19: generation options. The set of generated codelets is specified by the Chris@19: {dft,rdft}/{codelets,simd}/*/Makefile.am files. For example, you can add Chris@19: efficient REDFT codelets of small sizes by modifying Chris@19: rdft/codelets/r2r/Makefile.am. Chris@19: After you modify any Makefile.am files, you can type sh Chris@19: bootstrap.sh in the top-level directory followed by make to Chris@19: re-generate the files. Chris@19: Chris@19:

We do not provide more details about the code-generation process, since Chris@19: we do not expect that most users will need to generate their own code. Chris@19: However, feel free to contact us at fftw@fftw.org if Chris@19: you are interested in the subject. Chris@19: Chris@19:

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