casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
casacore::FFTW Class Reference

C++ interface to the FFTWw library. More...

#include <FFTW.h>

Classes

class  Plan
 

Public Member Functions

 FFTW ()
 
 ~FFTW ()
 
void plan_r2c (const IPosition &size, float *in, std::complex< float > *out)
 overloaded interface to fftw[f]_plan... More...
 
void plan_r2c (const IPosition &size, double *in, std::complex< double > *out)
 
void plan_c2r (const IPosition &size, std::complex< float > *in, float *out)
 
void plan_c2r (const IPosition &size, std::complex< double > *in, double *out)
 
void plan_c2c_forward (const IPosition &size, std::complex< double > *in)
 
void plan_c2c_forward (const IPosition &size, std::complex< float > *in)
 
void plan_c2c_backward (const IPosition &size, std::complex< double > *in)
 
void plan_c2c_backward (const IPosition &size, std::complex< float > *in)
 
void r2c (const IPosition &size, float *in, std::complex< float > *out)
 TODO These overloads do not use their parameters at all. More...
 
void r2c (const IPosition &size, double *in, std::complex< double > *out)
 
void c2r (const IPosition &size, std::complex< float > *in, float *out)
 
void c2r (const IPosition &size, std::complex< double > *in, double *out)
 
void c2c (const IPosition &size, std::complex< float > *in, bool forward)
 
void c2c (const IPosition &size, std::complex< double > *in, bool forward)
 

Static Public Member Functions

static Plan plan_redft00 (const IPosition &size, float *in, float *out)
 
static Plan plan_redft00 (const IPosition &size, double *in, double *out)
 

Static Private Member Functions

static void initialize_fftw ()
 

Private Attributes

std::unique_ptr< FFTWPlanf > itsPlanR2Cf
 
std::unique_ptr< FFTWPlan > itsPlanR2C
 
std::unique_ptr< FFTWPlanf > itsPlanC2Rf
 
std::unique_ptr< FFTWPlan > itsPlanC2R
 
std::unique_ptr< FFTWPlanf > itsPlanC2CFf
 
std::unique_ptr< FFTWPlan > itsPlanC2CF
 
std::unique_ptr< FFTWPlanf > itsPlanC2CBf
 
std::unique_ptr< FFTWPlan > itsPlanC2CB
 
std::unique_ptr< FFTWPlanf > itsPlanR2Rf
 
std::unique_ptr< FFTWPlan > itsPlanR2R
 
unsigned flags
 

Static Private Attributes

static bool is_initialized_fftw
 
static std::mutex theirMutex
 only once per process, not once per object More...
 

Detailed Description

C++ interface to the FFTWw library.

Review Status

Reviewed By:
NONE

Synopsis

This is a wrapper of FFTW3. It is only active if FFTW3 was found during the build. If not found, all functions won't do anything at all.

The interface is such that the presence of FFTW3 is only visible in the implementation. The header file does not need to know. In this way external code using this class does not need to set HAVE_FFTW.

Definition at line 57 of file FFTW.h.

Constructor & Destructor Documentation

casacore::FFTW::FFTW ( )
casacore::FFTW::~FFTW ( )

Member Function Documentation

void casacore::FFTW::c2c ( const IPosition size,
std::complex< float > *  in,
bool  forward 
)
void casacore::FFTW::c2c ( const IPosition size,
std::complex< double > *  in,
bool  forward 
)
void casacore::FFTW::c2r ( const IPosition size,
std::complex< float > *  in,
float *  out 
)
void casacore::FFTW::c2r ( const IPosition size,
std::complex< double > *  in,
double *  out 
)
static void casacore::FFTW::initialize_fftw ( )
staticprivate
void casacore::FFTW::plan_c2c_backward ( const IPosition size,
std::complex< double > *  in 
)
void casacore::FFTW::plan_c2c_backward ( const IPosition size,
std::complex< float > *  in 
)
void casacore::FFTW::plan_c2c_forward ( const IPosition size,
std::complex< double > *  in 
)
void casacore::FFTW::plan_c2c_forward ( const IPosition size,
std::complex< float > *  in 
)
void casacore::FFTW::plan_c2r ( const IPosition size,
std::complex< float > *  in,
float *  out 
)
void casacore::FFTW::plan_c2r ( const IPosition size,
std::complex< double > *  in,
double *  out 
)
void casacore::FFTW::plan_r2c ( const IPosition size,
float *  in,
std::complex< float > *  out 
)

overloaded interface to fftw[f]_plan...

void casacore::FFTW::plan_r2c ( const IPosition size,
double *  in,
std::complex< double > *  out 
)
static Plan casacore::FFTW::plan_redft00 ( const IPosition size,
float *  in,
float *  out 
)
static
static Plan casacore::FFTW::plan_redft00 ( const IPosition size,
double *  in,
double *  out 
)
static
void casacore::FFTW::r2c ( const IPosition size,
float *  in,
std::complex< float > *  out 
)

TODO These overloads do not use their parameters at all.

This should be written to use an interface like plan_redft00(). overloaded interface to fftw[f]_execute...

void casacore::FFTW::r2c ( const IPosition size,
double *  in,
std::complex< double > *  out 
)

Member Data Documentation

unsigned casacore::FFTW::flags
private

Definition at line 128 of file FFTW.h.

bool casacore::FFTW::is_initialized_fftw
staticprivate

Definition at line 130 of file FFTW.h.

std::unique_ptr<FFTWPlan> casacore::FFTW::itsPlanC2CB
private

Definition at line 123 of file FFTW.h.

std::unique_ptr<FFTWPlanf> casacore::FFTW::itsPlanC2CBf
private

Definition at line 122 of file FFTW.h.

std::unique_ptr<FFTWPlan> casacore::FFTW::itsPlanC2CF
private

Definition at line 120 of file FFTW.h.

std::unique_ptr<FFTWPlanf> casacore::FFTW::itsPlanC2CFf
private

Definition at line 119 of file FFTW.h.

std::unique_ptr<FFTWPlan> casacore::FFTW::itsPlanC2R
private

Definition at line 117 of file FFTW.h.

std::unique_ptr<FFTWPlanf> casacore::FFTW::itsPlanC2Rf
private

Definition at line 116 of file FFTW.h.

std::unique_ptr<FFTWPlan> casacore::FFTW::itsPlanR2C
private

Definition at line 114 of file FFTW.h.

std::unique_ptr<FFTWPlanf> casacore::FFTW::itsPlanR2Cf
private

Definition at line 113 of file FFTW.h.

std::unique_ptr<FFTWPlan> casacore::FFTW::itsPlanR2R
private

Definition at line 126 of file FFTW.h.

std::unique_ptr<FFTWPlanf> casacore::FFTW::itsPlanR2Rf
private

Definition at line 125 of file FFTW.h.

std::mutex casacore::FFTW::theirMutex
staticprivate

only once per process, not once per object

TODO this mutex does not make FFTW thread safe, because planning an FFT with FFTW is not thread safe either. So either the plan..() methods should take the mutex, or FFTW should leave synchronization fully to the user of this class: currently it's halfway in between.

Definition at line 139 of file FFTW.h.


The documentation for this class was generated from the following file: