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