annotate src/fftw-3.3.8/api/fftw3.h @ 169:223a55898ab9 tip default

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