59 #if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I) 60 # define FFTW_DEFINE_COMPLEX(R, C) typedef R _Complex C 62 # define FFTW_DEFINE_COMPLEX(R, C) typedef R C[2] 65 #define FFTW_CONCAT(prefix, name) prefix ## name 66 #define FFTW_MANGLE_DOUBLE(name) FFTW_CONCAT(fftw_, name) 67 #define FFTW_MANGLE_FLOAT(name) FFTW_CONCAT(fftwf_, name) 68 #define FFTW_MANGLE_LONG_DOUBLE(name) FFTW_CONCAT(fftwl_, name) 69 #define FFTW_MANGLE_QUAD(name) FFTW_CONCAT(fftwq_, name) 80 #if defined(FFTW_DLL) && (defined(_WIN32) || defined(__WIN32__)) 82 # if defined(COMPILING_FFTW) 83 # define FFTW_EXTERN extern __declspec(dllexport) 85 # define FFTW_EXTERN extern __declspec(dllimport) 88 # define FFTW_EXTERN extern 122 #define FFTW_DEFINE_API(X, R, C) \ 124 FFTW_DEFINE_COMPLEX(R, C); \ 126 typedef struct X(plan_s) *X(plan); \ 128 typedef struct fftw_iodim_do_not_use_me X(iodim); \ 129 typedef struct fftw_iodim64_do_not_use_me X(iodim64); \ 131 typedef enum fftw_r2r_kind_do_not_use_me X(r2r_kind); \ 133 typedef fftw_write_char_func_do_not_use_me X(write_char_func); \ 134 typedef fftw_read_char_func_do_not_use_me X(read_char_func); \ 136 FFTW_EXTERN void X(execute)(const X(plan) p); \ 138 FFTW_EXTERN X(plan) X(plan_dft)(int rank, const int *n, \ 139 C *in, C *out, int sign, unsigned flags); \ 141 FFTW_EXTERN X(plan) X(plan_dft_1d)(int n, C *in, C *out, int sign, \ 143 FFTW_EXTERN X(plan) X(plan_dft_2d)(int n0, int n1, \ 144 C *in, C *out, int sign, unsigned flags); \ 145 FFTW_EXTERN X(plan) X(plan_dft_3d)(int n0, int n1, int n2, \ 146 C *in, C *out, int sign, unsigned flags); \ 148 FFTW_EXTERN X(plan) X(plan_many_dft)(int rank, const int *n, \ 150 C *in, const int *inembed, \ 151 int istride, int idist, \ 152 C *out, const int *onembed, \ 153 int ostride, int odist, \ 154 int sign, unsigned flags); \ 156 FFTW_EXTERN X(plan) X(plan_guru_dft)(int rank, const X(iodim) *dims, \ 158 const X(iodim) *howmany_dims, \ 160 int sign, unsigned flags); \ 161 FFTW_EXTERN X(plan) X(plan_guru_split_dft)(int rank, const X(iodim) *dims, \ 163 const X(iodim) *howmany_dims, \ 164 R *ri, R *ii, R *ro, R *io, \ 167 FFTW_EXTERN X(plan) X(plan_guru64_dft)(int rank, \ 168 const X(iodim64) *dims, \ 170 const X(iodim64) *howmany_dims, \ 172 int sign, unsigned flags); \ 173 FFTW_EXTERN X(plan) X(plan_guru64_split_dft)(int rank, \ 174 const X(iodim64) *dims, \ 176 const X(iodim64) *howmany_dims, \ 177 R *ri, R *ii, R *ro, R *io, \ 180 FFTW_EXTERN void X(execute_dft)(const X(plan) p, C *in, C *out); \ 181 FFTW_EXTERN void X(execute_split_dft)(const X(plan) p, R *ri, R *ii, \ 184 FFTW_EXTERN X(plan) X(plan_many_dft_r2c)(int rank, const int *n, \ 186 R *in, const int *inembed, \ 187 int istride, int idist, \ 188 C *out, const int *onembed, \ 189 int ostride, int odist, \ 192 FFTW_EXTERN X(plan) X(plan_dft_r2c)(int rank, const int *n, \ 193 R *in, C *out, unsigned flags); \ 195 FFTW_EXTERN X(plan) X(plan_dft_r2c_1d)(int n,R *in,C *out,unsigned flags); \ 196 FFTW_EXTERN X(plan) X(plan_dft_r2c_2d)(int n0, int n1, \ 197 R *in, C *out, unsigned flags); \ 198 FFTW_EXTERN X(plan) X(plan_dft_r2c_3d)(int n0, int n1, \ 200 R *in, C *out, unsigned flags); \ 203 FFTW_EXTERN X(plan) X(plan_many_dft_c2r)(int rank, const int *n, \ 205 C *in, const int *inembed, \ 206 int istride, int idist, \ 207 R *out, const int *onembed, \ 208 int ostride, int odist, \ 211 FFTW_EXTERN X(plan) X(plan_dft_c2r)(int rank, const int *n, \ 212 C *in, R *out, unsigned flags); \ 214 FFTW_EXTERN X(plan) X(plan_dft_c2r_1d)(int n,C *in,R *out,unsigned flags); \ 215 FFTW_EXTERN X(plan) X(plan_dft_c2r_2d)(int n0, int n1, \ 216 C *in, R *out, unsigned flags); \ 217 FFTW_EXTERN X(plan) X(plan_dft_c2r_3d)(int n0, int n1, \ 219 C *in, R *out, unsigned flags); \ 221 FFTW_EXTERN X(plan) X(plan_guru_dft_r2c)(int rank, const X(iodim) *dims, \ 223 const X(iodim) *howmany_dims, \ 226 FFTW_EXTERN X(plan) X(plan_guru_dft_c2r)(int rank, const X(iodim) *dims, \ 228 const X(iodim) *howmany_dims, \ 232 FFTW_EXTERN X(plan) X(plan_guru_split_dft_r2c)( \ 233 int rank, const X(iodim) *dims, \ 235 const X(iodim) *howmany_dims, \ 236 R *in, R *ro, R *io, \ 238 FFTW_EXTERN X(plan) X(plan_guru_split_dft_c2r)( \ 239 int rank, const X(iodim) *dims, \ 241 const X(iodim) *howmany_dims, \ 242 R *ri, R *ii, R *out, \ 245 FFTW_EXTERN X(plan) X(plan_guru64_dft_r2c)(int rank, \ 246 const X(iodim64) *dims, \ 248 const X(iodim64) *howmany_dims, \ 251 FFTW_EXTERN X(plan) X(plan_guru64_dft_c2r)(int rank, \ 252 const X(iodim64) *dims, \ 254 const X(iodim64) *howmany_dims, \ 258 FFTW_EXTERN X(plan) X(plan_guru64_split_dft_r2c)( \ 259 int rank, const X(iodim64) *dims, \ 261 const X(iodim64) *howmany_dims, \ 262 R *in, R *ro, R *io, \ 264 FFTW_EXTERN X(plan) X(plan_guru64_split_dft_c2r)( \ 265 int rank, const X(iodim64) *dims, \ 267 const X(iodim64) *howmany_dims, \ 268 R *ri, R *ii, R *out, \ 271 FFTW_EXTERN void X(execute_dft_r2c)(const X(plan) p, R *in, C *out); \ 272 FFTW_EXTERN void X(execute_dft_c2r)(const X(plan) p, C *in, R *out); \ 274 FFTW_EXTERN void X(execute_split_dft_r2c)(const X(plan) p, \ 275 R *in, R *ro, R *io); \ 276 FFTW_EXTERN void X(execute_split_dft_c2r)(const X(plan) p, \ 277 R *ri, R *ii, R *out); \ 279 FFTW_EXTERN X(plan) X(plan_many_r2r)(int rank, const int *n, \ 281 R *in, const int *inembed, \ 282 int istride, int idist, \ 283 R *out, const int *onembed, \ 284 int ostride, int odist, \ 285 const X(r2r_kind) *kind, unsigned flags); \ 287 FFTW_EXTERN X(plan) X(plan_r2r)(int rank, const int *n, R *in, R *out, \ 288 const X(r2r_kind) *kind, unsigned flags); \ 290 FFTW_EXTERN X(plan) X(plan_r2r_1d)(int n, R *in, R *out, \ 291 X(r2r_kind) kind, unsigned flags); \ 292 FFTW_EXTERN X(plan) X(plan_r2r_2d)(int n0, int n1, R *in, R *out, \ 293 X(r2r_kind) kind0, X(r2r_kind) kind1, \ 295 FFTW_EXTERN X(plan) X(plan_r2r_3d)(int n0, int n1, int n2, \ 296 R *in, R *out, X(r2r_kind) kind0, \ 297 X(r2r_kind) kind1, X(r2r_kind) kind2, \ 300 FFTW_EXTERN X(plan) X(plan_guru_r2r)(int rank, const X(iodim) *dims, \ 302 const X(iodim) *howmany_dims, \ 304 const X(r2r_kind) *kind, unsigned flags); \ 306 FFTW_EXTERN X(plan) X(plan_guru64_r2r)(int rank, const X(iodim64) *dims, \ 308 const X(iodim64) *howmany_dims, \ 310 const X(r2r_kind) *kind, unsigned flags); \ 312 FFTW_EXTERN void X(execute_r2r)(const X(plan) p, R *in, R *out); \ 314 FFTW_EXTERN void X(destroy_plan)(X(plan) p); \ 315 FFTW_EXTERN void X(forget_wisdom)(void); \ 316 FFTW_EXTERN void X(cleanup)(void); \ 318 FFTW_EXTERN void X(set_timelimit)(double t); \ 320 FFTW_EXTERN void X(plan_with_nthreads)(int nthreads); \ 321 FFTW_EXTERN int X(init_threads)(void); \ 322 FFTW_EXTERN void X(cleanup_threads)(void); \ 323 FFTW_EXTERN void X(make_planner_thread_safe)(void); \ 325 FFTW_EXTERN int X(export_wisdom_to_filename)(const char *filename); \ 326 FFTW_EXTERN void X(export_wisdom_to_file)(FILE *output_file); \ 327 FFTW_EXTERN char *X(export_wisdom_to_string)(void); \ 328 FFTW_EXTERN void X(export_wisdom)(X(write_char_func) write_char, \ 330 FFTW_EXTERN int X(import_system_wisdom)(void); \ 331 FFTW_EXTERN int X(import_wisdom_from_filename)(const char *filename); \ 332 FFTW_EXTERN int X(import_wisdom_from_file)(FILE *input_file); \ 333 FFTW_EXTERN int X(import_wisdom_from_string)(const char *input_string); \ 334 FFTW_EXTERN int X(import_wisdom)(X(read_char_func) read_char, void *data); \ 336 FFTW_EXTERN void X(fprint_plan)(const X(plan) p, FILE *output_file); \ 337 FFTW_EXTERN void X(print_plan)(const X(plan) p); \ 338 FFTW_EXTERN char *X(sprint_plan)(const X(plan) p); \ 340 FFTW_EXTERN void *X(malloc)(size_t n); \ 341 FFTW_EXTERN R *X(alloc_real)(size_t n); \ 342 FFTW_EXTERN C *X(alloc_complex)(size_t n); \ 343 FFTW_EXTERN void X(free)(void *p); \ 345 FFTW_EXTERN void X(flops)(const X(plan) p, \ 346 double *add, double *mul, double *fmas); \ 347 FFTW_EXTERN double X(estimate_cost)(const X(plan) p); \ 348 FFTW_EXTERN double X(cost)(const X(plan) p); \ 350 FFTW_EXTERN int X(alignment_of)(R *p); \ 351 FFTW_EXTERN const char X(version)[]; \ 352 FFTW_EXTERN const char X(cc)[]; \ 353 FFTW_EXTERN const char X(codelet_optim)[]; 364 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) \ 365 && !(defined(__ICC) || defined(__INTEL_COMPILER) || defined(__CUDACC__) || defined(__PGI)) \ 366 && (defined(__i386__) || defined(__x86_64__) || defined(__ia64__)) 367 # if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I) 373 # undef FFTW_DEFINE_COMPLEX 374 # define FFTW_DEFINE_COMPLEX(R, C) typedef _Complex float __attribute__((mode(TC))) C 379 #define FFTW_FORWARD (-1) 380 #define FFTW_BACKWARD (+1) 382 #define FFTW_NO_TIMELIMIT (-1.0) 385 #define FFTW_MEASURE (0U) 386 #define FFTW_DESTROY_INPUT (1U << 0) 387 #define FFTW_UNALIGNED (1U << 1) 388 #define FFTW_CONSERVE_MEMORY (1U << 2) 389 #define FFTW_EXHAUSTIVE (1U << 3) 390 #define FFTW_PRESERVE_INPUT (1U << 4) 391 #define FFTW_PATIENT (1U << 5) 392 #define FFTW_ESTIMATE (1U << 6) 393 #define FFTW_WISDOM_ONLY (1U << 21) 396 #define FFTW_ESTIMATE_PATIENT (1U << 7) 397 #define FFTW_BELIEVE_PCOST (1U << 8) 398 #define FFTW_NO_DFT_R2HC (1U << 9) 399 #define FFTW_NO_NONTHREADED (1U << 10) 400 #define FFTW_NO_BUFFERING (1U << 11) 401 #define FFTW_NO_INDIRECT_OP (1U << 12) 402 #define FFTW_ALLOW_LARGE_GENERIC (1U << 13) 403 #define FFTW_NO_RANK_SPLITS (1U << 14) 404 #define FFTW_NO_VRANK_SPLITS (1U << 15) 405 #define FFTW_NO_VRECURSE (1U << 16) 406 #define FFTW_NO_SIMD (1U << 17) 407 #define FFTW_NO_SLOW (1U << 18) 408 #define FFTW_NO_FIXED_RADIX_LARGE_N (1U << 19) 409 #define FFTW_ALLOW_PRUNING (1U << 20)
#define FFTW_MANGLE_FLOAT(name)
void(* fftw_write_char_func_do_not_use_me)(char c, void *)
int(* fftw_read_char_func_do_not_use_me)(void *)
#define FFTW_MANGLE_QUAD(name)
fftw_r2r_kind_do_not_use_me
#define FFTW_MANGLE_DOUBLE(name)
#define FFTW_DEFINE_API(X, R, C)
#define FFTW_MANGLE_LONG_DOUBLE(name)