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

Classes

class  fftT
 
class  fftT< _inputT, _outputT, _rank, 0 >
 Fast Fourier Transforms using the FFTW library. More...
 
struct  fftwEnvironment
 Manage the FFTW environment and wisdom using RAII. More...
 
struct  fftwEnvironment< realT, true >
 
struct  fftwPlanSpec
 Specify the type of the plan based on the real type of the data. More...
 
struct  fftwPlanSpec< double >
 Specialization of fftwPlanSpec for double. More...
 
struct  fftwPlanSpec< float >
 Specialization of fftwPlanSpec for float. More...
 
struct  fftwPlanSpec< long double >
 Specialization of fftwPlanSpec for long double. More...
 
struct  fftwTypeSpec
 A structure specifying various types based on the FFT input and output data types. More...
 
struct  fftwTypeSpec< complexDT, complexDT >
 Specialization of fftwTypeSpec for complex-double input and complex-double output. More...
 
struct  fftwTypeSpec< complexDT, double >
 Specialization of fftwTypeSpec for complex-double input and double output. More...
 
struct  fftwTypeSpec< complexFT, complexFT >
 Specialization of fftwTypeSpec for complex-float input and complex-float output. More...
 
struct  fftwTypeSpec< complexFT, float >
 Specialization of fftwTypeSpec for complex-float input and real-float output. More...
 
struct  fftwTypeSpec< complexLT, complexLT >
 Specialization of fftwTypeSpec for complex-long-double input and complex-long-double output. More...
 
struct  fftwTypeSpec< complexLT, long double >
 Specialization of fftwTypeSpec for complex-long-double input and real-long-double output. More...
 
struct  fftwTypeSpec< double, complexDT >
 Specialization of fftwTypeSpec for real-double input and complex-double output. More...
 
struct  fftwTypeSpec< float, complexFT >
 Specialization of fftwTypeSpec for real-float input and complex-float output. More...
 
struct  fftwTypeSpec< long double, complexLT >
 Specialization of fftwTypeSpec for real-long-double input and complex-long-double output. More...
 
class  mftT
 
class  mftT< _inputT, _outputT, _rank, 0 >
 Matrix Fourier Transforms. More...
 

Typedefs

typedef std::complex< floatcomplexFT
 The complex float data type.
 
typedef std::complex< doublecomplexDT
 The complex double data type.
 
typedef std::complex< long doublecomplexLT
 The complex long double data type.
 

Enumerations

enum class  dir { dir::forward , dir::backward }
 Directions of the Fourier Transform. More...
 

Functions

template<int rank>
std::vector< intfftwDimVec (int szX, int szY, int szZ)
 
template<>
std::vector< intfftwDimVec< 1 > (int szX, int szY, int szZ)
 
template<>
std::vector< intfftwDimVec< 2 > (int szX, int szY, int szZ)
 
template<>
std::vector< intfftwDimVec< 3 > (int szX, int szY, int szZ)
 
template<typename realT >
std::string fftw_typename ()
 Return a string corresponding the fftw real floating point type.
 
template<>
std::string fftw_typename< float > ()
 
template<>
std::string fftw_typename< double > ()
 
template<>
std::string fftw_typename< long double > ()
 
template<typename realT >
std::string fftw_wisdom_filename ()
 Create the mxlib standard wisdom filename for the type.
 
template<typename realT >
int fftw_import_system_wisdom ()
 Template wrapper for fftwX_import_system_wisdom();.
 
template<>
int fftw_import_system_wisdom< float > ()
 
template<>
int fftw_import_system_wisdom< double > ()
 
template<>
int fftw_import_system_wisdom< long double > ()
 
template<typename realT >
int fftw_import_wisdom_from_filename (const char *filename)
 Template wrapper for fftwX_import_wisdom_from_filename(const char *);.
 
template<>
int fftw_import_wisdom_from_filename< float > (const char *filename)
 
template<>
int fftw_import_wisdom_from_filename< double > (const char *filename)
 
