Chris@10: /* Chris@10: * Copyright (c) 2003, 2007-11 Matteo Frigo Chris@10: * Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology Chris@10: * Chris@10: * This program is free software; you can redistribute it and/or modify Chris@10: * it under the terms of the GNU General Public License as published by Chris@10: * the Free Software Foundation; either version 2 of the License, or Chris@10: * (at your option) any later version. Chris@10: * Chris@10: * This program is distributed in the hope that it will be useful, Chris@10: * but WITHOUT ANY WARRANTY; without even the implied warranty of Chris@10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Chris@10: * GNU General Public License for more details. Chris@10: * Chris@10: * You should have received a copy of the GNU General Public License Chris@10: * along with this program; if not, write to the Free Software Chris@10: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Chris@10: * Chris@10: */ Chris@10: Chris@10: /* internal API definitions */ Chris@10: #ifndef __API_H__ Chris@10: #define __API_H__ Chris@10: Chris@10: #ifndef CALLING_FFTW /* defined in hook.c, when calling internal functions */ Chris@10: # define COMPILING_FFTW /* used for DLL symbol exporting in fftw3.h */ Chris@10: #endif Chris@10: Chris@10: /* When compiling with GNU libtool on Windows, DLL_EXPORT is #defined Chris@10: for compiling the shared-library code. In this case, we'll #define Chris@10: FFTW_DLL to add dllexport attributes to the specified functions in Chris@10: fftw3.h. Chris@10: Chris@10: If we don't specify dllexport explicitly, then libtool Chris@10: automatically exports all symbols. However, if we specify Chris@10: dllexport explicitly for any functions, then libtool apparently Chris@10: doesn't do any automatic exporting. (Not documented, grrr, but Chris@10: this is the observed behavior with libtool 1.5.8.) Thus, using Chris@10: this forces us to correctly dllexport every exported symbol, or Chris@10: linking bench.exe will fail. This has the advantage of forcing Chris@10: us to mark things correctly, which is necessary for other compilers Chris@10: (such as MS VC++). */ Chris@10: #ifdef DLL_EXPORT Chris@10: # define FFTW_DLL Chris@10: #endif Chris@10: Chris@10: /* just in case: force not to use C99 complex numbers Chris@10: (we need this for IBM xlc because _Complex_I is treated specially Chris@10: and is defined even if is not included) */ Chris@10: #define FFTW_NO_Complex Chris@10: Chris@10: #include "fftw3.h" Chris@10: #include "ifftw.h" Chris@10: #include "rdft.h" Chris@10: Chris@10: #ifdef __cplusplus Chris@10: extern "C" Chris@10: { Chris@10: #endif /* __cplusplus */ Chris@10: Chris@10: /* the API ``plan'' contains both the kernel plan and problem */ Chris@10: struct X(plan_s) { Chris@10: plan *pln; Chris@10: problem *prb; Chris@10: int sign; Chris@10: }; Chris@10: Chris@10: /* shorthand */ Chris@10: typedef struct X(plan_s) apiplan; Chris@10: Chris@10: /* complex type for internal use */ Chris@10: typedef R C[2]; Chris@10: Chris@10: #define EXTRACT_REIM(sign, c, r, i) X(extract_reim)(sign, (c)[0], r, i) Chris@10: Chris@10: #define TAINT_UNALIGNED(p, flg) TAINT(p, ((flg) & FFTW_UNALIGNED) != 0) Chris@10: Chris@10: tensor *X(mktensor_rowmajor)(int rnk, const int *n, Chris@10: const int *niphys, const int *nophys, Chris@10: int is, int os); Chris@10: Chris@10: tensor *X(mktensor_iodims)(int rank, const X(iodim) *dims, int is, int os); Chris@10: tensor *X(mktensor_iodims64)(int rank, const X(iodim64) *dims, int is, int os); Chris@10: const int *X(rdft2_pad)(int rnk, const int *n, const int *nembed, Chris@10: int inplace, int cmplx, int **nfree); Chris@10: Chris@10: int X(many_kosherp)(int rnk, const int *n, int howmany); Chris@10: int X(guru_kosherp)(int rank, const X(iodim) *dims, Chris@10: int howmany_rank, const X(iodim) *howmany_dims); Chris@10: int X(guru64_kosherp)(int rank, const X(iodim64) *dims, Chris@10: int howmany_rank, const X(iodim64) *howmany_dims); Chris@10: Chris@10: /* Note: FFTW_EXTERN is used for "internal" functions used in tests/hook.c */ Chris@10: Chris@10: FFTW_EXTERN printer *X(mkprinter_file)(FILE *f); Chris@10: Chris@10: FFTW_EXTERN planner *X(the_planner)(void); Chris@10: void X(configure_planner)(planner *plnr); Chris@10: Chris@10: void X(mapflags)(planner *, unsigned); Chris@10: Chris@10: apiplan *X(mkapiplan)(int sign, unsigned flags, problem *prb); Chris@10: Chris@10: rdft_kind *X(map_r2r_kind)(int rank, const X(r2r_kind) * kind); Chris@10: Chris@10: #ifdef __cplusplus Chris@10: } /* extern "C" */ Chris@10: #endif /* __cplusplus */ Chris@10: Chris@10: #endif /* __API_H__ */