fftw3.h 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  1. /*
  2. * Copyright (c) 2003, 2007-14 Matteo Frigo
  3. * Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
  4. *
  5. * The following statement of license applies *only* to this header file,
  6. * and *not* to the other files distributed with FFTW or derived therefrom:
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions
  10. * are met:
  11. *
  12. * 1. Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. *
  15. * 2. Redistributions in binary form must reproduce the above copyright
  16. * notice, this list of conditions and the following disclaimer in the
  17. * documentation and/or other materials provided with the distribution.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
  20. * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  21. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  22. * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  23. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  24. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  25. * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  26. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  27. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  28. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  29. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30. */
  31. /***************************** NOTE TO USERS *********************************
  32. *
  33. * THIS IS A HEADER FILE, NOT A MANUAL
  34. *
  35. * If you want to know how to use FFTW, please read the manual,
  36. * online at http://www.fftw.org/doc/ and also included with FFTW.
  37. * For a quick start, see the manual's tutorial section.
  38. *
  39. * (Reading header files to learn how to use a library is a habit
  40. * stemming from code lacking a proper manual. Arguably, it's a
  41. * *bad* habit in most cases, because header files can contain
  42. * interfaces that are not part of the public, stable API.)
  43. *
  44. ****************************************************************************/
  45. #ifndef FFTW3_H
  46. #define FFTW3_H
  47. #include <stdio.h>
  48. #ifdef __cplusplus
  49. extern "C"
  50. {
  51. #endif /* __cplusplus */
  52. /* If <complex.h> is included, use the C99 complex type. Otherwise
  53. define a type bit-compatible with C99 complex */
  54. #if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I)
  55. # define FFTW_DEFINE_COMPLEX(R, C) typedef R _Complex C
  56. #else
  57. # define FFTW_DEFINE_COMPLEX(R, C) typedef R C[2]
  58. #endif
  59. #define FFTW_CONCAT(prefix, name) prefix ## name
  60. #define FFTW_MANGLE_DOUBLE(name) FFTW_CONCAT(fftw_, name)
  61. #define FFTW_MANGLE_FLOAT(name) FFTW_CONCAT(fftwf_, name)
  62. #define FFTW_MANGLE_LONG_DOUBLE(name) FFTW_CONCAT(fftwl_, name)
  63. #define FFTW_MANGLE_QUAD(name) FFTW_CONCAT(fftwq_, name)
  64. /* IMPORTANT: for Windows compilers, you should add a line
  65. #define FFTW_DLL
  66. here and in kernel/ifftw.h if you are compiling/using FFTW as a
  67. DLL, in order to do the proper importing/exporting, or
  68. alternatively compile with -DFFTW_DLL or the equivalent
  69. command-line flag. This is not necessary under MinGW/Cygwin, where
  70. libtool does the imports/exports automatically. */
  71. #if defined(FFTW_DLL) && (defined(_WIN32) || defined(__WIN32__))
  72. /* annoying Windows syntax for shared-library declarations */
  73. # if defined(COMPILING_FFTW) /* defined in api.h when compiling FFTW */
  74. # define FFTW_EXTERN extern __declspec(dllexport)
  75. # else /* user is calling FFTW; import symbol */
  76. # define FFTW_EXTERN extern __declspec(dllimport)
  77. # endif
  78. #else
  79. # define FFTW_EXTERN extern
  80. #endif
  81. /* specify calling convention (Windows only) */
  82. #if defined(_WIN32) || defined(__WIN32__)
  83. # define FFTW_CDECL __cdecl
  84. #else
  85. # define FFTW_CDECL
  86. #endif
  87. enum fftw_r2r_kind_do_not_use_me {
  88. FFTW_R2HC=0, FFTW_HC2R=1, FFTW_DHT=2,
  89. FFTW_REDFT00=3, FFTW_REDFT01=4, FFTW_REDFT10=5, FFTW_REDFT11=6,
  90. FFTW_RODFT00=7, FFTW_RODFT01=8, FFTW_RODFT10=9, FFTW_RODFT11=10
  91. };
  92. struct fftw_iodim_do_not_use_me {
  93. int n; /* dimension size */
  94. int is; /* input stride */
  95. int os; /* output stride */
  96. };
  97. #include <stddef.h> /* for ptrdiff_t */
  98. struct fftw_iodim64_do_not_use_me {
  99. ptrdiff_t n; /* dimension size */
  100. ptrdiff_t is; /* input stride */
  101. ptrdiff_t os; /* output stride */
  102. };
  103. typedef void (FFTW_CDECL *fftw_write_char_func_do_not_use_me)(char c, void *);
  104. typedef int (FFTW_CDECL *fftw_read_char_func_do_not_use_me)(void *);
  105. /*
  106. huge second-order macro that defines prototypes for all API
  107. functions. We expand this macro for each supported precision
  108. X: name-mangling macro
  109. R: real data type
  110. C: complex data type
  111. */
  112. #define FFTW_DEFINE_API(X, R, C) \
  113. \
  114. FFTW_DEFINE_COMPLEX(R, C); \
  115. \
  116. typedef struct X(plan_s) *X(plan); \
  117. \
  118. typedef struct fftw_iodim_do_not_use_me X(iodim); \
  119. typedef struct fftw_iodim64_do_not_use_me X(iodim64); \
  120. \
  121. typedef enum fftw_r2r_kind_do_not_use_me X(r2r_kind); \
  122. \
  123. typedef fftw_write_char_func_do_not_use_me X(write_char_func); \
  124. typedef fftw_read_char_func_do_not_use_me X(read_char_func); \
  125. \
  126. FFTW_EXTERN void \
  127. FFTW_CDECL X(execute)(const X(plan) p); \
  128. \
  129. FFTW_EXTERN X(plan) \
  130. FFTW_CDECL X(plan_dft)(int rank, const int *n, \
  131. C *in, C *out, int sign, unsigned flags); \
  132. \
  133. FFTW_EXTERN X(plan) \
  134. FFTW_CDECL X(plan_dft_1d)(int n, C *in, C *out, int sign, \
  135. unsigned flags); \
  136. FFTW_EXTERN X(plan) \
  137. FFTW_CDECL X(plan_dft_2d)(int n0, int n1, \
  138. C *in, C *out, int sign, unsigned flags); \
  139. FFTW_EXTERN X(plan) \
  140. FFTW_CDECL X(plan_dft_3d)(int n0, int n1, int n2, \
  141. C *in, C *out, int sign, unsigned flags); \
  142. \
  143. FFTW_EXTERN X(plan) \
  144. FFTW_CDECL X(plan_many_dft)(int rank, const int *n, \
  145. int howmany, \
  146. C *in, const int *inembed, \
  147. int istride, int idist, \
  148. C *out, const int *onembed, \
  149. int ostride, int odist, \
  150. int sign, unsigned flags); \
  151. \
  152. FFTW_EXTERN X(plan) \
  153. FFTW_CDECL X(plan_guru_dft)(int rank, const X(iodim) *dims, \
  154. int howmany_rank, \
  155. const X(iodim) *howmany_dims, \
  156. C *in, C *out, \
  157. int sign, unsigned flags); \
  158. FFTW_EXTERN X(plan) \
  159. FFTW_CDECL X(plan_guru_split_dft)(int rank, const X(iodim) *dims, \
  160. int howmany_rank, \
  161. const X(iodim) *howmany_dims, \
  162. R *ri, R *ii, R *ro, R *io, \
  163. unsigned flags); \
  164. \
  165. FFTW_EXTERN X(plan) \
  166. FFTW_CDECL X(plan_guru64_dft)(int rank, \
  167. const X(iodim64) *dims, \
  168. int howmany_rank, \
  169. const X(iodim64) *howmany_dims, \
  170. C *in, C *out, \
  171. int sign, unsigned flags); \
  172. FFTW_EXTERN X(plan) \
  173. FFTW_CDECL X(plan_guru64_split_dft)(int rank, \
  174. const X(iodim64) *dims, \
  175. int howmany_rank, \
  176. const X(iodim64) *howmany_dims, \
  177. R *ri, R *ii, R *ro, R *io, \
  178. unsigned flags); \
  179. \
  180. FFTW_EXTERN void \
  181. FFTW_CDECL X(execute_dft)(const X(plan) p, C *in, C *out); \
  182. \
  183. FFTW_EXTERN void \
  184. FFTW_CDECL X(execute_split_dft)(const X(plan) p, R *ri, R *ii, \
  185. R *ro, R *io); \
  186. \
  187. FFTW_EXTERN X(plan) \
  188. FFTW_CDECL X(plan_many_dft_r2c)(int rank, const int *n, \
  189. int howmany, \
  190. R *in, const int *inembed, \
  191. int istride, int idist, \
  192. C *out, const int *onembed, \
  193. int ostride, int odist, \
  194. unsigned flags); \
  195. \
  196. FFTW_EXTERN X(plan) \
  197. FFTW_CDECL X(plan_dft_r2c)(int rank, const int *n, \
  198. R *in, C *out, unsigned flags); \
  199. \
  200. FFTW_EXTERN X(plan) \
  201. FFTW_CDECL X(plan_dft_r2c_1d)(int n,R *in,C *out,unsigned flags); \
  202. \
  203. FFTW_EXTERN X(plan) \
  204. FFTW_CDECL X(plan_dft_r2c_2d)(int n0, int n1, \
  205. R *in, C *out, unsigned flags); \
  206. \
  207. FFTW_EXTERN X(plan) \
  208. FFTW_CDECL X(plan_dft_r2c_3d)(int n0, int n1, \
  209. int n2, \
  210. R *in, C *out, unsigned flags); \
  211. \
  212. FFTW_EXTERN X(plan) \
  213. FFTW_CDECL X(plan_many_dft_c2r)(int rank, const int *n, \
  214. int howmany, \
  215. C *in, const int *inembed, \
  216. int istride, int idist, \
  217. R *out, const int *onembed, \
  218. int ostride, int odist, \
  219. unsigned flags); \
  220. \
  221. FFTW_EXTERN X(plan) \
  222. FFTW_CDECL X(plan_dft_c2r)(int rank, const int *n, \
  223. C *in, R *out, unsigned flags); \
  224. \
  225. FFTW_EXTERN X(plan) \
  226. FFTW_CDECL X(plan_dft_c2r_1d)(int n,C *in,R *out,unsigned flags); \
  227. \
  228. FFTW_EXTERN X(plan) \
  229. FFTW_CDECL X(plan_dft_c2r_2d)(int n0, int n1, \
  230. C *in, R *out, unsigned flags); \
  231. \
  232. FFTW_EXTERN X(plan) \
  233. FFTW_CDECL X(plan_dft_c2r_3d)(int n0, int n1, \
  234. int n2, \
  235. C *in, R *out, unsigned flags); \
  236. \
  237. FFTW_EXTERN X(plan) \
  238. FFTW_CDECL X(plan_guru_dft_r2c)(int rank, const X(iodim) *dims, \
  239. int howmany_rank, \
  240. const X(iodim) *howmany_dims, \
  241. R *in, C *out, \
  242. unsigned flags); \
  243. \
  244. FFTW_EXTERN X(plan) \
  245. FFTW_CDECL X(plan_guru_dft_c2r)(int rank, const X(iodim) *dims, \
  246. int howmany_rank, \
  247. const X(iodim) *howmany_dims, \
  248. C *in, R *out, \
  249. unsigned flags); \
  250. \
  251. FFTW_EXTERN X(plan) \
  252. FFTW_CDECL X(plan_guru_split_dft_r2c)(int rank, const X(iodim) *dims, \
  253. int howmany_rank, \
  254. const X(iodim) *howmany_dims, \
  255. R *in, R *ro, R *io, \
  256. unsigned flags); \
  257. \
  258. FFTW_EXTERN X(plan) \
  259. FFTW_CDECL X(plan_guru_split_dft_c2r)(int rank, const X(iodim) *dims, \
  260. int howmany_rank, \
  261. const X(iodim) *howmany_dims, \
  262. R *ri, R *ii, R *out, \
  263. unsigned flags); \
  264. \
  265. FFTW_EXTERN X(plan) \
  266. FFTW_CDECL X(plan_guru64_dft_r2c)(int rank, \
  267. const X(iodim64) *dims, \
  268. int howmany_rank, \
  269. const X(iodim64) *howmany_dims, \
  270. R *in, C *out, \
  271. unsigned flags); \
  272. \
  273. FFTW_EXTERN X(plan) \
  274. FFTW_CDECL X(plan_guru64_dft_c2r)(int rank, \
  275. const X(iodim64) *dims, \
  276. int howmany_rank, \
  277. const X(iodim64) *howmany_dims, \
  278. C *in, R *out, \
  279. unsigned flags); \
  280. \
  281. FFTW_EXTERN X(plan) \
  282. FFTW_CDECL X(plan_guru64_split_dft_r2c)(int rank, const X(iodim64) *dims, \
  283. int howmany_rank, \
  284. const X(iodim64) *howmany_dims, \
  285. R *in, R *ro, R *io, \
  286. unsigned flags); \
  287. FFTW_EXTERN X(plan) \
  288. FFTW_CDECL X(plan_guru64_split_dft_c2r)(int rank, const X(iodim64) *dims, \
  289. int howmany_rank, \
  290. const X(iodim64) *howmany_dims, \
  291. R *ri, R *ii, R *out, \
  292. unsigned flags); \
  293. \
  294. FFTW_EXTERN void \
  295. FFTW_CDECL X(execute_dft_r2c)(const X(plan) p, R *in, C *out); \
  296. \
  297. FFTW_EXTERN void \
  298. FFTW_CDECL X(execute_dft_c2r)(const X(plan) p, C *in, R *out); \
  299. \
  300. FFTW_EXTERN void \
  301. FFTW_CDECL X(execute_split_dft_r2c)(const X(plan) p, \
  302. R *in, R *ro, R *io); \
  303. \
  304. FFTW_EXTERN void \
  305. FFTW_CDECL X(execute_split_dft_c2r)(const X(plan) p, \
  306. R *ri, R *ii, R *out); \
  307. \
  308. FFTW_EXTERN X(plan) \
  309. FFTW_CDECL X(plan_many_r2r)(int rank, const int *n, \
  310. int howmany, \
  311. R *in, const int *inembed, \
  312. int istride, int idist, \
  313. R *out, const int *onembed, \
  314. int ostride, int odist, \
  315. const X(r2r_kind) *kind, unsigned flags); \
  316. \
  317. FFTW_EXTERN X(plan) \
  318. FFTW_CDECL X(plan_r2r)(int rank, const int *n, R *in, R *out, \
  319. const X(r2r_kind) *kind, unsigned flags); \
  320. \
  321. FFTW_EXTERN X(plan) \
  322. FFTW_CDECL X(plan_r2r_1d)(int n, R *in, R *out, \
  323. X(r2r_kind) kind, unsigned flags); \
  324. \
  325. FFTW_EXTERN X(plan) \
  326. FFTW_CDECL X(plan_r2r_2d)(int n0, int n1, R *in, R *out, \
  327. X(r2r_kind) kind0, X(r2r_kind) kind1, \
  328. unsigned flags); \
  329. \
  330. FFTW_EXTERN X(plan) \
  331. FFTW_CDECL X(plan_r2r_3d)(int n0, int n1, int n2, \
  332. R *in, R *out, X(r2r_kind) kind0, \
  333. X(r2r_kind) kind1, X(r2r_kind) kind2, \
  334. unsigned flags); \
  335. \
  336. FFTW_EXTERN X(plan) \
  337. FFTW_CDECL X(plan_guru_r2r)(int rank, const X(iodim) *dims, \
  338. int howmany_rank, \
  339. const X(iodim) *howmany_dims, \
  340. R *in, R *out, \
  341. const X(r2r_kind) *kind, unsigned flags); \
  342. \
  343. FFTW_EXTERN X(plan) \
  344. FFTW_CDECL X(plan_guru64_r2r)(int rank, const X(iodim64) *dims, \
  345. int howmany_rank, \
  346. const X(iodim64) *howmany_dims, \
  347. R *in, R *out, \
  348. const X(r2r_kind) *kind, unsigned flags); \
  349. \
  350. FFTW_EXTERN void \
  351. FFTW_CDECL X(execute_r2r)(const X(plan) p, R *in, R *out); \
  352. \
  353. FFTW_EXTERN void \
  354. FFTW_CDECL X(destroy_plan)(X(plan) p); \
  355. \
  356. FFTW_EXTERN void \
  357. FFTW_CDECL X(forget_wisdom)(void); \
  358. FFTW_EXTERN void \
  359. FFTW_CDECL X(cleanup)(void); \
  360. \
  361. FFTW_EXTERN void \
  362. FFTW_CDECL X(set_timelimit)(double t); \
  363. \
  364. FFTW_EXTERN void \
  365. FFTW_CDECL X(plan_with_nthreads)(int nthreads); \
  366. \
  367. FFTW_EXTERN int \
  368. FFTW_CDECL X(planner_nthreads)(void); \
  369. \
  370. FFTW_EXTERN int \
  371. FFTW_CDECL X(init_threads)(void); \
  372. \
  373. FFTW_EXTERN void \
  374. FFTW_CDECL X(cleanup_threads)(void); \
  375. \
  376. FFTW_EXTERN void \
  377. FFTW_CDECL X(threads_set_callback)( \
  378. void (*parallel_loop)(void *(*work)(char *), \
  379. char *jobdata, size_t elsize, int njobs, void *data), void *data); \
  380. \
  381. FFTW_EXTERN void \
  382. FFTW_CDECL X(make_planner_thread_safe)(void); \
  383. \
  384. FFTW_EXTERN int \
  385. FFTW_CDECL X(export_wisdom_to_filename)(const char *filename); \
  386. \
  387. FFTW_EXTERN void \
  388. FFTW_CDECL X(export_wisdom_to_file)(FILE *output_file); \
  389. \
  390. FFTW_EXTERN char * \
  391. FFTW_CDECL X(export_wisdom_to_string)(void); \
  392. \
  393. FFTW_EXTERN void \
  394. FFTW_CDECL X(export_wisdom)(X(write_char_func) write_char, \
  395. void *data); \
  396. FFTW_EXTERN int \
  397. FFTW_CDECL X(import_system_wisdom)(void); \
  398. \
  399. FFTW_EXTERN int \
  400. FFTW_CDECL X(import_wisdom_from_filename)(const char *filename); \
  401. \
  402. FFTW_EXTERN int \
  403. FFTW_CDECL X(import_wisdom_from_file)(FILE *input_file); \
  404. \
  405. FFTW_EXTERN int \
  406. FFTW_CDECL X(import_wisdom_from_string)(const char *input_string); \
  407. \
  408. FFTW_EXTERN int \
  409. FFTW_CDECL X(import_wisdom)(X(read_char_func) read_char, void *data); \
  410. \
  411. FFTW_EXTERN void \
  412. FFTW_CDECL X(fprint_plan)(const X(plan) p, FILE *output_file); \
  413. \
  414. FFTW_EXTERN void \
  415. FFTW_CDECL X(print_plan)(const X(plan) p); \
  416. \
  417. FFTW_EXTERN char * \
  418. FFTW_CDECL X(sprint_plan)(const X(plan) p); \
  419. \
  420. FFTW_EXTERN void * \
  421. FFTW_CDECL X(malloc)(size_t n); \
  422. \
  423. FFTW_EXTERN R * \
  424. FFTW_CDECL X(alloc_real)(size_t n); \
  425. FFTW_EXTERN C * \
  426. FFTW_CDECL X(alloc_complex)(size_t n); \
  427. \
  428. FFTW_EXTERN void \
  429. FFTW_CDECL X(free)(void *p); \
  430. \
  431. FFTW_EXTERN void \
  432. FFTW_CDECL X(flops)(const X(plan) p, \
  433. double *add, double *mul, double *fmas); \
  434. FFTW_EXTERN double \
  435. FFTW_CDECL X(estimate_cost)(const X(plan) p); \
  436. \
  437. FFTW_EXTERN double \
  438. FFTW_CDECL X(cost)(const X(plan) p); \
  439. \
  440. FFTW_EXTERN int \
  441. FFTW_CDECL X(alignment_of)(R *p); \
  442. \
  443. FFTW_EXTERN const char X(version)[]; \
  444. FFTW_EXTERN const char X(cc)[]; \
  445. FFTW_EXTERN const char X(codelet_optim)[];
  446. /* end of FFTW_DEFINE_API macro */
  447. FFTW_DEFINE_API(FFTW_MANGLE_DOUBLE, double, fftw_complex)
  448. FFTW_DEFINE_API(FFTW_MANGLE_FLOAT, float, fftwf_complex)
  449. FFTW_DEFINE_API(FFTW_MANGLE_LONG_DOUBLE, long double, fftwl_complex)
  450. /* __float128 (quad precision) is a gcc extension on i386, x86_64, and ia64
  451. for gcc >= 4.6 (compiled in FFTW with --enable-quad-precision) */
  452. #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) \
  453. && !(defined(__ICC) || defined(__INTEL_COMPILER) || defined(__CUDACC__) || defined(__PGI)) \
  454. && (defined(__i386__) || defined(__x86_64__) || defined(__ia64__))
  455. # if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I)
  456. /* note: __float128 is a typedef, which is not supported with the _Complex
  457. keyword in gcc, so instead we use this ugly __attribute__ version.
  458. However, we can't simply pass the __attribute__ version to
  459. FFTW_DEFINE_API because the __attribute__ confuses gcc in pointer
  460. types. Hence redefining FFTW_DEFINE_COMPLEX. Ugh. */
  461. # undef FFTW_DEFINE_COMPLEX
  462. # define FFTW_DEFINE_COMPLEX(R, C) typedef _Complex float __attribute__((mode(TC))) C
  463. # endif
  464. FFTW_DEFINE_API(FFTW_MANGLE_QUAD, __float128, fftwq_complex)
  465. #endif
  466. #define FFTW_FORWARD (-1)
  467. #define FFTW_BACKWARD (+1)
  468. #define FFTW_NO_TIMELIMIT (-1.0)
  469. /* documented flags */
  470. #define FFTW_MEASURE (0U)
  471. #define FFTW_DESTROY_INPUT (1U << 0)
  472. #define FFTW_UNALIGNED (1U << 1)
  473. #define FFTW_CONSERVE_MEMORY (1U << 2)
  474. #define FFTW_EXHAUSTIVE (1U << 3) /* NO_EXHAUSTIVE is default */
  475. #define FFTW_PRESERVE_INPUT (1U << 4) /* cancels FFTW_DESTROY_INPUT */
  476. #define FFTW_PATIENT (1U << 5) /* IMPATIENT is default */
  477. #define FFTW_ESTIMATE (1U << 6)
  478. #define FFTW_WISDOM_ONLY (1U << 21)
  479. /* undocumented beyond-guru flags */
  480. #define FFTW_ESTIMATE_PATIENT (1U << 7)
  481. #define FFTW_BELIEVE_PCOST (1U << 8)
  482. #define FFTW_NO_DFT_R2HC (1U << 9)
  483. #define FFTW_NO_NONTHREADED (1U << 10)
  484. #define FFTW_NO_BUFFERING (1U << 11)
  485. #define FFTW_NO_INDIRECT_OP (1U << 12)
  486. #define FFTW_ALLOW_LARGE_GENERIC (1U << 13) /* NO_LARGE_GENERIC is default */
  487. #define FFTW_NO_RANK_SPLITS (1U << 14)
  488. #define FFTW_NO_VRANK_SPLITS (1U << 15)
  489. #define FFTW_NO_VRECURSE (1U << 16)
  490. #define FFTW_NO_SIMD (1U << 17)
  491. #define FFTW_NO_SLOW (1U << 18)
  492. #define FFTW_NO_FIXED_RADIX_LARGE_N (1U << 19)
  493. #define FFTW_ALLOW_PRUNING (1U << 20)
  494. #ifdef __cplusplus
  495. } /* extern "C" */
  496. #endif /* __cplusplus */
  497. #endif /* FFTW3_H */