template<>
int fftw_import_wisdom_from_filename< long double > (const char *filename)
 
template<typename realT >
int fftw_export_wisdom_to_filename (const char *filename)
 Template wrapper for fftwX_export_wisdom_to_filename(const char *);.
 
template<>
int fftw_export_wisdom_to_filename< float > (const char *filename)
 
template<>
int fftw_export_wisdom_to_filename< double > (const char *filename)
 
template<>
int fftw_export_wisdom_to_filename< long double > (const char *filename)
 
template<typename realT >
realTfftw_malloc (size_t n)
 Call to fftw_malloc, with type cast.
 
template<>
floatfftw_malloc< float > (size_t n)
 
template<>
complexFTfftw_malloc< complexFT > (size_t n)
 
template<>
doublefftw_malloc< double > (size_t n)
 
template<>
complexDTfftw_malloc< complexDT > (size_t n)
 
template<>
long doublefftw_malloc< long double > (size_t n)
 
template<>
complexLTfftw_malloc< complexLT > (size_t n)
 
template<typename realT >
void fftw_free (realT *p)
 Call to fftw_free.
 
template<>
void fftw_free< float > (float *p)
 
template<>
void fftw_free< complexFT > (complexFT *p)
 
template<>
void fftw_free< double > (double *p)
 
template<>
void fftw_free< complexDT > (complexDT *p)
 
template<>
void fftw_free< long double > (long double *p)
 
template<>
void fftw_free< complexLT > (complexLT *p)
 
template<typename realT >
void fftw_make_planner_thread_safe ()
 Wrapper for fftwX_make_planner_thread_safe()
 
template<>
void fftw_make_planner_thread_safe< float > ()
 
template<>
void fftw_make_planner_thread_safe< double > ()
 
template<>
void fftw_make_planner_thread_safe< long double > ()
 
template<typename realT >
void fftw_plan_with_nthreads (int nthreads)
 Tell the FFTW planner how many threads to use.
 
template<>
void fftw_plan_with_nthreads< float > (int nthreads)
 
template<>
void fftw_plan_with_nthreads< double > (int nthreads)
 
template<>
void fftw_plan_with_nthreads< long double > (int nthreads)
 
template<typename inputDataT , typename outputDataT >
fftwTypeSpec< inputDataT, outputDataT >::planT fftw_plan_dft (std::vector< int > n, inputDataT *in, outputDataT *out, int sign, unsigned flags)
 Wrapper for the fftwX_plan_dft functions.
 
template<>
fftwTypeSpec< complexFT, complexFT >::planT fftw_plan_dft< complexFT, complexFT > (std::vector< int > n, complexFT *in, complexFT *out, int sign, unsigned flags)
 
template<>
fftwTypeSpec< float, complexFT >::planT fftw_plan_dft< float, complexFT > (std::vector< int > n, float *in, complexFT *out, int sign, unsigned flags)
 
template<>
fftwTypeSpec< complexFT, float >::planT fftw_plan_dft< complexFT, float > (std::vector< int > n, complexFT *in, float *out, int sign, unsigned flags)
 
template<>
fftwTypeSpec< complexDT, complexDT >::planT fftw_plan_dft< complexDT, complexDT > (std::vector< int > n, complexDT *in, complexDT *out, int sign, unsigned flags)
 
template<>
fftwTypeSpec< double, complexDT >::planT fftw_plan_dft< double, complexDT > (std::vector< int > n, double *in, complexDT *out, int sign, unsigned flags)
 
template<>
fftwTypeSpec< complexDT, double >::planT fftw_plan_dft< complexDT, double > (std::vector< int > n, complexDT *in, double *out, int sign, unsigned flags)
 
template<>
fftwTypeSpec< complexLT, complexLT >::planT fftw_plan_dft< complexLT, complexLT > (std::vector< int > n, complexLT *in, complexLT *out, int sign, unsigned flags)
 
template<>
fftwTypeSpec< longdouble, complexLT >::planT fftw_plan_dft< long double, complexLT > (std::vector< int > n, long double *in, complexLT *out, int sign, unsigned flags)
 
