annotate src/fftw-3.3.5/api/api.h @ 42:2cd0e3b3e1fd

Current fftw source
author Chris Cannam
date Tue, 18 Oct 2016 13:40:26 +0100
parents
children
rev   line source
Chris@42 1 /*
Chris@42 2 * Copyright (c) 2003, 2007-14 Matteo Frigo
Chris@42 3 * Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
Chris@42 4 *
Chris@42 5 * This program is free software; you can redistribute it and/or modify
Chris@42 6 * it under the terms of the GNU General Public License as published by
Chris@42 7 * the Free Software Foundation; either version 2 of the License, or
Chris@42 8 * (at your option) any later version.
Chris@42 9 *
Chris@42 10 * This program is distributed in the hope that it will be useful,
Chris@42 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@42 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@42 13 * GNU General Public License for more details.
Chris@42 14 *
Chris@42 15 * You should have received a copy of the GNU General Public License
Chris@42 16 * along with this program; if not, write to the Free Software
Chris@42 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Chris@42 18 *
Chris@42 19 */
Chris@42 20
Chris@42 21 /* internal API definitions */
Chris@42 22 #ifndef __API_H__
Chris@42 23 #define __API_H__
Chris@42 24
Chris@42 25 #ifndef CALLING_FFTW /* defined in hook.c, when calling internal functions */
Chris@42 26 # define COMPILING_FFTW /* used for DLL symbol exporting in fftw3.h */
Chris@42 27 #endif
Chris@42 28
Chris@42 29 /* When compiling with GNU libtool on Windows, DLL_EXPORT is #defined
Chris@42 30 for compiling the shared-library code. In this case, we'll #define
Chris@42 31 FFTW_DLL to add dllexport attributes to the specified functions in
Chris@42 32 fftw3.h.
Chris@42 33
Chris@42 34 If we don't specify dllexport explicitly, then libtool
Chris@42 35 automatically exports all symbols. However, if we specify
Chris@42 36 dllexport explicitly for any functions, then libtool apparently
Chris@42 37 doesn't do any automatic exporting. (Not documented, grrr, but
Chris@42 38 this is the observed behavior with libtool 1.5.8.) Thus, using
Chris@42 39 this forces us to correctly dllexport every exported symbol, or
Chris@42 40 linking bench.exe will fail. This has the advantage of forcing
Chris@42 41 us to mark things correctly, which is necessary for other compilers
Chris@42 42 (such as MS VC++). */
Chris@42 43 #ifdef DLL_EXPORT
Chris@42 44 # define FFTW_DLL
Chris@42 45 #endif
Chris@42 46
Chris@42 47 /* just in case: force <fftw3.h> not to use C99 complex numbers
Chris@42 48 (we need this for IBM xlc because _Complex_I is treated specially
Chris@42 49 and is defined even if <complex.h> is not included) */
Chris@42 50 #define FFTW_NO_Complex
Chris@42 51
Chris@42 52 #include "fftw3.h"
Chris@42 53 #include "ifftw.h"
Chris@42 54 #include "rdft.h"
Chris@42 55
Chris@42 56 #ifdef __cplusplus
Chris@42 57 extern "C"
Chris@42 58 {
Chris@42 59 #endif /* __cplusplus */
Chris@42 60
Chris@42 61 /* the API ``plan'' contains both the kernel plan and problem */
Chris@42 62 struct X(plan_s) {
Chris@42 63 plan *pln;
Chris@42 64 problem *prb;
Chris@42 65 int sign;
Chris@42 66 };
Chris@42 67
Chris@42 68 /* shorthand */
Chris@42 69 typedef struct X(plan_s) apiplan;
Chris@42 70
Chris@42 71 /* complex type for internal use */
Chris@42 72 typedef R C[2];
Chris@42 73
Chris@42 74 #define EXTRACT_REIM(sign, c, r, i) X(extract_reim)(sign, (c)[0], r, i)
Chris@42 75
Chris@42 76 #define TAINT_UNALIGNED(p, flg) TAINT(p, ((flg) & FFTW_UNALIGNED) != 0)
Chris@42 77
Chris@42 78 tensor *X(mktensor_rowmajor)(int rnk, const int *n,
Chris@42 79 const int *niphys, const int *nophys,
Chris@42 80 int is, int os);
Chris@42 81
Chris@42 82 tensor *X(mktensor_iodims)(int rank, const X(iodim) *dims, int is, int os);
Chris@42 83 tensor *X(mktensor_iodims64)(int rank, const X(iodim64) *dims, int is, int os);
Chris@42 84 const int *X(rdft2_pad)(int rnk, const int *n, const int *nembed,
Chris@42 85 int inplace, int cmplx, int **nfree);
Chris@42 86
Chris@42 87 int X(many_kosherp)(int rnk, const int *n, int howmany);
Chris@42 88 int X(guru_kosherp)(int rank, const X(iodim) *dims,
Chris@42 89 int howmany_rank, const X(iodim) *howmany_dims);
Chris@42 90 int X(guru64_kosherp)(int rank, const X(iodim64) *dims,
Chris@42 91 int howmany_rank, const X(iodim64) *howmany_dims);
Chris@42 92
Chris@42 93 /* Note: FFTW_EXTERN is used for "internal" functions used in tests/hook.c */
Chris@42 94
Chris@42 95 FFTW_EXTERN printer *X(mkprinter_file)(FILE *f);
Chris@42 96
Chris@42 97 printer *X(mkprinter_cnt)(size_t *cnt);
Chris@42 98 printer *X(mkprinter_str)(char *s);
Chris@42 99
Chris@42 100 FFTW_EXTERN planner *X(the_planner)(void);
Chris@42 101 void X(configure_planner)(planner *plnr);
Chris@42 102
Chris@42 103 void X(mapflags)(planner *, unsigned);
Chris@42 104
Chris@42 105 apiplan *X(mkapiplan)(int sign, unsigned flags, problem *prb);
Chris@42 106
Chris@42 107 rdft_kind *X(map_r2r_kind)(int rank, const X(r2r_kind) * kind);
Chris@42 108
Chris@42 109 typedef void (*planner_hook_t)(void);
Chris@42 110
Chris@42 111 void X(set_planner_hooks)(planner_hook_t before, planner_hook_t after);
Chris@42 112
Chris@42 113 #ifdef __cplusplus
Chris@42 114 } /* extern "C" */
Chris@42 115 #endif /* __cplusplus */
Chris@42 116
Chris@42 117 #endif /* __API_H__ */