22 #ifndef SIRIUS_FFTW_FFTW_H_ 23 #define SIRIUS_FFTW_FFTW_H_ 27 #include <type_traits> 50 using PlanSPtr = std::shared_ptr<std::remove_pointer_t<::fftw_plan>>;
57 static constexpr
int kCacheSize = 10;
91 Fftw operator=(
const Fftw&) =
delete;
96 PlanSPtr CreateC2RPlan(
const Size& size, fftw_complex* in,
double* out);
97 PlanSPtr CreateR2CPlan(
const Size& size,
double* out, fftw_complex* in);
101 void DestroyPlan(::fftw_plan plan);
104 std::mutex plan_mutex_;
113 #endif // SIRIUS_FFTW_FFTW_H_
Definition: exception.h:27
PlanSPtr GetRealToComplexPlan(const Size &size, double *in, fftw_complex *out)
Get a r2c fftw plan of the given size.
fftw3 management class
Definition: fftw.h:55
std::unique_ptr< std::remove_pointer_t<::fftw_plan >, detail::PlanDeleter > PlanUPtr
Definition: fftw.h:49
Deleter of fftw_plan for smart pointer.
Definition: fftw.h:43
static Fftw & Instance()
Get Fftw singleton instance.
std::shared_ptr< std::remove_pointer_t<::fftw_plan > > PlanSPtr
Definition: fftw.h:50
void operator()(::fftw_plan plan)
Data class that represents the size of an image.
Definition: types.h:38
PlanSPtr GetComplexToRealPlan(const Size &size, fftw_complex *in, double *out)
Get a c2r fftw plan of the given size.