Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.5/api/x77.h @ 42:2cd0e3b3e1fd
Current fftw source
author | Chris Cannam |
---|---|
date | Tue, 18 Oct 2016 13:40:26 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
41:481f5f8c5634 | 42:2cd0e3b3e1fd |
---|---|
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 /* Fortran-like (e.g. as in BLAS) type prefixes for F77 interface */ | |
22 #if defined(FFTW_SINGLE) | |
23 # define x77(name) CONCAT(sfftw_, name) | |
24 # define X77(NAME) CONCAT(SFFTW_, NAME) | |
25 #elif defined(FFTW_LDOUBLE) | |
26 /* FIXME: what is best? BLAS uses D..._X, apparently. Ugh. */ | |
27 # define x77(name) CONCAT(lfftw_, name) | |
28 # define X77(NAME) CONCAT(LFFTW_, NAME) | |
29 #elif defined(FFTW_QUAD) | |
30 # define x77(name) CONCAT(qfftw_, name) | |
31 # define X77(NAME) CONCAT(QFFTW_, NAME) | |
32 #else | |
33 # define x77(name) CONCAT(dfftw_, name) | |
34 # define X77(NAME) CONCAT(DFFTW_, NAME) | |
35 #endif | |
36 | |
37 /* If F77_FUNC is not defined and the user didn't explicitly specify | |
38 --disable-fortran, then make our best guess at default wrappers | |
39 (since F77_FUNC_EQUIV should not be defined in this case, we | |
40 will use both double-underscored g77 wrappers and single- or | |
41 non-underscored wrappers). This saves us from dealing with | |
42 complaints in the cases where the user failed to specify | |
43 an F77 compiler or wrapper detection failed for some reason. */ | |
44 #if !defined(F77_FUNC) && !defined(DISABLE_FORTRAN) | |
45 # if (defined(_WIN32) || defined(__WIN32__)) && !defined(WINDOWS_F77_MANGLING) | |
46 # define WINDOWS_F77_MANGLING 1 | |
47 # endif | |
48 # if defined(_AIX) || defined(__hpux) || defined(hpux) | |
49 # define F77_FUNC(a, A) a | |
50 # elif defined(CRAY) || defined(_CRAY) || defined(_UNICOS) | |
51 # define F77_FUNC(a, A) A | |
52 # else | |
53 # define F77_FUNC(a, A) a ## _ | |
54 # endif | |
55 # define F77_FUNC_(a, A) a ## __ | |
56 #endif | |
57 | |
58 #if defined(WITH_G77_WRAPPERS) && !defined(DISABLE_FORTRAN) | |
59 # undef F77_FUNC_ | |
60 # define F77_FUNC_(a, A) a ## __ | |
61 # undef F77_FUNC_EQUIV | |
62 #endif | |
63 | |
64 /* annoying Windows syntax for shared-library declarations */ | |
65 #if defined(FFTW_DLL) && (defined(_WIN32) || defined(__WIN32__)) | |
66 # define FFTW_VOIDFUNC __declspec(dllexport) void | |
67 #else | |
68 # define FFTW_VOIDFUNC void | |
69 #endif |