template<>
fftwTypeSpec< complexLT, longdouble >::planT fftw_plan_dft< complexLT, long double > (std::vector< int > n, complexLT *in, long double *out, int sign, unsigned flags)
 
template<typename realT >
void fftw_cleanup ()
 Cleanup persistent planner data.
 
template<>
void fftw_cleanup< float > ()
 
template<>
void fftw_cleanup< double > ()
 
template<>
void fftw_cleanup< long double > ()
 
template<typename realT >
void fftw_cleanup_threads ()
 Cleanup persistent planner data and threads data.
 
template<>
void fftw_cleanup_threads< float > ()
 
template<>
void fftw_cleanup_threads< double > ()
 
template<>
void fftw_cleanup_threads< long double > ()
 
template<typename inputDataT , typename outputDataT >
void fftw_execute_dft (typename fftwTypeSpec< inputDataT, outputDataT >::planT plan, inputDataT *in, outputDataT *out)
 Execute the given plan on the given arrays.
 
template<>
void fftw_execute_dft< complexFT, complexFT > (fftwTypeSpec< complexFT, complexFT >::planT plan, complexFT *in, complexFT *out)
 
template<>
void fftw_execute_dft< float, complexFT > (fftwTypeSpec< float, complexFT >::planT plan, float *in, complexFT *out)
 
template<>
void fftw_execute_dft< complexFT, float > (fftwTypeSpec< complexFT, float >::planT plan, complexFT *in, float *out)
 
template<>
void fftw_execute_dft< complexDT, complexDT > (fftwTypeSpec< complexDT, complexDT >::planT plan, complexDT *in, complexDT *out)
 
template<>
void fftw_execute_dft< double, complexDT > (fftwTypeSpec< double, complexDT >::planT plan, double *in, complexDT *out)
 
template<>
void fftw_execute_dft< complexDT, double > (fftwTypeSpec< complexDT, double >::planT plan, complexDT *in, double *out)
 
template<typename realT >
void fftw_destroy_plan (typename fftwPlanSpec< realT >::planT plan)
 Destroy the given plan.
 
template<>
void fftw_destroy_plan< float > (fftwPlanSpec< float >::planT plan)
 
template<>
void fftw_destroy_plan< double > (fftwPlanSpec< double >::planT plan)
 
template<>
void fftw_destroy_plan< long double > (fftwPlanSpec< long double >::planT plan)
 
template<class eigenArrOutT , class eigenArrInT >
void padR2CFFTOutput (eigenArrOutT &aout, eigenArrInT &ain)
 Add padding to the output of a real-to-complex (R2C) FFT.
 
template<class eigenArrOutT , class eigenArrInT >
void padC2CFFTOutput (eigenArrOutT &aout, eigenArrInT &ain)
 Add padding to the output of a complex-to-complex (C2C) FFT.
 
template<class eigenArrOutT , class eigenArrInT >
void augmentR2CFFTOutput (eigenArrOutT &aout, eigenArrInT &ain)
 

Function Documentation

◆ fftw_typename< double >()

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

◆ fftw_typename< float >()

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

◆ fftw_typename< long double >()

template<>
std::string mx::math::ft::fftw_typename< long double > ( )

◆ fftwDimVec()

template<int rank>
std::vector< int > mx::math::ft::fftwDimVec ( int  szX,
int  szY,
int  szZ 
)

◆ fftwDimVec< 1 >()

template<>
std::vector< int > mx::math::ft::fftwDimVec< 1 > ( int  szX,
int  szY,
int  szZ 
)

◆ fftwDimVec< 2 >()

template<>
std::vector< int > mx::math::ft::fftwDimVec< 2 > ( int  szX,
int  szY,
int  szZ 
)

◆ fftwDimVec< 3 >()

template<>
std::vector< int > mx::math::ft::fftwDimVec< 3 > ( int  szX,
int  szY,
int  szZ 
)