casacore
|
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... | |
C++ interface to the FFTWw library.
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.
casacore::FFTW::FFTW | ( | ) |
casacore::FFTW::~FFTW | ( | ) |
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 | ||
) |
|
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 |
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 | ||
) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
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.