d@0: d@0: d@0: Generating your own code - FFTW 3.2.1 d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0:
d@0:

d@0: d@0: Previous: Cycle Counters, d@0: Up: Installation and Customization d@0:


d@0:
d@0: d@0:

9.4 Generating your own code

d@0: d@0:

d@0: The directory genfft contains the programs that were used to d@0: generate FFTW's “codelets,” which are hard-coded transforms of small d@0: sizes. d@0: We do not expect casual users to employ the generator, which is a rather d@0: sophisticated program that generates directed acyclic graphs of FFT d@0: algorithms and performs algebraic simplifications on them. It was d@0: written in Objective Caml, a dialect of ML, which is available at d@0: http://pauillac.inria.fr/ocaml/. d@0: d@0: If you have Objective Caml installed (along with recent versions of d@0: GNU autoconf, automake, and libtool), then you d@0: can change the set of codelets that are generated or play with the d@0: generation options. The set of generated codelets is specified by the d@0: dft/codelets/*/Makefile.am, d@0: dft/simd/codelets/Makefile.am, and d@0: rdft/codelets/*/Makefile.am files. For example, you can add d@0: efficient REDFT codelets of small sizes by modifying d@0: rdft/codelets/r2r/Makefile.am. d@0: After you modify any Makefile.am files, you can type sh d@0: bootstrap.sh in the top-level directory followed by make to d@0: re-generate the files. d@0: d@0:

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

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