fftw3.h   fftw3.h 
/* /*
* Copyright (c) 2003, 2007-8 Matteo Frigo * Copyright (c) 2003, 2007-11 Matteo Frigo
* Copyright (c) 2003, 2007-8 Massachusetts Institute of Technology * Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology
* *
* The following statement of license applies *only* to this header file, * The following statement of license applies *only* to this header file,
* and *not* to the other files distributed with FFTW or derived therefrom: * and *not* to the other files distributed with FFTW or derived therefrom:
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
* *
* 1. Redistributions of source code must retain the above copyright * 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
skipping to change at line 69 skipping to change at line 69
#if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I) #if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I)
# define FFTW_DEFINE_COMPLEX(R, C) typedef R _Complex C # define FFTW_DEFINE_COMPLEX(R, C) typedef R _Complex C
#else #else
# define FFTW_DEFINE_COMPLEX(R, C) typedef R C[2] # define FFTW_DEFINE_COMPLEX(R, C) typedef R C[2]
#endif #endif
#define FFTW_CONCAT(prefix, name) prefix ## name #define FFTW_CONCAT(prefix, name) prefix ## name
#define FFTW_MANGLE_DOUBLE(name) FFTW_CONCAT(fftw_, name) #define FFTW_MANGLE_DOUBLE(name) FFTW_CONCAT(fftw_, name)
#define FFTW_MANGLE_FLOAT(name) FFTW_CONCAT(fftwf_, name) #define FFTW_MANGLE_FLOAT(name) FFTW_CONCAT(fftwf_, name)
#define FFTW_MANGLE_LONG_DOUBLE(name) FFTW_CONCAT(fftwl_, name) #define FFTW_MANGLE_LONG_DOUBLE(name) FFTW_CONCAT(fftwl_, name)
#define FFTW_MANGLE_QUAD(name) FFTW_CONCAT(fftwq_, name)
/* IMPORTANT: for Windows compilers, you should add a line /* IMPORTANT: for Windows compilers, you should add a line
#define FFTW_DLL #define FFTW_DLL
here and in kernel/ifftw.h if you are compiling/using FFTW as a here and in kernel/ifftw.h if you are compiling/using FFTW as a
DLL, in order to do the proper importing/exporting, or DLL, in order to do the proper importing/exporting, or
alternatively compile with -DFFTW_DLL or the equivalent alternatively compile with -DFFTW_DLL or the equivalent
command-line flag. This is not necessary under MinGW/Cygwin, where command-line flag. This is not necessary under MinGW/Cygwin, where
libtool does the imports/exports automatically. */ libtool does the imports/exports automatically. */
#if defined(FFTW_DLL) && (defined(_WIN32) || defined(__WIN32__)) #if defined(FFTW_DLL) && (defined(_WIN32) || defined(__WIN32__))
/* annoying Windows syntax for shared-library declarations */ /* annoying Windows syntax for shared-library declarations */
skipping to change at line 107 skipping to change at line 108
int os; /* output stride */ int os; /* output stride */
}; };
#include <stddef.h> /* for ptrdiff_t */ #include <stddef.h> /* for ptrdiff_t */
struct fftw_iodim64_do_not_use_me { struct fftw_iodim64_do_not_use_me {
ptrdiff_t n; /* dimension size */ ptrdiff_t n; /* dimension size */
ptrdiff_t is; /* input stride */ ptrdiff_t is; /* input stride */
ptrdiff_t os; /* output stride */ ptrdiff_t os; /* output stride */
}; };
typedef void (*fftw_write_char_func_do_not_use_me)(char c, void *);
typedef int (*fftw_read_char_func_do_not_use_me)(void *);
/* /*
huge second-order macro that defines prototypes for all API huge second-order macro that defines prototypes for all API
functions. We expand this macro for each supported precision functions. We expand this macro for each supported precision
X: name-mangling macro X: name-mangling macro
R: real data type R: real data type
C: complex data type C: complex data type
*/ */
#define FFTW_DEFINE_API(X, R, C) \ #define FFTW_DEFINE_API(X, R, C) \
\ \
FFTW_DEFINE_COMPLEX(R, C); \ FFTW_DEFINE_COMPLEX(R, C); \
\ \
typedef struct X(plan_s) *X(plan); \ typedef struct X(plan_s) *X(plan); \
\ \
typedef struct fftw_iodim_do_not_use_me X(iodim); \ typedef struct fftw_iodim_do_not_use_me X(iodim); \
typedef struct fftw_iodim64_do_not_use_me X(iodim64); \ typedef struct fftw_iodim64_do_not_use_me X(iodim64); \
\ \
typedef enum fftw_r2r_kind_do_not_use_me X(r2r_kind); \ typedef enum fftw_r2r_kind_do_not_use_me X(r2r_kind); \
\ \
typedef fftw_write_char_func_do_not_use_me X(write_char_func); \
typedef fftw_read_char_func_do_not_use_me X(read_char_func); \
\
FFTW_EXTERN void X(execute)(const X(plan) p); \ FFTW_EXTERN void X(execute)(const X(plan) p); \
\ \
FFTW_EXTERN X(plan) X(plan_dft)(int rank, const int *n, \ FFTW_EXTERN X(plan) X(plan_dft)(int rank, const int *n, \
C *in, C *out, int sign, unsigned flags); \ C *in, C *out, int sign, unsigned flags); \
\ \
FFTW_EXTERN X(plan) X(plan_dft_1d)(int n, C *in, C *out, int sign, \ FFTW_EXTERN X(plan) X(plan_dft_1d)(int n, C *in, C *out, int sign, \
unsigned flags); \ unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_2d)(int n0, int n1, \ FFTW_EXTERN X(plan) X(plan_dft_2d)(int n0, int n1, \
C *in, C *out, int sign, unsigned flags); \ C *in, C *out, int sign, unsigned flags); \
FFTW_EXTERN X(plan) X(plan_dft_3d)(int n0, int n1, int n2, \ FFTW_EXTERN X(plan) X(plan_dft_3d)(int n0, int n1, int n2, \
skipping to change at line 309 skipping to change at line 316
const X(iodim64) *howmany_dims, \ const X(iodim64) *howmany_dims, \
R *in, R *out, \ R *in, R *out, \
const X(r2r_kind) *kind, unsigned flags); \ const X(r2r_kind) *kind, unsigned flags); \
\ \
FFTW_EXTERN void X(execute_r2r)(const X(plan) p, R *in, R *out); \ FFTW_EXTERN void X(execute_r2r)(const X(plan) p, R *in, R *out); \
\ \
FFTW_EXTERN void X(destroy_plan)(X(plan) p); \ FFTW_EXTERN void X(destroy_plan)(X(plan) p); \
FFTW_EXTERN void X(forget_wisdom)(void); \ FFTW_EXTERN void X(forget_wisdom)(void); \
FFTW_EXTERN void X(cleanup)(void); \ FFTW_EXTERN void X(cleanup)(void); \
\ \
FFTW_EXTERN void X(set_timelimit)(double); \ FFTW_EXTERN void X(set_timelimit)(double t); \
\ \
FFTW_EXTERN void X(plan_with_nthreads)(int nthreads); \ FFTW_EXTERN void X(plan_with_nthreads)(int nthreads); \
FFTW_EXTERN int X(init_threads)(void); \ FFTW_EXTERN int X(init_threads)(void); \
FFTW_EXTERN void X(cleanup_threads)(void); \ FFTW_EXTERN void X(cleanup_threads)(void); \
\ \
FFTW_EXTERN int X(export_wisdom_to_filename)(const char *filename); \
FFTW_EXTERN void X(export_wisdom_to_file)(FILE *output_file); \ FFTW_EXTERN void X(export_wisdom_to_file)(FILE *output_file); \
FFTW_EXTERN char *X(export_wisdom_to_string)(void); \ FFTW_EXTERN char *X(export_wisdom_to_string)(void); \
FFTW_EXTERN void X(export_wisdom)(void (*write_char)(char c, void *), \ FFTW_EXTERN void X(export_wisdom)(X(write_char_func) write_char, \
void *data); \ void *data); \
FFTW_EXTERN int X(import_system_wisdom)(void); \ FFTW_EXTERN int X(import_system_wisdom)(void); \
FFTW_EXTERN int X(import_wisdom_from_filename)(const char *filename); \
FFTW_EXTERN int X(import_wisdom_from_file)(FILE *input_file); \ FFTW_EXTERN int X(import_wisdom_from_file)(FILE *input_file); \
FFTW_EXTERN int X(import_wisdom_from_string)(const char *input_string); \ FFTW_EXTERN int X(import_wisdom_from_string)(const char *input_string); \
FFTW_EXTERN int X(import_wisdom)(int (*read_char)(void *), void *data); \ FFTW_EXTERN int X(import_wisdom)(X(read_char_func) read_char, void *data); \
\ \
FFTW_EXTERN void X(fprint_plan)(const X(plan) p, FILE *output_file); \ FFTW_EXTERN void X(fprint_plan)(const X(plan) p, FILE *output_file); \
FFTW_EXTERN void X(print_plan)(const X(plan) p); \ FFTW_EXTERN void X(print_plan)(const X(plan) p); \
\ \
FFTW_EXTERN void *X(malloc)(size_t n); \ FFTW_EXTERN void *X(malloc)(size_t n); \
FFTW_EXTERN R *X(alloc_real)(size_t n);
\
FFTW_EXTERN C *X(alloc_complex)(size_t n); \
FFTW_EXTERN void X(free)(void *p); \ FFTW_EXTERN void X(free)(void *p); \
\ \
FFTW_EXTERN void X(flops)(const X(plan) p, \ FFTW_EXTERN void X(flops)(const X(plan) p, \
double *add, double *mul, double *fmas); \ double *add, double *mul, double *fmas); \
FFTW_EXTERN double X(estimate_cost)(const X(plan) p); \ FFTW_EXTERN double X(estimate_cost)(const X(plan) p); \
FFTW_EXTERN double X(cost)(const X(plan) p); \
\ \
FFTW_EXTERN const char X(version)[]; \ FFTW_EXTERN const char X(version)[]; \
FFTW_EXTERN const char X(cc)[]; \ FFTW_EXTERN const char X(cc)[]; \
FFTW_EXTERN const char X(codelet_optim)[]; FFTW_EXTERN const char X(codelet_optim)[];
/* end of FFTW_DEFINE_API macro */ /* end of FFTW_DEFINE_API macro */
FFTW_DEFINE_API(FFTW_MANGLE_DOUBLE, double, fftw_complex) FFTW_DEFINE_API(FFTW_MANGLE_DOUBLE, double, fftw_complex)
FFTW_DEFINE_API(FFTW_MANGLE_FLOAT, float, fftwf_complex) FFTW_DEFINE_API(FFTW_MANGLE_FLOAT, float, fftwf_complex)
FFTW_DEFINE_API(FFTW_MANGLE_LONG_DOUBLE, long double, fftwl_complex) FFTW_DEFINE_API(FFTW_MANGLE_LONG_DOUBLE, long double, fftwl_complex)
/* __float128 (quad precision) is a gcc extension on i386, x86_64, and ia64
for gcc >= 4.6 (compiled in FFTW with --enable-quad-precision) */
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) \
&& (defined(__i386__) || defined(__x86_64__) || defined(__ia64__))
# if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex)
&& defined(I)
/* note: __float128 is a typedef, which is not supported with the _Complex
keyword in gcc, so instead we use this ugly __attribute__ version.
However, we can't simply pass the __attribute__ version to
FFTW_DEFINE_API because the __attribute__ confuses gcc in pointer
types. Hence redefining FFTW_DEFINE_COMPLEX. Ugh. */
# undef FFTW_DEFINE_COMPLEX
# define FFTW_DEFINE_COMPLEX(R, C) typedef _Complex float __attribute__(
(mode(TC))) C
# endif
FFTW_DEFINE_API(FFTW_MANGLE_QUAD, __float128, fftwq_complex)
#endif
#define FFTW_FORWARD (-1) #define FFTW_FORWARD (-1)
#define FFTW_BACKWARD (+1) #define FFTW_BACKWARD (+1)
#define FFTW_NO_TIMELIMIT (-1.0) #define FFTW_NO_TIMELIMIT (-1.0)
/* documented flags */ /* documented flags */
#define FFTW_MEASURE (0U) #define FFTW_MEASURE (0U)
#define FFTW_DESTROY_INPUT (1U << 0) #define FFTW_DESTROY_INPUT (1U << 0)
#define FFTW_UNALIGNED (1U << 1) #define FFTW_UNALIGNED (1U << 1)
#define FFTW_CONSERVE_MEMORY (1U << 2) #define FFTW_CONSERVE_MEMORY (1U << 2)
 End of changes. 12 change blocks. 
5 lines changed or deleted 36 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/