SYCL: Avoid using no_init read accessor in rocFFT
[alexxy/gromacs.git] / src / external / thread_mpi / include / thread_mpi / mpi_bindings.h
1 /*
2    This source code file is part of thread_mpi.
3    Written by Sander Pronk, Erik Lindahl, and possibly others.
4
5    Copyright (c) 2009, Sander Pronk, Erik Lindahl.
6    All rights reserved.
7
8    Redistribution and use in source and binary forms, with or without
9    modification, are permitted provided that the following conditions are met:
10    1) Redistributions of source code must retain the above copyright
11    notice, this list of conditions and the following disclaimer.
12    2) Redistributions in binary form must reproduce the above copyright
13    notice, this list of conditions and the following disclaimer in the
14    documentation and/or other materials provided with the distribution.
15    3) Neither the name of the copyright holders nor the
16    names of its contributors may be used to endorse or promote products
17    derived from this software without specific prior written permission.
18
19    THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
20    EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22    DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
23    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
30    If you want to redistribute modifications, please consider that
31    scientific software is very special. Version control is crucial -
32    bugs must be traceable. We will be happy to consider code for
33    inclusion in the official distribution, but derived work should not
34    be called official thread_mpi. Details are found in the README & COPYING
35    files.
36  */
37
38 #ifndef TMPI_MPI_BINDINGS_H_
39 #define TMPI_MPI_BINDINGS_H_
40
41 #include "tmpi.h"
42
43 /** \file
44    \brief MPI bindings for thread_mpi/tmpi.h
45
46    This file contains only macros and redefinitions to expose the standard
47    MPI API with thread_mpi calls.
48
49    This is different from the API exposed through thread_mpi/tmpi.h, which
50    uses names like \a tMPI_Send() instead of \a MPI_Send()
51
52    \sa thread_mpi/tmpi.h for documentation of the available data types and
53       functions
54    \sa http://www.mpi-forum.org/docs/docs.html for MPI documentation.
55  */
56
57 #ifndef DOXYGEN
58
59 /* The MPI_Comm structure contains the group of processes to communicate
60    with (defines the scope for global operations such as broadcast) */
61 typedef struct tmpi_comm_ *MPI_Comm;
62 /* The group part of the MPI-Comm structure */
63 typedef struct tmpi_group_ *MPI_Group;
64 /* Request structure for holding data about non-blocking transfers */
65 typedef struct tmpi_req_ *MPI_Request;
66 /* status of receives */
67 typedef struct tmpi_status_ MPI_Status;
68 /* data types */
69 typedef struct tmpi_datatype_ *MPI_Datatype;
70 /* reduce operations */
71 typedef tMPI_Op MPI_Op;
72
73
74 #define MPI_C_BOOL              TMPI_C_BOOL
75 #define MPI_CHAR                TMPI_CHAR
76 #define MPI_SHORT               TMPI_SHORT
77 #define MPI_INT                 TMPI_INT
78 #define MPI_LONG                TMPI_LONG
79 #define MPI_LONG_LONG           TMPI_LONG_LONG
80 #define MPI_LONG_LONG_INT       TMPI_LONG_LONG_INT
81 #define MPI_SIGNED_CHAR         TMPI_SIGNED_CHAR
82 #define MPI_UNSIGNED_CHAR       TMPI_UNSIGNED_CHAR
83 #define MPI_UNSIGNED_SHORT      TMPI_UNSIGNED_SHORT
84 #define MPI_UNSIGNED            TMPI_UNSIGNED
85 #define MPI_UNSIGNED_LONG_LONG  TMPI_UNSIGNED_LONG_LONG
86 #define MPI_FLOAT               TMPI_FLOAT
87 #define MPI_DOUBLE              TMPI_DOUBLE
88 #define MPI_LONG_DOUBLE         TMPI_LONG_DOUBLE
89 #define MPI_WCHAR               TMPI_WCHAR
90 #define MPI_BYTE                TMPI_BYTE
91 #define MPI_INT64_T             TMPI_INT64_T
92
93
94 #define MPI_SUCCESS                 TMPI_SUCCESS
95 #define MPI_ERR_MALLOC              TMPI_ERR_MALLOC
96 #define MPI_ERR_INIT                TMPI_ERR_INIT
97 #define MPI_ERR_FINALIZE            TMPI_ERR_FINALIZE
98 #define MPI_ERR_GROUP               TMPI_ERR_GROUP
99 #define MPI_ERR_COMM                TMPI_ERR_COMM
100 #define MPI_ERR_STATUS              TMPI_ERR_STATUS
101 #define MPI_ERR_GROUP_RANK          TMPI_ERR_GROUP_RANK
102 #define MPI_ERR_DIMS                TMPI_ERR_DIMS
103 #define MPI_ERR_COORDS              TMPI_ERR_COORDS
104 #define MPI_ERR_CART_CREATE_NPROCS  TMPI_ERR_CART_CREATE_NPROCS
105 #define MPI_ERR_XFER_COUNTERPART    TMPI_ERR_XFER_COUNTERPART
106 #define MPI_ERR_XFER_BUFSIZE        TMPI_ERR_XFER_BUFSIZE
107 #define MPI_ERR_XFER_BUF_OVERLAP    TMPI_ERR_XFER_BUF_OVERLAP
108 #define MPI_ERR_SEND_DEST           TMPI_ERR_SEND_DEST
109 #define MPI_ERR_RECV_SRC            TMPI_ERR_RECV_SRC
110 #define MPI_ERR_BUF                 TMPI_ERR_BUF
111 #define MPI_ERR_MULTI_MISMATCH      TMPI_ERR_MULTI_MISMATCH
112 #define MPI_ERR_OP_FN               TMPI_ERR_OP_FN
113 #define MPI_ERR_ENVELOPES           TMPI_ERR_ENVELOPES
114 #define MPI_ERR_REQUESTS            TMPI_ERR_REQUESTS
115 #define MPI_ERR_IN_STATUS           TMPI_ERR_IN_STATUS
116 #define MPI_FAILURE                 TMPI_FAILURE
117 #define MPI_ERR_UNKNOWN             TMPI_ERR_UNKNOWN
118 #define N_MPI_ERR                   N_TMPI_ERR
119
120 #define MPI_MAX_ERROR_STRING        TMPI_MAX_ERROR_STRING
121 #define MPI_UNDEFINED               TMPI_UNDEFINED
122
123
124 #define MPI_Errhandler_fn           tMPI_Errhandler_fn
125 #define MPI_Errhandler              tMPI_Errhandler
126 #define MPI_ERRORS_ARE_FATAL        TMPI_ERRORS_ARE_FATAL
127 #define MPI_ERRORS_RETURN           TMPI_ERRORS_RETURN
128
129
130
131 /* miscelaneous defines */
132 #define MPI_ANY_SOURCE          TMPI_ANY_SOURCE
133 #define MPI_ANY_TAG             TMPI_ANY_TAG
134
135 /* comm_compare defines */
136 #define MPI_IDENT               TMPI_IDENT
137 #define MPI_CONGRUENT           TMPI_CONGRUENT
138 #define MPI_SIMILAR             TMPI_SIMILAR
139 #define MPI_UNEQUAL             TMPI_UNEQUAL
140
141
142 /* topology test defines */
143 #define MPI_CART                TMPI_CART
144 #define MPI_GRAPH               TMPI_GRAPH
145
146
147 #define MPI_COMM_WORLD          TMPI_COMM_WORLD
148 #define MPI_COMM_NULL           TMPI_COMM_NULL
149
150
151 #define MPI_GROUP_NULL          TMPI_GROUP_NULL
152 #define MPI_GROUP_EMPTY         TMPI_GROUP_EMPTY
153
154 #define MPI_MAX_PROCESSOR_NAME  TMPI_MAX_PROCESSOR_NAME
155
156
157 /* MPI status */
158 #define MPI_STATUS_IGNORE       TMPI_STATUS_IGNORE
159 #define MPI_STATUSES_IGNORE     TMPI_STATUSES_IGNORE
160
161 #define MPI_SOURCE              TMPI_SOURCE
162 #define MPI_TAG                 TMPI_TAG
163 #define MPI_ERROR               TMPI_ERROR
164
165 #define mpi_status_             tmpi_status_
166
167 #define MPI_REQUEST_NULL        TMPI_REQUEST_NULL
168
169 #define MPI_IN_PLACE            TMPI_IN_PLACE
170
171
172
173 #define MPI_MAX          TMPI_MAX
174 #define MPI_MIN          TMPI_MIN
175 #define MPI_SUM          TMPI_SUM
176 #define MPI_PROD         TMPI_PROD
177 #define MPI_LAND         TMPI_LAND
178 #define MPI_BAND         TMPI_BAND
179 #define MPI_LOR          TMPI_LOR
180 #define MPI_BOR          TMPI_BOR
181 #define MPI_LXOR         TMPI_LXOR
182 #define MPI_BXOR         TMPI_BXOR
183
184 /* the functions: */
185 #define MPI_Init                    tMPI_Init
186 #define MPI_Finalize                tMPI_Finalize
187 #define MPI_Abort                   tMPI_Abort
188 #define MPI_Initialized             tMPI_Initialized
189 #define MPI_Finalized               tMPI_Finalized
190
191 #define MPI_Create_errhandler       tMPI_Create_errhandler
192 #define MPI_Errhandler_free         tMPI_Errhandler_free
193 #define MPI_Comm_set_errhandler     tMPI_Comm_set_errhandler
194 #define MPI_Comm_get_errhandler     tMPI_Comm_get_errhandler
195 #define MPI_Error_string            tMPI_Error_string
196
197 #define MPI_Get_processor_name      tMPI_Get_processor_name
198 #define MPI_Wtime                   tMPI_Wtime
199
200 #define MPI_Group_size              tMPI_Group_size
201 #define MPI_Group_rank              tMPI_Group_rank
202 #define MPI_Group_incl              tMPI_Group_incl
203 #define MPI_Comm_group              tMPI_Comm_group
204 #define MPI_Group_free              tMPI_Group_free
205
206 #define MPI_Comm_size               tMPI_Comm_size
207 #define MPI_Comm_rank               tMPI_Comm_rank
208 #define MPI_Comm_compare            tMPI_Comm_compare
209 #define MPI_Comm_free               tMPI_Comm_free
210 #define MPI_Comm_create             tMPI_Comm_create
211 #define MPI_Comm_split              tMPI_Comm_split
212 #define MPI_Comm_dup                tMPI_Comm_dup
213
214 #define MPI_Topo_test               tMPI_Topo_test
215 #define MPI_Cartdim_get             tMPI_Cartdim_get
216 #define MPI_Cart_get                tMPI_Cart_get
217 #define MPI_Cart_rank               tMPI_Cart_rank
218 #define MPI_Cart_coords             tMPI_Cart_coords
219 #define MPI_Cart_map                tMPI_Cart_map
220 #define MPI_Cart_create             tMPI_Cart_create
221 #define MPI_Cart_sub                tMPI_Cart_sub
222
223 #define MPI_Type_contiguous         tMPI_Type_contiguous
224 #define MPI_Type_commit             tMPI_Type_commit
225
226 #define MPI_Send                    tMPI_Send
227 #define MPI_Recv                    tMPI_Recv
228 #define MPI_Sendrecv                tMPI_Sendrecv
229 #define MPI_Get_count               tMPI_Get_count
230
231 #define MPI_Isend                   tMPI_Isend
232 #define MPI_Irecv                   tMPI_Irecv
233 #define MPI_Test                    tMPI_Test
234 #define MPI_Wait                    tMPI_Wait
235 #define MPI_Waitall                 tMPI_Waitall
236
237 #define MPI_Barrier                 tMPI_Barrier
238
239 #define MPI_Bcast                   tMPI_Bcast
240
241 #define MPI_Gather                  tMPI_Gather
242 #define MPI_Gatherv                 tMPI_Gatherv
243 #define MPI_Scatter                 tMPI_Scatter
244 #define MPI_Scatterv                tMPI_Scatterv
245 #define MPI_Alltoall                tMPI_Alltoall
246 #define MPI_Alltoallv               tMPI_Alltoallv
247
248
249 #define MPI_Reduce                  tMPI_Reduce
250 #define MPI_Allreduce               tMPI_Allreduce
251 #define MPI_Scan                    tMPI_Scan
252
253 #endif /* DOXYGEN */
254
255 #endif /* TMPI_MPI_BINDINGS_H_ */