annotate fft/fftw/fftw-3.3.4/api/api.h @ 40:223f770b5341 kissfft-double tip

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