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