OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

functions.h
1 /*
2 * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2010 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2007 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) 2008-2009 Cisco Systems, Inc. All rights reserved.
13 * $COPYRIGHT$
14 *
15 * Additional copyrights may follow
16 *
17 * $HEADER$
18 */
19
20 #ifndef OMPI_OP_BASE_FUNCTIONS_H
21 #define OMPI_OP_BASE_FUNCTIONS_H
22
23 #include "ompi_config.h"
24 #include "ompi/mca/op/op.h"
25
26 /*
27 * Since we have so many of these, and they're all identical except
28 * for the name, use macros to prototype them.
29 */
30 #define OMPI_OP_PROTO (void *in, void *out, int *count, struct ompi_datatype_t **dtype, struct ompi_op_base_module_1_0_0_t *module)
31
32 /* C integer */
33 #define OMPI_OP_HANDLER_C_INTEGER_INTRINSIC(name) \
34 void ompi_op_base_##name##_int8_t OMPI_OP_PROTO; \
35 void ompi_op_base_##name##_uint8_t OMPI_OP_PROTO; \
36 void ompi_op_base_##name##_int16_t OMPI_OP_PROTO; \
37 void ompi_op_base_##name##_uint16_t OMPI_OP_PROTO; \
38 void ompi_op_base_##name##_int32_t OMPI_OP_PROTO; \
39 void ompi_op_base_##name##_uint32_t OMPI_OP_PROTO; \
40 void ompi_op_base_##name##_int64_t OMPI_OP_PROTO; \
41 void ompi_op_base_##name##_uint64_t OMPI_OP_PROTO;
42 #define OMPI_OP_HANDLER_C_INTEGER(name) \
43 OMPI_OP_HANDLER_C_INTEGER_INTRINSIC(name)
44
45 /* Fortran integer */
46
47 #define OMPI_OP_HANDLER_FORTRAN_INTEGER_INTRINSIC(name) \
48 void ompi_op_base_##name##_fortran_integer OMPI_OP_PROTO;
49 #if OMPI_HAVE_FORTRAN_INTEGER1
50 #define OMPI_OP_HANDLER_FORTRAN_INTEGER1(name) \
51 void ompi_op_base_##name##_fortran_integer1 OMPI_OP_PROTO;
52 #else
53 #define OMPI_OP_HANDLER_FORTRAN_INTEGER1(name)
54 #endif
55 #if OMPI_HAVE_FORTRAN_INTEGER2
56 #define OMPI_OP_HANDLER_FORTRAN_INTEGER2(name) \
57 void ompi_op_base_##name##_fortran_integer2 OMPI_OP_PROTO;
58 #else
59 #define OMPI_OP_HANDLER_FORTRAN_INTEGER2(name)
60 #endif
61 #if OMPI_HAVE_FORTRAN_INTEGER4
62 #define OMPI_OP_HANDLER_FORTRAN_INTEGER4(name) \
63 void ompi_op_base_##name##_fortran_integer4 OMPI_OP_PROTO;
64 #else
65 #define OMPI_OP_HANDLER_FORTRAN_INTEGER4(name)
66 #endif
67 #if OMPI_HAVE_FORTRAN_INTEGER8
68 #define OMPI_OP_HANDLER_FORTRAN_INTEGER8(name) \
69 void ompi_op_base_##name##_fortran_integer8 OMPI_OP_PROTO;
70 #else
71 #define OMPI_OP_HANDLER_FORTRAN_INTEGER8(name)
72 #endif
73 #if OMPI_HAVE_FORTRAN_INTEGER16
74 #define OMPI_OP_HANDLER_FORTRAN_INTEGER16(name) \
75 void ompi_op_base_##name##_fortran_integer16 OMPI_OP_PROTO;
76 #else
77 #define OMPI_OP_HANDLER_FORTRAN_INTEGER16(name)
78 #endif
79 #define OMPI_OP_HANDLER_FORTRAN_INTEGER(name) \
80 OMPI_OP_HANDLER_FORTRAN_INTEGER_INTRINSIC(name) \
81 OMPI_OP_HANDLER_FORTRAN_INTEGER1(name) \
82 OMPI_OP_HANDLER_FORTRAN_INTEGER2(name) \
83 OMPI_OP_HANDLER_FORTRAN_INTEGER4(name) \
84 OMPI_OP_HANDLER_FORTRAN_INTEGER8(name) \
85 OMPI_OP_HANDLER_FORTRAN_INTEGER16(name)
86
87 /* Floating point */
88
89 #define OMPI_OP_HANDLER_FLOATING_POINT_INTRINSIC(name) \
90 void ompi_op_base_##name##_float OMPI_OP_PROTO; \
91 void ompi_op_base_##name##_double OMPI_OP_PROTO; \
92 void ompi_op_base_##name##_fortran_real OMPI_OP_PROTO; \
93 void ompi_op_base_##name##_fortran_double_precision OMPI_OP_PROTO; \
94 void ompi_op_base_##name##_long_double OMPI_OP_PROTO;
95 #if OMPI_HAVE_FORTRAN_REAL2
96 #define OMPI_OP_HANDLER_FLOATING_POINT_REAL2(name) \
97 void ompi_op_base_##name##_fortran_real2 OMPI_OP_PROTO;
98 #else
99 #define OMPI_OP_HANDLER_FLOATING_POINT_REAL2(name)
100 #endif
101 #if OMPI_HAVE_FORTRAN_REAL4
102 #define OMPI_OP_HANDLER_FLOATING_POINT_REAL4(name) \
103 void ompi_op_base_##name##_fortran_real4 OMPI_OP_PROTO;
104 #else
105 #define OMPI_OP_HANDLER_FLOATING_POINT_REAL4(name)
106 #endif
107 #if OMPI_HAVE_FORTRAN_REAL8
108 #define OMPI_OP_HANDLER_FLOATING_POINT_REAL8(name) \
109 void ompi_op_base_##name##_fortran_real8 OMPI_OP_PROTO;
110 #else
111 #define OMPI_OP_HANDLER_FLOATING_POINT_REAL8(name)
112 #endif
113 #if OMPI_HAVE_FORTRAN_REAL16
114 #define OMPI_OP_HANDLER_FLOATING_POINT_REAL16(name) \
115 void ompi_op_base_##name##_fortran_real16 OMPI_OP_PROTO;
116 #else
117 #define OMPI_OP_HANDLER_FLOATING_POINT_REAL16(name)
118 #endif
119 #define OMPI_OP_HANDLER_FLOATING_POINT(name) \
120 OMPI_OP_HANDLER_FLOATING_POINT_INTRINSIC(name) \
121 OMPI_OP_HANDLER_FLOATING_POINT_REAL4(name) \
122 OMPI_OP_HANDLER_FLOATING_POINT_REAL8(name) \
123 OMPI_OP_HANDLER_FLOATING_POINT_REAL16(name) \
124
125 /* Logical */
126
127 #define OMPI_OP_HANDLER_LOGICAL(name) \
128 void ompi_op_base_##name##_fortran_logical OMPI_OP_PROTO; \
129 void ompi_op_base_##name##_bool OMPI_OP_PROTO;
130
131 /* Complex */
132
133 #if OMPI_HAVE_FORTRAN_REAL
134 #define OMPI_OP_HANDLER_COMPLEX_INTRINSIC(name) \
135 void ompi_op_base_##name##_fortran_complex OMPI_OP_PROTO;
136 #else
137 #define OMPI_OP_HANDLER_COMPLEX_INTRINSIC(name)
138 #endif
139 #if OMPI_HAVE_FORTRAN_DOUBLE_PRECISION
140 #define OMPI_OP_HANDLER_DOUBLE_COMPLEX_INTRINSIC(name) \
141 void ompi_op_base_##name##_fortran_double_complex OMPI_OP_PROTO;
142 #else
143 #define OMPI_OP_HANDLER_DOUBLE_COMPLEX_INTRINSIC(name)
144 #endif
145 #if OMPI_HAVE_FORTRAN_REAL4
146 #define OMPI_OP_HANDLER_COMPLEX8(name) \
147 void ompi_op_base_##name##_fortran_complex8 OMPI_OP_PROTO;
148 #else
149 #define OMPI_OP_HANDLER_COMPLEX8(name)
150 #endif
151 #if OMPI_HAVE_FORTRAN_REAL8
152 #define OMPI_OP_HANDLER_COMPLEX16(name) \
153 void ompi_op_base_##name##_fortran_complex16 OMPI_OP_PROTO;
154 #else
155 #define OMPI_OP_HANDLER_COMPLEX16(name)
156 #endif
157 #if OMPI_HAVE_FORTRAN_REAL16
158 #define OMPI_OP_HANDLER_COMPLEX32(name) \
159 void ompi_op_base_##name##_fortran_complex32 OMPI_OP_PROTO;
160 #else
161 #define OMPI_OP_HANDLER_COMPLEX32(name)
162 #endif
163 #define OMPI_OP_HANDLER_COMPLEX(name) \
164 OMPI_OP_HANDLER_COMPLEX_INTRINSIC(name) \
165 OMPI_OP_HANDLER_DOUBLE_COMPLEX_INTRINSIC(name) \
166 OMPI_OP_HANDLER_COMPLEX8(name) \
167 OMPI_OP_HANDLER_COMPLEX16(name) \
168 OMPI_OP_HANDLER_COMPLEX32(name)
169
170 /* Byte */
171
172 #define OMPI_OP_HANDLER_BYTE(name) \
173 void ompi_op_base_##name##_byte OMPI_OP_PROTO;
174
175 /* "2 type" */
176
177 #define OMPI_OP_HANDLER_2TYPE(name) \
178 void ompi_op_base_##name##_2real OMPI_OP_PROTO; \
179 void ompi_op_base_##name##_2double_precision OMPI_OP_PROTO; \
180 void ompi_op_base_##name##_2integer OMPI_OP_PROTO; \
181 void ompi_op_base_##name##_float_int OMPI_OP_PROTO; \
182 void ompi_op_base_##name##_double_int OMPI_OP_PROTO; \
183 void ompi_op_base_##name##_long_int OMPI_OP_PROTO; \
184 void ompi_op_base_##name##_2int OMPI_OP_PROTO; \
185 void ompi_op_base_##name##_short_int OMPI_OP_PROTO; \
186 void ompi_op_base_##name##_long_double_int OMPI_OP_PROTO;
187
188 BEGIN_C_DECLS
189
190 /**
191 * Handler functions for MPI_MAX
192 */
193 OMPI_OP_HANDLER_C_INTEGER(max)
194 OMPI_OP_HANDLER_FORTRAN_INTEGER(max)
195 OMPI_OP_HANDLER_FLOATING_POINT(max)
196
197 /**
198 * Handler functions for MPI_MIN
199 */
200 OMPI_OP_HANDLER_C_INTEGER(min)
201 OMPI_OP_HANDLER_FORTRAN_INTEGER(min)
202 OMPI_OP_HANDLER_FLOATING_POINT(min)
203
204 /**
205 * Handler functions for MPI_SUM
206 */
207 OMPI_OP_HANDLER_C_INTEGER(sum)
208 OMPI_OP_HANDLER_FORTRAN_INTEGER(sum)
209 OMPI_OP_HANDLER_FLOATING_POINT(sum)
210 OMPI_OP_HANDLER_COMPLEX(sum)
211
212 /**
213 * Handler functions for MPI_PROD
214 */
215 OMPI_OP_HANDLER_C_INTEGER(prod)
216 OMPI_OP_HANDLER_FORTRAN_INTEGER(prod)
217 OMPI_OP_HANDLER_FLOATING_POINT(prod)
218 OMPI_OP_HANDLER_COMPLEX(prod)
219
220 /**
221 * Handler functions for MPI_LAND
222 */
223 OMPI_OP_HANDLER_C_INTEGER(land)
224 OMPI_OP_HANDLER_LOGICAL(land)
225
226 /**
227 * Handler functions for MPI_BAND
228 */
229 OMPI_OP_HANDLER_C_INTEGER(band)
230 OMPI_OP_HANDLER_FORTRAN_INTEGER(band)
231 OMPI_OP_HANDLER_BYTE(band)
232
233 /**
234 * Handler functions for MPI_LOR
235 */
236 OMPI_OP_HANDLER_C_INTEGER(lor)
237 OMPI_OP_HANDLER_LOGICAL(lor)
238
239 /**
240 * Handler functions for MPI_BOR
241 */
242 OMPI_OP_HANDLER_C_INTEGER(bor)
243 OMPI_OP_HANDLER_FORTRAN_INTEGER(bor)
244 OMPI_OP_HANDLER_BYTE(bor)
245
246 /**
247 * Handler functions for MPI_LXOR
248 */
249 OMPI_OP_HANDLER_C_INTEGER(lxor)
250 OMPI_OP_HANDLER_LOGICAL(lxor)
251
252 /**
253 * Handler functions for MPI_BXOR
254 */
255 OMPI_OP_HANDLER_C_INTEGER(bxor)
256 OMPI_OP_HANDLER_FORTRAN_INTEGER(bxor)
257 OMPI_OP_HANDLER_BYTE(bxor)
258
259 /**
260 * Handler functions for MPI_MAXLOC
261 */
262 OMPI_OP_HANDLER_2TYPE(maxloc)
263
264 /**
265 * Handler functions for MPI_MINLOC
266 */
267 OMPI_OP_HANDLER_2TYPE(minloc)
268
269 /*
270 * 3 buffer prototypes (two input and one output)
271 */
272 #define OMPI_OP_PROTO_3BUF \
273 ( void * restrict in1, void * restrict in2, void * restrict out, \
274 int *count, struct ompi_datatype_t **dtype, \
275 struct ompi_op_base_module_1_0_0_t *module)
276
277 /* C integer */
278
279 #define OMPI_OP_3BUFF_HANDLER_C_INTEGER_INTRINSIC(name) \
280 void ompi_op_base_3buff_##name##_int8_t OMPI_OP_PROTO_3BUF; \
281 void ompi_op_base_3buff_##name##_uint8_t OMPI_OP_PROTO_3BUF; \
282 void ompi_op_base_3buff_##name##_int16_t OMPI_OP_PROTO_3BUF; \
283 void ompi_op_base_3buff_##name##_uint16_t OMPI_OP_PROTO_3BUF; \
284 void ompi_op_base_3buff_##name##_int32_t OMPI_OP_PROTO_3BUF; \
285 void ompi_op_base_3buff_##name##_uint32_t OMPI_OP_PROTO_3BUF; \
286 void ompi_op_base_3buff_##name##_int64_t OMPI_OP_PROTO_3BUF; \
287 void ompi_op_base_3buff_##name##_uint64_t OMPI_OP_PROTO_3BUF;
288 #define OMPI_OP_3BUFF_HANDLER_C_INTEGER(name) \
289 OMPI_OP_3BUFF_HANDLER_C_INTEGER_INTRINSIC(name)
290
291 /* Fortran integer */
292
293 #define OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER_INTRINSIC(name) \
294 void ompi_op_base_3buff_##name##_fortran_integer OMPI_OP_PROTO_3BUF;
295 #if OMPI_HAVE_FORTRAN_INTEGER1
296 #define OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER1(name) \
297 void ompi_op_base_3buff_##name##_fortran_integer1 OMPI_OP_PROTO_3BUF;
298 #else
299 #define OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER1(name)
300 #endif
301 #if OMPI_HAVE_FORTRAN_INTEGER2
302 #define OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER2(name) \
303 void ompi_op_base_3buff_##name##_fortran_integer2 OMPI_OP_PROTO_3BUF;
304 #else
305 #define OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER2(name)
306 #endif
307 #if OMPI_HAVE_FORTRAN_INTEGER4
308 #define OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER4(name) \
309 void ompi_op_base_3buff_##name##_fortran_integer4 OMPI_OP_PROTO_3BUF;
310 #else
311 #define OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER4(name)
312 #endif
313 #if OMPI_HAVE_FORTRAN_INTEGER8
314 #define OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER8(name) \
315 void ompi_op_base_3buff_##name##_fortran_integer8 OMPI_OP_PROTO_3BUF;
316 #else
317 #define OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER8(name)
318 #endif
319 #if OMPI_HAVE_FORTRAN_INTEGER16
320 #define OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER16(name) \
321 void ompi_op_base_3buff_##name##_fortran_integer16 OMPI_OP_PROTO_3BUF;
322 #else
323 #define OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER16(name)
324 #endif
325 #define OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER(name) \
326 OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER_INTRINSIC(name) \
327 OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER1(name) \
328 OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER2(name) \
329 OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER4(name) \
330 OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER8(name) \
331 OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER16(name)
332
333 /* Floating point */
334
335 #define OMPI_OP_3BUFF_HANDLER_FLOATING_POINT_INTRINSIC(name) \
336 void ompi_op_base_3buff_##name##_float OMPI_OP_PROTO_3BUF; \
337 void ompi_op_base_3buff_##name##_double OMPI_OP_PROTO_3BUF; \
338 void ompi_op_base_3buff_##name##_fortran_real OMPI_OP_PROTO_3BUF; \
339 void ompi_op_base_3buff_##name##_fortran_double_precision OMPI_OP_PROTO_3BUF; \
340 void ompi_op_base_3buff_##name##_long_double OMPI_OP_PROTO_3BUF;
341 #if OMPI_HAVE_FORTRAN_REAL2
342 #define OMPI_OP_3BUFF_HANDLER_FLOATING_POINT_REAL2(name) \
343 void ompi_op_base_3buff_##name##_fortran_real2 OMPI_OP_PROTO_3BUF;
344 #else
345 #define OMPI_OP_3BUFF_HANDLER_FLOATING_POINT_REAL2(name)
346 #endif
347 #if OMPI_HAVE_FORTRAN_REAL4
348 #define OMPI_OP_3BUFF_HANDLER_FLOATING_POINT_REAL4(name) \
349 void ompi_op_base_3buff_##name##_fortran_real4 OMPI_OP_PROTO_3BUF;
350 #else
351 #define OMPI_OP_3BUFF_HANDLER_FLOATING_POINT_REAL4(name)
352 #endif
353 #if OMPI_HAVE_FORTRAN_REAL8
354 #define OMPI_OP_3BUFF_HANDLER_FLOATING_POINT_REAL8(name) \
355 void ompi_op_base_3buff_##name##_fortran_real8 OMPI_OP_PROTO_3BUF;
356 #else
357 #define OMPI_OP_3BUFF_HANDLER_FLOATING_POINT_REAL8(name)
358 #endif
359 #if OMPI_HAVE_FORTRAN_REAL16
360 #define OMPI_OP_3BUFF_HANDLER_FLOATING_POINT_REAL16(name) \
361 void ompi_op_base_3buff_##name##_fortran_real16 OMPI_OP_PROTO_3BUF;
362 #else
363 #define OMPI_OP_3BUFF_HANDLER_FLOATING_POINT_REAL16(name)
364 #endif
365 #define OMPI_OP_3BUFF_HANDLER_FLOATING_POINT(name) \
366 OMPI_OP_3BUFF_HANDLER_FLOATING_POINT_INTRINSIC(name) \
367 OMPI_OP_3BUFF_HANDLER_FLOATING_POINT_REAL4(name) \
368 OMPI_OP_3BUFF_HANDLER_FLOATING_POINT_REAL8(name) \
369 OMPI_OP_3BUFF_HANDLER_FLOATING_POINT_REAL16(name) \
370
371 /* Logical */
372
373 #define OMPI_OP_3BUFF_HANDLER_LOGICAL(name) \
374 void ompi_op_base_3buff_##name##_fortran_logical OMPI_OP_PROTO_3BUF; \
375 void ompi_op_base_3buff_##name##_bool OMPI_OP_PROTO_3BUF;
376
377 /* Complex */
378
379 #if OMPI_HAVE_FORTRAN_REAL
380 #define OMPI_OP_3BUFF_HANDLER_COMPLEX_INTRINSIC(name) \
381 void ompi_op_base_3buff_##name##_fortran_complex OMPI_OP_PROTO_3BUF;
382 #else
383 #define OMPI_OP_3BUFF_HANDLER_COMPLEX_INTRINSIC(name)
384 #endif
385 #if OMPI_HAVE_FORTRAN_DOUBLE_PRECISION
386 #define OMPI_OP_3BUFF_HANDLER_DOUBLE_COMPLEX_INTRINSIC(name) \
387 void ompi_op_base_3buff_##name##_fortran_double_complex OMPI_OP_PROTO_3BUF;
388 #else
389 #define OMPI_OP_3BUFF_HANDLER_DOUBLE_COMPLEX_INTRINSIC(name)
390 #endif
391 #if OMPI_HAVE_FORTRAN_REAL4
392 #define OMPI_OP_3BUFF_HANDLER_COMPLEX8(name) \
393 void ompi_op_base_3buff_##name##_fortran_complex8 OMPI_OP_PROTO_3BUF;
394 #else
395 #define OMPI_OP_3BUFF_HANDLER_COMPLEX8(name)
396 #endif
397 #if OMPI_HAVE_FORTRAN_REAL8
398 #define OMPI_OP_3BUFF_HANDLER_COMPLEX16(name) \
399 void ompi_op_base_3buff_##name##_fortran_complex16 OMPI_OP_PROTO_3BUF;
400 #else
401 #define OMPI_OP_3BUFF_HANDLER_COMPLEX16(name)
402 #endif
403 #if OMPI_HAVE_FORTRAN_REAL16
404 #define OMPI_OP_3BUFF_HANDLER_COMPLEX32(name) \
405 void ompi_op_base_3buff_##name##_fortran_complex32 OMPI_OP_PROTO_3BUF;
406 #else
407 #define OMPI_OP_3BUFF_HANDLER_COMPLEX32(name)
408 #endif
409 #define OMPI_OP_3BUFF_HANDLER_COMPLEX(name) \
410 OMPI_OP_3BUFF_HANDLER_COMPLEX_INTRINSIC(name) \
411 OMPI_OP_3BUFF_HANDLER_DOUBLE_COMPLEX_INTRINSIC(name) \
412 OMPI_OP_3BUFF_HANDLER_COMPLEX8(name) \
413 OMPI_OP_3BUFF_HANDLER_COMPLEX16(name) \
414 OMPI_OP_3BUFF_HANDLER_COMPLEX32(name)
415
416 /* Byte */
417
418 #define OMPI_OP_3BUFF_HANDLER_BYTE(name) \
419 void ompi_op_base_3buff_##name##_byte OMPI_OP_PROTO_3BUF;
420
421 /* "2 type" */
422
423 #define OMPI_OP_3BUFF_HANDLER_2TYPE(name) \
424 void ompi_op_base_3buff_##name##_2real OMPI_OP_PROTO_3BUF; \
425 void ompi_op_base_3buff_##name##_2double_precision OMPI_OP_PROTO_3BUF; \
426 void ompi_op_base_3buff_##name##_2integer OMPI_OP_PROTO_3BUF; \
427 void ompi_op_base_3buff_##name##_float_int OMPI_OP_PROTO_3BUF; \
428 void ompi_op_base_3buff_##name##_double_int OMPI_OP_PROTO_3BUF; \
429 void ompi_op_base_3buff_##name##_long_int OMPI_OP_PROTO_3BUF; \
430 void ompi_op_base_3buff_##name##_2int OMPI_OP_PROTO_3BUF; \
431 void ompi_op_base_3buff_##name##_short_int OMPI_OP_PROTO_3BUF; \
432 void ompi_op_base_3buff_##name##_long_double_int OMPI_OP_PROTO_3BUF;
433
434 /**
435 * Handler functions for MPI_MAX
436 */
437 OMPI_OP_3BUFF_HANDLER_C_INTEGER(max)
438 OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER(max)
439 OMPI_OP_3BUFF_HANDLER_FLOATING_POINT(max)
440
441 /**
442 * Handler functions for MPI_MIN
443 */
444 OMPI_OP_3BUFF_HANDLER_C_INTEGER(min)
445 OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER(min)
446 OMPI_OP_3BUFF_HANDLER_FLOATING_POINT(min)
447
448 /**
449 * Handler functions for MPI_SUM
450 */
451 OMPI_OP_3BUFF_HANDLER_C_INTEGER(sum)
452 OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER(sum)
453 OMPI_OP_3BUFF_HANDLER_FLOATING_POINT(sum)
454 OMPI_OP_3BUFF_HANDLER_COMPLEX(sum)
455
456 /**
457 * Handler functions for MPI_PROD
458 */
459 OMPI_OP_3BUFF_HANDLER_C_INTEGER(prod)
460 OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER(prod)
461 OMPI_OP_3BUFF_HANDLER_FLOATING_POINT(prod)
462 OMPI_OP_3BUFF_HANDLER_COMPLEX(prod)
463
464 /**
465 * Handler functions for MPI_LAND
466 */
467 OMPI_OP_3BUFF_HANDLER_C_INTEGER(land)
468 OMPI_OP_3BUFF_HANDLER_LOGICAL(land)
469
470 /**
471 * Handler functions for MPI_BAND
472 */
473 OMPI_OP_3BUFF_HANDLER_C_INTEGER(band)
474 OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER(band)
475 OMPI_OP_3BUFF_HANDLER_BYTE(band)
476
477 /**
478 * Handler functions for MPI_LOR
479 */
480 OMPI_OP_3BUFF_HANDLER_C_INTEGER(lor)
481 OMPI_OP_3BUFF_HANDLER_LOGICAL(lor)
482
483 /**
484 * Handler functions for MPI_BOR
485 */
486 OMPI_OP_3BUFF_HANDLER_C_INTEGER(bor)
487 OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER(bor)
488 OMPI_OP_3BUFF_HANDLER_BYTE(bor)
489
490 /**
491 * Handler functions for MPI_LXOR
492 */
493 OMPI_OP_3BUFF_HANDLER_C_INTEGER(lxor)
494 OMPI_OP_3BUFF_HANDLER_LOGICAL(lxor)
495
496 /**
497 * Handler functions for MPI_BXOR
498 */
499 OMPI_OP_3BUFF_HANDLER_C_INTEGER(bxor)
500 OMPI_OP_3BUFF_HANDLER_FORTRAN_INTEGER(bxor)
501 OMPI_OP_3BUFF_HANDLER_BYTE(bxor)
502
503 /**
504 * Handler functions for MPI_MAXLOC
505 */
506 OMPI_OP_3BUFF_HANDLER_2TYPE(maxloc)
507
508 /**
509 * Handler functions for MPI_MINLOC
510 */
511 OMPI_OP_3BUFF_HANDLER_2TYPE(minloc)
512
513 /**
514 * Globals holding all the "base" function pointers, indexed by op and
515 * datatype.
516 */
517 OMPI_DECLSPEC extern ompi_op_base_handler_fn_t
518 ompi_op_base_functions[OMPI_OP_BASE_FORTRAN_OP_MAX][OMPI_OP_BASE_TYPE_MAX];
519 OMPI_DECLSPEC extern ompi_op_base_3buff_handler_fn_t
520 ompi_op_base_3buff_functions[OMPI_OP_BASE_FORTRAN_OP_MAX][OMPI_OP_BASE_TYPE_MAX];
521
522 END_C_DECLS
523
524 #endif /* OMPI_OP_BASE_FUNCTIONS_H */
OMPI_OP_BASE_FORTRAN_OP_MAX
Maximum value.
Definition: op.h:232
OMPI_OP_BASE_TYPE_MAX
Maximum type.
Definition: op.h:193
op.h
MPI_Op back-end operation framework.