casacore
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

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

◆ FFTW()

casacore::FFTW::FFTW ( )

◆ ~FFTW()

casacore::FFTW::~FFTW ( )

Member Function Documentation

◆ c2c() [1/2]

void casacore::FFTW::c2c ( const IPosition size,
std::complex< double > *  in,
bool  forward 
)

◆ c2c() [2/2]

void casacore::FFTW::c2c ( const IPosition size,
std::complex< float > *  in,
bool  forward 
)

◆ c2r() [1/2]

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

◆ c2r() [2/2]

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

◆ initialize_fftw()

static void casacore::FFTW::initialize_fftw ( )
staticprivate

◆ plan_c2c_backward() [1/2]

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

◆ plan_c2c_backward() [2/2]

void casacore::FFTW::plan_c2c_backward ( const IPosition size,
std::complex< float > *  in 
)

◆ plan_c2c_forward() [1/2]

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

◆ plan_c2c_forward() [2/2]

void casacore::FFTW::plan_c2c_forward ( const IPosition size,
std::complex< float > *  in 
)

◆ plan_c2r() [1/2]

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

◆ plan_c2r() [2/2]

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

◆ plan_r2c() [1/2]

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

◆ plan_r2c() [2/2]

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

overloaded interface to fftw[f]_plan...

◆ plan_redft00() [1/2]

static Plan casacore::FFTW::plan_redft00 ( const IPosition size,
double *  in,
double *  out 
)
static

◆ plan_redft00() [2/2]

static Plan casacore::FFTW::plan_redft00 ( const IPosition size,
float *  in,
float *  out 
)
static

◆ r2c() [1/2]

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

◆ r2c() [2/2]

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...

Member Data Documentation

◆ flags

unsigned casacore::FFTW::flags
private

Definition at line 128 of file FFTW.h.

◆ is_initialized_fftw

bool casacore::FFTW::is_initialized_fftw
staticprivate

Definition at line 130 of file FFTW.h.

◆ itsPlanC2CB

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

Definition at line 123 of file FFTW.h.

◆ itsPlanC2CBf

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

Definition at line 122 of file FFTW.h.

◆ itsPlanC2CF

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

Definition at line 120 of file FFTW.h.

◆ itsPlanC2CFf

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

Definition at line 119 of file FFTW.h.

◆ itsPlanC2R

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

Definition at line 117 of file FFTW.h.

◆ itsPlanC2Rf

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

Definition at line 116 of file FFTW.h.

◆ itsPlanR2C

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

Definition at line 114 of file FFTW.h.

◆ itsPlanR2Cf

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

Definition at line 113 of file FFTW.h.

◆ itsPlanR2R

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

Definition at line 126 of file FFTW.h.

◆ itsPlanR2Rf

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

Definition at line 125 of file FFTW.h.

◆ theirMutex

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: