mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches

Management of FFTW Wisdom. More...

Management of FFTW Wisdom.

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::ftwEnvironment. To make the best use of this, create a directory to store FFTW wisdom. The typical choise is $(HOME)/.fftw

Then add the environment variable to your 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. E.g.:

#include <mx/fft/fftwEnvironment.hpp>
int main()
{
typedef double realT;
//do stuff . . .
return 0;
}
constexpr floatT six_fifths()
Return 6/5 in the specified precision.
Manage the FFTW environment and wisdom using RAII.

See the documentation for mx::math::ft::fftwEnvironment for details.

Classes

struct  mx::math::ft::fftwEnvironment< realT, threads >
 Manage the FFTW environment and wisdom using RAII. More...
 

Functions

template<typename realT >
std::string mx::math::ft::fftw_typename ()
 Return a string corresponding the fftw real floating point type.
 
template<typename realT >
std::string mx::math::ft::fftw_wisdom_filename ()
 Create the mxlib standard wisdom filename for the type.
 

Function Documentation

◆ fftw_typename()

template<typename realT >
std::string mx::math::ft::fftw_typename ( )

Return a string corresponding the fftw real floating point type.

This is used for wisdom filenames.

Template Parameters
realTthe real floating point type.

◆ fftw_wisdom_filename()

template<typename realT >
std::string mx::math::ft::fftw_wisdom_filename ( )

Create the mxlib standard wisdom filename for the type.

Looks for the environment variable MXFFTW_WISDOM. If not found, then pwd "./" is used.

Template Parameters
realTis the real floating point type.

Definition at line 109 of file fftwEnvironment.hpp.

References mx::sys::getEnv(), and mx::math::six_fifths().