mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
Instructions for building and installing the FFTW library
The FFTW library is probably available from your software/package manager, however I recommend building it yourself to ensure it is fullly optimized for your system, and that you have all of the precisions available.
Folow these steps to build the FFTW library.
$ ./configure --enable-float --with-combined-threads --enable-threads --enable-shared $ make -j $ sudo make install
$ ./configure --with-combined-threads --enable-threads --enable-shared $ make -j $ sudo make install
$ ./configure --enable-long-double --with-combined-threads --enable-threads --enable-shared $ make -j $ sudo make install
$ ./configure --enable-quad-precision --with-combined-threads --enable-threads --enable-shared $ make -j $ sudo make install
mxlib will manage the FFTW environment for you, which really means importing and exporting wisdom and cleaning up memory. This can be done in a simple way using mx::math::fft::fftwEnvironment. To make the best use of this, create a directory to store FFTW wisdom. I typically use
$(HOME)/.fftw
Then add the environment variable to you bash profile (i.e. in .bash_profile or .bash_aliases) as so
export MXFFTW_WISDOM=/path/to/.fftw
Using this facility requires only that you create an object of type mx::math::fft::fftwEnvironment at the beginning of the program for the real floating point type you are using. See the documentation for mx::math::fft::fftwEnvironment for details.