mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
fftwTemplates.hpp
Go to the documentation of this file.
1 /** \file fftwTemplates.hpp
2  * \brief Declares and defines templatized wrappers for the fftw library
3  * \ingroup fft_files
4  * \author Jared R. Males (jaredmales@gmail.com)
5  *
6  */
7 
8 //***********************************************************************//
9 // Copyright 2015, 2016, 2017 Jared R. Males (jaredmales@gmail.com)
10 //
11 // This file is part of mxlib.
12 //
13 // mxlib is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // mxlib is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with mxlib. If not, see <http://www.gnu.org/licenses/>.
25 //***********************************************************************//
26 
27 #ifndef fftwTemplates_hpp
28 #define fftwTemplates_hpp
29 
30 #include <complex>
31 #include <vector>
32 
33 #include <fftw3.h>
34 
35 
36 namespace mx
37 {
38 namespace math
39 {
40 namespace fft
41 {
42 
43 /** \addtogroup fftw_templates
44  *
45  * A templatized interface to the fftw library.
46  *
47  */
48 
49 /** \defgroup fftw_template_types Types
50  * \brief Types and type specifications for FFTW Templates.
51  *
52  * \ingroup fftw_templates
53  *
54  * @{
55  */
56 
57 
58 ///The complex float data type.
59 typedef std::complex<float> complexFT;
60 
61 ///The complex double data type.
62 typedef std::complex<double> complexDT;
63 
64 ///The complex long double data type.
65 typedef std::complex<long double> complexLT;
66 
67 #ifdef HASQUAD
68 ///The complex __float128 data type.
69 typedef std::complex<__float128> complexQT;
70 #endif
71 
72 //****** Plans ******//
73 
74 /** \defgroup fftw_template_plan_specs Plan Specification
75  * \brief Plan specifications for FFTW Templates.
76  *
77  * \ingroup fftw_template_types
78  *
79  * @{
80  */
81 
82 ///Specify the type of the plan based on the real type of the data
83 /**
84  *
85  * \tparam realT is the real floating point type.
86  */
87 template<typename realT>
88 struct fftwPlanSpec;
89 
90 //For doxygen only:
91 #ifdef __DOXY_ONLY__
92 template<typename realT>
94 {
95  /// Specializations typedef planT as fftwf_plan, fftw_plan, fftwl_plan, or fftwq_plan.
96  typedef fftwX_plan planT;
97 };
98 #endif
99 
100 ///Specialization of fftwPlanSpec for float
101 template<>
102 struct fftwPlanSpec<float>
103 {
104  /// Specifies fftwf_plan as planT
105  typedef fftwf_plan planT;
106 };
107 
108 ///Specialization of fftwPlanSpec for double
109 template<>
110 struct fftwPlanSpec<double>
111 {
112  /// Specifies fftw_plan as planT
113  typedef fftw_plan planT;/// Specifies fftwf_plan as planT
114 };
115 
116 ///Specialization of fftwPlanSpec for long double
117 template<>
118 struct fftwPlanSpec<long double>
119 {
120  /// Specifies fftwl_plan as planT
121  typedef fftwl_plan planT;
122 };
123 
124 #ifdef HASQUAD
125 ///Specialization of fftwPlanSpec for __float128
126 template<>
127 struct fftwPlanSpec<__float128>
128 {
129  /// Specifies fftwq_plan as planT
130  typedef fftwq_plan planT;
131 };
132 #endif
133 
134 ///@}
135 
136 //******* Type Specification *********//
137 
138 /** \defgroup fftw_template_type_specs Type Specification
139  * \brief Type specifications for FFTW Templates.
140  *
141  * \ingroup fftw_template_types
142  *
143  * @{
144  */
145 
146 ///A structure specifying various types based on the FFT input and output data types.
147 /** Provides various typedefs to specify which fftw functions to compile.
148  *
149  * See the specializations:
150  * \li fftwTypeSpec<complexFT,complexFT>
151  * \li fftwTypeSpec<float, complexFT>
152  * \li fftwTypeSpec<complexFT, float>
153  * \li fftwTypeSpec<complexDT,complexDT>
154  * \li fftwTypeSpec<double, complexDT>
155  * \li fftwTypeSpec<complexDT, double>
156  * \li fftwTypeSpec<complexLT,complexLT>
157  * \li fftwTypeSpec<long double, complexLT>
158  * \li fftwTypeSpec<complexLT, long double>
159  * \li fftwTypeSpec<complexQT,complexQT>
160  * \li fftwTypeSpec<__float128, complexQT>
161  * \li fftwTypeSpec<complexQT, __float128>
162  *
163  * \tparam _inputDataT is the data type of the input array
164  * \tparam _outputDataT is the data type of the output array
165  *
166  */
167 template<typename _inputDataT, typename _outputDataT>
168 struct fftwTypeSpec;
169 
170 //For doxygen only:
171 #ifdef __DOXY_ONLY__
172 template<typename _inputDataT, typename _outputDataT>
174 {
175  typedef _realT realT; ///< The real data type (_realT is actually defined in specializations).
176  typedef std::complex<realT> complexT; ///< The complex data type
177  typedef _inputDataT inputDataT; ///< The input array data type
178  typedef _outputDataT outputDataT; ///< The output array data type
179  typedef fftwPlanSpec<realT>::planT planT; ///< The plan type
180 };
181 #endif
182 
183 ///Specialization of fftwTypeSpec for complex-float input and complex-float output.
184 /**
185  */
186 template<>
188 {
189  typedef float realT; ///< The real data type
190  typedef complexFT complexT; ///< The complex data type
191  typedef complexFT inputDataT; ///< The input array data type
192  typedef complexFT outputDataT; ///< The output array data type
193  typedef fftwPlanSpec<float>::planT planT; ///< The plan type
194 };
195 
196 ///Specialization of fftwTypeSpec for real-float input and complex-float output
197 template<>
198 struct fftwTypeSpec<float, complexFT>
199 {
200  typedef float realT; ///< The real data type
201  typedef complexFT complexT; ///< The complex data type
202  typedef float inputDataT; ///< The input array data type
203  typedef complexFT outputDataT; ///< The output array data type
204  typedef fftwPlanSpec<float>::planT planT; ///< The plan type
205 };
206 
207 ///Specialization of fftwTypeSpec for complex-float input and real-float output
208 template<>
209 struct fftwTypeSpec<complexFT, float>
210 {
211  typedef float realT; ///< The real data type
212  typedef complexFT complexT;
213  typedef complexFT inputDataT;
214  typedef float outputDataT;
216 };
217 
218 ///Specialization of fftwTypeSpec for complex-double input and complex-double output
219 template<>
221 {
222  typedef double realT; ///< The real data type
223  typedef complexDT complexT;
224  typedef complexDT inputDataT;
225  typedef complexDT outputDataT;
227 };
228 
229 ///Specialization of fftwTypeSpec for real-double input and complex-double output
230 template<>
231 struct fftwTypeSpec<double,complexDT>
232 {
233  typedef double realT; ///< The real data type
234  typedef complexDT complexT;
235  typedef double inputDataT;
236  typedef complexDT outputDataT;
238 };
239 
240 ///Specialization of fftwTypeSpec for complex-double input and double output
241 template<>
242 struct fftwTypeSpec<complexDT,double>
243 {
244  typedef double realT; ///< The real data type
245  typedef complexDT complexT;
246  typedef complexDT inputDataT;
247  typedef double outputDataT;
249 };
250 
251 ///Specialization of fftwTypeSpec for complex-long-double input and complex-long-double output
252 template<>
254 {
255  typedef long double realT; ///< The real data type
256  typedef complexLT complexT;
257  typedef complexLT inputDataT;
258  typedef complexLT outputDataT;
260 };
261 
262 ///Specialization of fftwTypeSpec for real-long-double input and complex-long-double output
263 template<>
264 struct fftwTypeSpec<long double,complexLT>
265 {
266  typedef long double realT; ///< The real data type
267  typedef complexLT complexT;
268  typedef long double inputDataT;
269  typedef complexLT outputDataT;
271 };
272 
273 ///Specialization of fftwTypeSpec for complex-long-double input and real-long-double output
274 template<>
275 struct fftwTypeSpec<complexLT,long double>
276 {
277  typedef long double realT; ///< The real data type
278  typedef complexLT complexT;
279  typedef complexLT inputDataT;
280  typedef long double outputDataT;
282 };
283 
284 #ifdef HASQUAD
285 ///Specialization of fftwTypeSpec for complex-quad input and complex-quad output
286 template<>
288 {
289  typedef __float128 realT; ///< The real data type
290  typedef complexQT complexT;
291  typedef complexQT inputDataT;
292  typedef complexQT outputDataT;
294 };
295 
296 ///Specialization of fftwTypeSpec for real-quad input and complex-quad output
297 template<>
298 struct fftwTypeSpec<__float128,complexQT>
299 {
300  typedef __float128 realT; ///< The real data type
301  typedef complexQT complexT;
302  typedef __float128 inputDataT;
303  typedef complexQT outputDataT;
305 };
306 
307 ///Specialization of fftwTypeSpec for complex-quad input and real-quad output
308 template<>
309 struct fftwTypeSpec<complexQT,__float128>
310 {
311  typedef __float128 realT; ///< The real data type
312  typedef complexQT complexT;
313  typedef complexQT inputDataT;
314  typedef __float128 outputDataT;
316 };
317 #endif
318 
319 ///@}
320 ///@}
321 
322 /** \defgroup fftw_template_wisdom Wisdom
323  * \brief Wrappers for working with fftw wisdom.
324  *
325  * \ingroup fftw_templates
326  *
327  * @{
328  */
329 
330 ///Template wrapper for fftwX_import_system_wisdom();
331 /**
332  * \retval 0 on failure
333  * \retval 1 on success
334  *
335  * \tparam realT the real floating point type.
336  */
337 template<typename realT>
339 
340 //specializations don't need to be doxygen-ed:
341 
342 //Template wrapper for fftwf_import_system_wisdom();
343 template<>
344 int fftw_import_system_wisdom<float>();
345 
346 //Template wrapper for fftw_import_system_wisdom();
347 template<>
348 int fftw_import_system_wisdom<double>();
349 
350 //Template wrapper for fftwl_import_system_wisdom();
351 template<>
352 int fftw_import_system_wisdom<long double>();
353 
354 #ifdef HASQUAD
355 //Template wrapper for fftwq_import_system_wisdom();
356 template<>
357 int fftw_import_system_wisdom<__float128>();
358 #endif
359 
360 ///Template wrapper for fftwX_import_wisdom_from_filename(const char *);
361 /**
362  * \param filename is the name of the wisdom file
363  *
364  * \retval 0 on failure
365  * \retval 1 on success
366  *
367  * \tparam realT the real floating point type.
368  */
369 template<typename realT>
370 int fftw_import_wisdom_from_filename( const char * filename );
371 
372 
373 template<>
374 int fftw_import_wisdom_from_filename<float>( const char * filename );
375 
376 template<>
377 int fftw_import_wisdom_from_filename<double>( const char * filename );
378 
379 template<>
380 int fftw_import_wisdom_from_filename<long double>( const char * filename );
381 
382 #ifdef HASQUAD
383 template<>
384 int fftw_import_wisdom_from_filename<__float128>( const char * filename );
385 #endif
386 
387 ///Template wrapper for fftwX_export_wisdom_to_filename(const char *);
388 /**
389  * \param filename is the name of the wisdom file
390  *
391  * \retval 0 on failure
392  * \retval 1 on success
393  *
394  * \tparam realT the real floating point type.
395  */
396 template<typename realT>
397 int fftw_export_wisdom_to_filename(const char * filename);
398 
399 template<>
400 int fftw_export_wisdom_to_filename<float>(const char *filename);
401 
402 template<>
403 int fftw_export_wisdom_to_filename<double>(const char *filename);
404 
405 template<>
406 int fftw_export_wisdom_to_filename<long double>(const char *filename);
407 
408 #ifdef HASQUAD
409 template<>
410 int fftw_export_wisdom_to_filename<__float128>(const char *filename);
411 #endif
412 
413 ///@} fftw_template_wisdom
414 
415 
416 /** \defgroup fftw_template_alloc Allocation
417  * \brief Wrappers for fftw memory allocation and de-allocation functions.
418  *
419  * \note Here the call to sizeof() is implicit, so you only specify the number of elements, not the number of bytes.
420  *
421  * \ingroup fftw_templates
422  *
423  * @{
424  */
425 
426 //************ Allocation ************************//
427 
428 ///Call to fftw_malloc, with type cast.
429 /**
430  * \note Here the call to sizeof() is implicit, so you only specify the number of elements, not the number of bytes.
431  *
432  * \param n is the number of type realT elements, not the number of bytes.
433  */
434 template<typename realT>
435 realT * fftw_malloc( size_t n);
436 
437 template<>
438 float * fftw_malloc<float>(size_t n);
439 
440 template<>
441 complexFT * fftw_malloc<complexFT>(size_t n);
442 
443 template<>
444 double * fftw_malloc<double>(size_t n);
445 
446 template<>
447 complexDT * fftw_malloc<complexDT>(size_t n);
448 
449 template<>
450 long double * fftw_malloc<long double>(size_t n);
451 
452 template<>
453 complexLT * fftw_malloc<complexLT>(size_t n);
454 
455 #ifdef HASQUAD
456 template<>
457 __float128 * fftw_malloc<__float128>(size_t n);
458 
459 template<>
460 complexQT * fftw_malloc<complexQT>(size_t n);
461 #endif
462 
463 //************ De-Allocation ************************//
464 
465 ///Call to fftw_free.
466 /**
467  * \param p is a pointer to the array to de-allocate.
468  */
469 template<typename realT>
470 void fftw_free( realT * p);
471 
472 template<>
473 void fftw_free<float>( float * p);
474 
475 template<>
476 void fftw_free<complexFT>( complexFT * p);
477 
478 template<>
479 void fftw_free<double>( double * p);
480 
481 template<>
482 void fftw_free<complexDT>( complexDT * p);
483 
484 template<>
485 void fftw_free<long double>( long double * p);
486 
487 template<>
488 void fftw_free<complexLT>( complexLT * p);
489 
490 #ifdef HASQUAD
491 template<>
492 void fftw_free<__float128>( __float128 * p);
493 
494 template<>
495 void fftw_free<complexQT>( complexQT * p);
496 #endif
497 
498 ///@} fftw_template_alloc
499 
500 /** \defgroup fftw_template_plans Planning
501  * \brief Wrappers for working with fftw plans.
502  *
503  * \ingroup fftw_templates
504  *
505  * @{
506  */
507 
508 ///Wrapper for fftwX_make_planner_thread_safe()
509 /**
510  * \tparam realT the real floating point type
511  */
512 template<typename realT>
514 
515 
516 template<>
517 void fftw_make_planner_thread_safe<float>();
518 
519 template<>
520 void fftw_make_planner_thread_safe<double>();
521 
522 template<>
523 void fftw_make_planner_thread_safe<long double>();
524 
525 #ifdef HASQUAD
526 template<>
527 void fftw_make_planner_thread_safe<__float128>();
528 #endif
529 
530 //********** Threads ****************//
531 /// Tell the FFTW planner how many threads to use.
532 /**
533  * \tparam realT the real floating point type.
534  */
535 template<typename realT>
536 void fftw_plan_with_nthreads(int nthreads /**< [in] the number of threads. Set to 1 to disable threads. */);
537 
538 template<>
539 void fftw_plan_with_nthreads<float>(int nthreads);
540 
541 template<>
542 void fftw_plan_with_nthreads<double>(int nthreads);
543 
544 template<>
545 void fftw_plan_with_nthreads<long double>(int nthreads);
546 
547 #ifdef HASQUAD
548 template<>
549 void fftw_plan_with_nthreads<__float128>(int nthreads);
550 #endif
551 
552 //********* Plan Creation **************//
553 
554 ///Wrapper for the fftwX_plan_dft functions
555 /**
556  * \param n is a vector of ints containing the size of each dimension.
557  * \param in is the input data array
558  * \param out is the output data array
559  * \param sign specifies forward or backwards, i.e. FFTW_FORWARD or FFTW_BACKWARD.
560  * \param flags other fftw flags
561  *
562  * \returns an fftw plan for the types specified.
563  *
564  * \tparam inputDataT the data type of the input array
565  * \tparam outputDataT the data type of the output array
566  */
567 template<typename inputDataT, typename outputDataT>
569  inputDataT * in,
570  outputDataT * out,
571  int sign,
572  unsigned flags
573  );
574 
575 template<>
576 fftwTypeSpec<complexFT, complexFT>::planT fftw_plan_dft<complexFT, complexFT>( std::vector<int> n,
577  complexFT * in,
578  complexFT * out,
579  int sign,
580  unsigned flags
581  );
582 
583 
584 template<>
585 fftwTypeSpec<float, complexFT>::planT fftw_plan_dft<float, complexFT>( std::vector<int> n,
586  float * in,
587  complexFT * out,
588  int sign,
589  unsigned flags
590  );
591 
592 template<>
593 fftwTypeSpec<complexFT, float>::planT fftw_plan_dft<complexFT, float>( std::vector<int> n,
594  complexFT * in,
595  float * out,
596  int sign,
597  unsigned flags
598  );
599 
600 template<>
601 fftwTypeSpec<complexDT, complexDT>::planT fftw_plan_dft<complexDT, complexDT>( std::vector<int> n,
602  complexDT * in,
603  complexDT * out,
604  int sign,
605  unsigned flags
606  );
607 
608 template<>
609 fftwTypeSpec<double, complexDT>::planT fftw_plan_dft<double, complexDT>( std::vector<int> n,
610  double * in,
611  complexDT * out,
612  int sign,
613  unsigned flags
614  );
615 
616 template<>
617 fftwTypeSpec<complexDT, double>::planT fftw_plan_dft<complexDT, double>( std::vector<int> n,
618  complexDT * in,
619  double * out,
620  int sign,
621  unsigned flags
622  );
623 
624 template<>
625 fftwTypeSpec<complexLT, complexLT>::planT fftw_plan_dft<complexLT, complexLT>( std::vector<int> n,
626  complexLT * in,
627  complexLT * out,
628  int sign,
629  unsigned flags
630  );
631 
632 template<>
633 fftwTypeSpec<long double, complexLT>::planT fftw_plan_dft<long double, complexLT>( std::vector<int> n,
634  long double * in,
635  complexLT * out,
636  int sign,
637  unsigned flags
638  );
639 
640 template<>
641 fftwTypeSpec<complexLT, long double>::planT fftw_plan_dft<complexLT, long double>( std::vector<int> n,
642  complexLT * in,
643  long double * out,
644  int sign,
645  unsigned flags
646  );
647 
648 #ifdef HASQUAD
649 template<>
650 fftwTypeSpec<complexQT, complexQT>::planT fftw_plan_dft<complexQT, complexQT>( std::vector<int> n,
651  complexQT * in,
652  complexQT * out,
653  int sign,
654  unsigned flags
655  );
656 
657 template<>
658 fftwTypeSpec<__float128, complexQT>::planT fftw_plan_dft<__float128, complexQT>( std::vector<int> n,
659  __float128 * in,
660  complexQT * out,
661  int sign,
662  unsigned flags
663  );
664 
665 template<>
666 fftwTypeSpec<complexQT, __float128>::planT fftw_plan_dft<complexQT, __float128>( std::vector<int> n,
667  complexQT * in,
668  __float128 * out,
669  int sign,
670  unsigned flags
671  );
672 #endif
673 
674 /********* Cleanup *************/
675 
676 ///Cleanup persistent planner data.
677 template<typename realT>
679 
680 template<>
681 void fftw_cleanup<float>();
682 
683 template<>
684 void fftw_cleanup<double>();
685 
686 template<>
687 void fftw_cleanup<long double>();
688 
689 #ifdef HASQUAD
690 template<>
691 void fftw_cleanup<__float128>();
692 #endif
693 
694 /********* Thread Cleanup *************/
695 
696 ///Cleanup persistent planner data and threads data.
697 template<typename realT>
699 
700 template<>
701 void fftw_cleanup_threads<float>();
702 
703 template<>
704 void fftw_cleanup_threads<double>();
705 
706 template<>
707 void fftw_cleanup_threads<long double>();
708 
709 #ifdef HASQUAD
710 template<>
711 void fftw_cleanup_threads<__float128>();
712 #endif
713 
714 ///@} fftw_template_plans
715 
716 
717 /** \defgroup fftw_template_exec Execution
718  * \brief Wrappers for executing with fftw plans.
719  *
720  * \ingroup fftw_templates
721  *
722  * @{
723  */
724 
725 //********* Plan Execution *************//
726 
727 /// Execute the given plan on the given arrays
728 /**
729  * \param plan the pre-planned plan
730  * \param in the input data array
731  * \param out the output data array
732  *
733  * \tparam inputDataT the data type of the input array
734  * \tparam outputDataT the data type of the output array
735  */
736 template<typename inputDataT, typename outputDataT>
738  inputDataT * in,
739  outputDataT * out
740  );
741 
742 template<>
743 void fftw_execute_dft<complexFT,complexFT>( fftwTypeSpec<complexFT, complexFT>::planT plan,
744  complexFT * in,
745  complexFT * out
746  );
747 
748 template<>
749 void fftw_execute_dft<float,complexFT>( fftwTypeSpec<float, complexFT>::planT plan,
750  float * in,
751  complexFT * out
752  );
753 
754 template<>
755 void fftw_execute_dft<complexFT,float>( fftwTypeSpec<complexFT,float>::planT plan,
756  complexFT * in,
757  float * out
758  );
759 
760 template<>
761 void fftw_execute_dft<complexDT,complexDT>( fftwTypeSpec<complexDT, complexDT>::planT plan,
762  complexDT * in,
763  complexDT * out
764  );
765 
766 template<>
767 void fftw_execute_dft<double,complexDT>( fftwTypeSpec<double, complexDT>::planT plan,
768  double * in,
769  complexDT * out
770  );
771 
772 template<>
773 void fftw_execute_dft<complexDT, double>( fftwTypeSpec<complexDT,double>::planT plan,
774  complexDT * in,
775  double * out
776  );
777 
778 //****** Plan Destruction *********//
779 
780 /// Destroy the given plan
781 /**
782  * \param plan is the plan to destroy
783  *
784  * \tparam realT is the real floating point type of the plan
785  */
786 template<typename realT>
788 
789 template<>
790 void fftw_destroy_plan<float>( fftwPlanSpec<float>::planT plan );
791 
792 template<>
793 void fftw_destroy_plan<double>( fftwPlanSpec<double>::planT plan );
794 
795 
796 template<>
797 void fftw_destroy_plan<long double>( fftwPlanSpec<long double>::planT plan );
798 
799 #ifdef HASQUAD
800 template<>
801 void fftw_destroy_plan<__float128>( fftwPlanSpec<__float128>::planT plan );
802 #endif
803 
804 ///@} fftw_template_exec
805 
806 }//namespace fft
807 }//namespace math
808 }//namespace mx
809 
810 #endif // fftwTemplates_hpp
811 
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.
Definition: sign.hpp:30
The mxlib c++ namespace.
Definition: mxError.hpp:107
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.
complexFT outputDataT
The output array data type.
fftwPlanSpec< float >::planT planT
The plan type.
complexFT inputDataT
The input array data type.
complexFT complexT
The complex data type.
float inputDataT
The input array data type.
fftwPlanSpec< float >::planT planT
The plan type.
complexFT outputDataT
The output array 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).