[SciPy-dev] Cleaning zfft: first patch
David Cournapeau
david@ar.media.kyoto-u.ac...
Wed May 2 06:59:39 CDT 2007
Hi,
I've just finished the first part of cleaning fftpack (only zfft for
now; wanted to get dev feedback before implementing the scheme for
everything). The patch is available as the ticket 408:
http://projects.scipy.org/scipy/scipy/ticket/408
The patch consists in two part:
- one part split each implementation out of zfft.c, to put it in
zfft_name.c files, where name is the name of the backend (mkl, fftw,
fftw3, etc...). The corresponding files have no #ifdef, etc... and
should be easy to read/improve now.
- the above source files are then used to generate a zfft.c file,
through a python script. The main reason why I used python to generate
the file instead of C macro is because I find this solution easier to
add backend: adding a backend only consists in creating a new
zfft_name.c file, and adding name to a python list in the python
script. Also, as the zfft.c is human readable and do not use new
macros, it should be easy to read it now.
- Regenerating the zfft.c file is only necessary when one of the
backend source is changed, or when a new backend is added.
Otherwise, it should work exactly as before; any change of behaviour
with respect to configuring/compiling/running is a bug :) I've made no
attempt for the python script to be pretty, too
cheers,
David
More information about the Scipy-dev
mailing list