27 #ifndef fftwTemplates_hpp
28 #define fftwTemplates_hpp
87 template<
typename realT>
92 template<
typename realT>
167 template<
typename _inputDataT,
typename _outputDataT>
172 template<
typename _inputDataT,
typename _outputDataT>
337 template<
typename realT>
344 int fftw_import_system_wisdom<float>();
348 int fftw_import_system_wisdom<double>();
352 int fftw_import_system_wisdom<long double>();
357 int fftw_import_system_wisdom<__float128>();
369 template<
typename realT>
374 int fftw_import_wisdom_from_filename<float>(
const char * filename );
377 int fftw_import_wisdom_from_filename<double>(
const char * filename );
380 int fftw_import_wisdom_from_filename<long double>(
const char * filename );
384 int fftw_import_wisdom_from_filename<__float128>(
const char * filename );
396 template<
typename realT>
400 int fftw_export_wisdom_to_filename<float>(
const char *filename);
403 int fftw_export_wisdom_to_filename<double>(
const char *filename);
406 int fftw_export_wisdom_to_filename<long double>(
const char *filename);
410 int fftw_export_wisdom_to_filename<__float128>(
const char *filename);
434 template<
typename realT>
438 float * fftw_malloc<float>(
size_t n);
441 complexFT * fftw_malloc<complexFT>(
size_t n);
444 double * fftw_malloc<double>(
size_t n);
447 complexDT * fftw_malloc<complexDT>(
size_t n);
450 long double * fftw_malloc<long double>(
size_t n);
453 complexLT * fftw_malloc<complexLT>(
size_t n);
457 __float128 * fftw_malloc<__float128>(
size_t n);
460 complexQT * fftw_malloc<complexQT>(
size_t n);
469 template<
typename realT>
473 void fftw_free<float>(
float * p);
476 void fftw_free<complexFT>(
complexFT * p);
479 void fftw_free<double>(
double * p);
482 void fftw_free<complexDT>(
complexDT * p);
485 void fftw_free<long double>(
long double * p);
488 void fftw_free<complexLT>(
complexLT * p);
492 void fftw_free<__float128>( __float128 * p);
495 void fftw_free<complexQT>(
complexQT * p);
512 template<
typename realT>
517 void fftw_make_planner_thread_safe<float>();
520 void fftw_make_planner_thread_safe<double>();
523 void fftw_make_planner_thread_safe<long double>();
527 void fftw_make_planner_thread_safe<__float128>();
535 template<
typename realT>
539 void fftw_plan_with_nthreads<float>(
int nthreads);
542 void fftw_plan_with_nthreads<double>(
int nthreads);
545 void fftw_plan_with_nthreads<long double>(
int nthreads);
549 void fftw_plan_with_nthreads<__float128>(
int nthreads);
567 template<
typename inputDataT,
typename outputDataT>
677 template<
typename realT>
681 void fftw_cleanup<float>();
684 void fftw_cleanup<double>();
687 void fftw_cleanup<long double>();
691 void fftw_cleanup<__float128>();
697 template<
typename realT>
701 void fftw_cleanup_threads<float>();
704 void fftw_cleanup_threads<double>();
707 void fftw_cleanup_threads<long double>();
711 void fftw_cleanup_threads<__float128>();
736 template<
typename inputDataT,
typename outputDataT>
786 template<
typename realT>
realT * fftw_malloc(size_t n)
Call to fftw_malloc, with type cast.
void fftw_free(realT *p)
Call to fftw_free.
void fftw_execute_dft(typename fftwTypeSpec< inputDataT, outputDataT >::planT plan, inputDataT *in, outputDataT *out)
Execute the given plan on the given arrays.
void fftw_destroy_plan(typename fftwPlanSpec< realT >::planT plan)
Destroy the given plan.
void fftw_plan_with_nthreads(int nthreads)
Tell the FFTW planner how many threads to use.
void fftw_cleanup_threads()
Cleanup persistent planner data and threads data.
void fftw_cleanup()
Cleanup persistent planner data.
void fftw_make_planner_thread_safe()
Wrapper for fftwX_make_planner_thread_safe()
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.
std::complex< double > complexDT
The complex double data type.
std::complex< float > complexFT
The complex float data type.
std::complex< __float128 > complexQT
The complex __float128 data type.
std::complex< long double > complexLT
The complex long double data type.
int fftw_export_wisdom_to_filename(const char *filename)
Template wrapper for fftwX_export_wisdom_to_filename(const char *);.
int fftw_import_wisdom_from_filename(const char *filename)
Template wrapper for fftwX_import_wisdom_from_filename(const char *);.
int fftw_import_system_wisdom()
Template wrapper for fftwX_import_system_wisdom();.
T sign(T x)
The sign function.
fftwq_plan planT
Specifies fftwq_plan as planT.
fftw_plan planT
Specifies fftw_plan as planT.
fftwf_plan planT
Specifies fftwf_plan as planT.
fftwl_plan planT
Specifies fftwl_plan as planT.
Specify the type of the plan based on the real type of the data.
fftwX_plan planT
Specializations typedef planT as fftwf_plan, fftw_plan, fftwl_plan, or fftwq_plan.
__float128 realT
The real data type.
double realT
The real data type.
double realT
The real data type.
complexFT outputDataT
The output array data type.
fftwPlanSpec< float >::planT planT
The plan type.
complexFT complexT
The complex data type.
float realT
The real data type.
complexFT inputDataT
The input array data type.
float realT
The real data type.
long double realT
The real data type.
long double realT
The real data type.
__float128 realT
The real data type.
__float128 realT
The real data type.
double realT
The real data type.
complexFT complexT
The complex data type.
float realT
The real data type.
float inputDataT
The input array data type.
fftwPlanSpec< float >::planT planT
The plan type.
complexFT outputDataT
The output array data type.
long double realT
The real data type.
A structure specifying various types based on the FFT input and output data types.
_outputDataT outputDataT
The output array data type.
std::complex< realT > complexT
The complex data type.
fftwPlanSpec< realT >::planT planT
The plan type.
_inputDataT inputDataT
The input array data type.
_realT realT
The real data type (_realT is actually defined in specializations).