1 /*
2  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3  *                         University Research and Technology
4  *                         Corporation.  All rights reserved.
5  * Copyright (c) 2004-2005 The University of Tennessee and The University
6  *                         of Tennessee Research Foundation.  All rights
7  *                         reserved.
8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9  *                         University of Stuttgart.  All rights reserved.
10  * Copyright (c) 2004-2005 The Regents of the University of California.
11  *                         All rights reserved.
12  * Copyright (c) 2011-2012 Cisco Systems, Inc.  All rights reserved.
13  * Copyright (c) 2015      Research Organization for Information Science
14  *                         and Technology (RIST). All rights reserved.
15  * $COPYRIGHT$
16  *
17  * Additional copyrights may follow
18  *
19  * $HEADER$
20  */
21 
22 #ifndef OMPI_F77_BINDINGS_H
23 #define OMPI_F77_BINDINGS_H
24 
25 #include "ompi_config.h"
26 
27 #include "mpi.h"
28 #include "ompi/request/grequest.h"
29 
30 #if OMPI_FORTRAN_CAPS
31 #define OMPI_GENERATE_F77_BINDINGS(upper_case, \
32                                   lower_case, \
33                                   single_underscore, \
34                                   double_underscore, \
35                                   wrapper_function, \
36                                   signature, \
37                                   params) \
38             void upper_case signature { wrapper_function params; }
39 #elif OMPI_FORTRAN_PLAIN
40 #define OMPI_GENERATE_F77_BINDINGS(upper_case, \
41                                   lower_case, \
42                                   single_underscore, \
43                                   double_underscore, \
44                                   wrapper_function, \
45                                   signature, \
46                                   params) \
47             void lower_case signature { wrapper_function params; }
48 #elif OMPI_FORTRAN_DOUBLE_UNDERSCORE
49 #define OMPI_GENERATE_F77_BINDINGS(upper_case, \
50                                   lower_case, \
51                                   single_underscore, \
52                                   double_underscore, \
53                                   wrapper_function, \
54                                   signature, \
55                                   params) \
56             void double_underscore signature { wrapper_function params; }
57 #elif OMPI_FORTRAN_SINGLE_UNDERSCORE
58 #define OMPI_GENERATE_F77_BINDINGS(upper_case, \
59                                   lower_case, \
60                                   single_underscore, \
61                                   double_underscore, \
62                                   wrapper_function, \
63                                   signature, \
64                                   params) \
65             void single_underscore signature { wrapper_function params; }
66 #else
67 #error Unrecognized Fortran name mangling scheme
68 #endif
69 /*
70  * We maintain 2 separate sets of defines and prototypes. This ensures
71  * that we can build MPI_* bindings or PMPI_* bindings as needed. The
72  * top level always builds MPI_* bindings and bottom level will always
73  * build PMPI_* bindings.  This means that top-level includes
74  * "ompi/mpi/fortran/mpif-h/" .h files and lower-level includes
75  * "ompi/mpi/fortran/mpif-h/profile" .h files.
76  *
77  * Both prototypes for all MPI / PMPI functions is moved into
78  * prototypes_mpi.h.
79  */
80 
81 #include "ompi/mpi/fortran/mpif-h/prototypes_mpi.h"
82 
83 #include "ompi/mpi/fortran/base/fint_2_int.h"
84 
85 #endif /* OMPI_F77_BINDINGS_H */
86