openmpi  3.1.6
About: Open MPI is a high performance Message Passing Interface (MPI) library project combining technologies and resources from several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in order to build the best MPI library available. 3.x series.
  Fossies Dox: openmpi-3.1.6.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

op.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Mellanox Technologies, Inc.
3  * All rights reserved.
4  * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
5  * Copyright (c) 2015 Research Organization for Information Science
6  * and Technology (RIST). All rights reserved.
7  * $COPYRIGHT$
8  *
9  * Additional copyrights may follow
10  *
11  * $HEADER$
12  */
13 
14 #include "oshmem_config.h"
15 #include <complex.h>
16 
18 
21 
22 #include "oshmem/constants.h"
23 #include "oshmem/op/op.h"
24 
25 /*
26  * Table for op handle conversion
27  */
29 
30 /*
31  * Class information
32  */
33 static void oshmem_op_construct(oshmem_op_t *object);
34 static void oshmem_op_destruct(oshmem_op_t *object);
35 
36 /*
37  * Class instance
38  */
43 
44 /*
45  * Intrinsic Operation objects
46  */
47 /* Bitwise AND */
58 
59 /* Bitwise OR */
70 
71 /* Bitwise XOR */
82 
83 /* MAX */
100 
101 /* MIN */
118 
119 /* SUM */
138 
139 /* PROD */
158 
159 #define FUNC_OP_CREATE(name, type_name, type, calc) \
160  void oshmem_op_##name##_##type_name##_func(void *in, void *out, int count); \
161  void oshmem_op_##name##_##type_name##_func(void *in, void *out, int count) \
162  { \
163  int i; \
164  type *a = (type *) in; \
165  type *b = (type *) out; \
166  for (i = 0; i < count; ++i) { \
167  *(b) = calc(*(b), *(a)); \
168  ++b; \
169  ++a; \
170  } \
171  }
172 
173 #define OBJ_OP_CREATE(name, type_name, type, op_id, dt_id) \
174  oshmem_op_##name##_##type_name = OBJ_NEW(oshmem_op_t); \
175  if (oshmem_op_##name##_##type_name) \
176  { \
177  oshmem_op_##name##_##type_name->op = op_id; \
178  oshmem_op_##name##_##type_name->dt = dt_id; \
179  oshmem_op_##name##_##type_name->dt_size = sizeof(type); \
180  oshmem_op_##name##_##type_name->o_func.c_fn = oshmem_op_##name##_##type_name##_func; \
181  } \
182 
183 /* Bitwise AND */
184 #define __and_op(a, b) ((a) & (b))
185 FUNC_OP_CREATE(and, short, short, __and_op)
186 FUNC_OP_CREATE(and, int, int, __and_op)
187 FUNC_OP_CREATE(and, long, long, __and_op)
188 FUNC_OP_CREATE(and, longlong, long long, __and_op)
189 FUNC_OP_CREATE(and, fint2, ompi_fortran_integer4_t, __and_op)
190 FUNC_OP_CREATE(and, fint4, ompi_fortran_integer4_t, __and_op)
191 FUNC_OP_CREATE(and, fint8, ompi_fortran_integer8_t, __and_op)
192 FUNC_OP_CREATE(and, int16, int16_t, __and_op)
193 FUNC_OP_CREATE(and, int32, int32_t, __and_op)
194 FUNC_OP_CREATE(and, int64, int64_t, __and_op)
195 
196 /* Bitwise OR */
197 #define __or_op(a, b) ((a) | (b))
198 FUNC_OP_CREATE(or, short, short, __or_op)
199 FUNC_OP_CREATE(or, int, int, __or_op)
200 FUNC_OP_CREATE(or, long, long, __or_op)
201 FUNC_OP_CREATE(or, longlong, long long, __or_op)
202 FUNC_OP_CREATE(or, fint2, ompi_fortran_integer2_t, __or_op)
203 FUNC_OP_CREATE(or, fint4, ompi_fortran_integer4_t, __or_op)
204 FUNC_OP_CREATE(or, fint8, ompi_fortran_integer8_t, __or_op)
205 FUNC_OP_CREATE(or, int16, int16_t, __or_op)
206 FUNC_OP_CREATE(or, int32, int32_t, __or_op)
207 FUNC_OP_CREATE(or, int64, int64_t, __or_op)
208 
209 /* Bitwise XOR */
210 #define __xor_op(a, b) ((a) ^ (b))
211 FUNC_OP_CREATE(xor, short, short, __xor_op)
212 FUNC_OP_CREATE(xor, int, int, __xor_op)
213 FUNC_OP_CREATE(xor, long, long, __xor_op)
214 FUNC_OP_CREATE(xor, longlong, long long, __xor_op)
215 FUNC_OP_CREATE(xor, fint2, ompi_fortran_integer4_t, __xor_op)
216 FUNC_OP_CREATE(xor, fint4, ompi_fortran_integer4_t, __xor_op)
217 FUNC_OP_CREATE(xor, fint8, ompi_fortran_integer8_t, __xor_op)
218 FUNC_OP_CREATE(xor, int16, int16_t, __xor_op)
219 FUNC_OP_CREATE(xor, int32, int32_t, __xor_op)
220 FUNC_OP_CREATE(xor, int64, int64_t, __xor_op)
221 
222 /* MAX */
223 #define __max_op(a, b) ((a) > (b) ? (a) : (b))
224 FUNC_OP_CREATE(max, short, short, __max_op)
227 FUNC_OP_CREATE(max, longlong, long long, __max_op)
228 FUNC_OP_CREATE(max, float, float, __max_op)
229 FUNC_OP_CREATE(max, double, double, __max_op)
230 FUNC_OP_CREATE(max, longdouble, long double, __max_op)
231 FUNC_OP_CREATE(max, fint2, ompi_fortran_integer4_t, __max_op)
232 FUNC_OP_CREATE(max, fint4, ompi_fortran_integer4_t, __max_op)
233 FUNC_OP_CREATE(max, fint8, ompi_fortran_integer8_t, __max_op)
234 FUNC_OP_CREATE(max, freal4, ompi_fortran_real4_t, __max_op)
235 FUNC_OP_CREATE(max, freal8, ompi_fortran_real8_t, __max_op)
236 #if OMPI_HAVE_FORTRAN_REAL16
237 FUNC_OP_CREATE(max, freal16, ompi_fortran_real16_t, __max_op)
238 #endif
239 FUNC_OP_CREATE(max, int16, int16_t, __max_op)
240 FUNC_OP_CREATE(max, int32, int32_t, __max_op)
241 FUNC_OP_CREATE(max, int64, int64_t, __max_op)
242 
243 /* MIN */
244 #define __min_op(a, b) ((a) < (b) ? (a) : (b))
245 FUNC_OP_CREATE(min, short, short, __min_op)
248 FUNC_OP_CREATE(min, longlong, long long, __min_op)
249 FUNC_OP_CREATE(min, float, float, __min_op)
250 FUNC_OP_CREATE(min, double, double, __min_op)
251 FUNC_OP_CREATE(min, longdouble, long double, __min_op)
252 FUNC_OP_CREATE(min, fint2, ompi_fortran_integer4_t, __min_op)
253 FUNC_OP_CREATE(min, fint4, ompi_fortran_integer4_t, __min_op)
254 FUNC_OP_CREATE(min, fint8, ompi_fortran_integer8_t, __min_op)
255 FUNC_OP_CREATE(min, freal4, ompi_fortran_real4_t, __min_op)
256 FUNC_OP_CREATE(min, freal8, ompi_fortran_real8_t, __min_op)
257 #if OMPI_HAVE_FORTRAN_REAL16
258 FUNC_OP_CREATE(min, freal16, ompi_fortran_real16_t, __min_op)
259 #endif
260 FUNC_OP_CREATE(min, int16, int16_t, __min_op)
261 FUNC_OP_CREATE(min, int32, int32_t, __min_op)
262 FUNC_OP_CREATE(min, int64, int64_t, __min_op)
263 
264 /* SUM */
265 #define __sum_op(a, b) ((a) + (b))
266 FUNC_OP_CREATE(sum, short, short, __sum_op)
267 FUNC_OP_CREATE(sum, int, int, __sum_op)
268 FUNC_OP_CREATE(sum, long, long, __sum_op)
269 FUNC_OP_CREATE(sum, longlong, long long, __sum_op)
270 FUNC_OP_CREATE(sum, float, float, __sum_op)
271 FUNC_OP_CREATE(sum, double, double, __sum_op)
272 FUNC_OP_CREATE(sum, longdouble, long double, __sum_op)
273 FUNC_OP_CREATE(sum, complexf, float complex, __sum_op)
274 FUNC_OP_CREATE(sum, complexd, double complex, __sum_op)
275 FUNC_OP_CREATE(sum, fint2, ompi_fortran_integer4_t, __sum_op)
276 FUNC_OP_CREATE(sum, fint4, ompi_fortran_integer4_t, __sum_op)
277 FUNC_OP_CREATE(sum, fint8, ompi_fortran_integer8_t, __sum_op)
278 FUNC_OP_CREATE(sum, freal4, ompi_fortran_real4_t, __sum_op)
279 FUNC_OP_CREATE(sum, freal8, ompi_fortran_real8_t, __sum_op)
280 #if OMPI_HAVE_FORTRAN_REAL16
281 FUNC_OP_CREATE(sum, freal16, ompi_fortran_real16_t, __sum_op)
282 #endif
283 FUNC_OP_CREATE(sum, int16, int16_t, __sum_op)
284 FUNC_OP_CREATE(sum, int32, int32_t, __sum_op)
285 FUNC_OP_CREATE(sum, int64, int64_t, __sum_op)
286 
287 /* PROD */
288 #define __prod_op(a, b) ((a) * (b))
289 FUNC_OP_CREATE(prod, short, short, __prod_op)
290 FUNC_OP_CREATE(prod, int, int, __prod_op)
291 FUNC_OP_CREATE(prod, long, long, __prod_op)
292 FUNC_OP_CREATE(prod, longlong, long long, __prod_op)
293 FUNC_OP_CREATE(prod, float, float, __prod_op)
294 FUNC_OP_CREATE(prod, double, double, __prod_op)
295 FUNC_OP_CREATE(prod, longdouble, long double, __prod_op)
296 FUNC_OP_CREATE(prod, complexf, float complex, __prod_op)
297 FUNC_OP_CREATE(prod, complexd, double complex, __prod_op)
298 FUNC_OP_CREATE(prod, fint2, ompi_fortran_integer2_t, __prod_op)
299 FUNC_OP_CREATE(prod, fint4, ompi_fortran_integer4_t, __prod_op)
300 FUNC_OP_CREATE(prod, fint8, ompi_fortran_integer8_t, __prod_op)
301 FUNC_OP_CREATE(prod, freal4, ompi_fortran_real4_t, __prod_op)
302 FUNC_OP_CREATE(prod, freal8, ompi_fortran_real8_t, __prod_op)
303 #if OMPI_HAVE_FORTRAN_REAL16
304 FUNC_OP_CREATE(prod, freal16, ompi_fortran_real16_t, __prod_op)
305 #endif
306 FUNC_OP_CREATE(prod, int16, int16_t, __prod_op)
307 FUNC_OP_CREATE(prod, int32, int32_t, __prod_op)
308 FUNC_OP_CREATE(prod, int64, int64_t, __prod_op)
309 
310 int oshmem_op_init(void)
311 {
312 
313  /* Setup operation array */
315  if (OPAL_SUCCESS
317  0,
319  1)) {
320  return OSHMEM_ERROR;
321  }
322 
323  /* Bitwise AND */
324  OBJ_OP_CREATE(and, short, short, OSHMEM_OP_AND, OSHMEM_OP_TYPE_SHORT);
327  OBJ_OP_CREATE(and, longlong, long long, OSHMEM_OP_AND, OSHMEM_OP_TYPE_LLONG);
328  OBJ_OP_CREATE(and, fint2, ompi_fortran_integer2_t, OSHMEM_OP_AND, OSHMEM_OP_TYPE_FINT2);
329  OBJ_OP_CREATE(and, fint4, ompi_fortran_integer4_t, OSHMEM_OP_AND, OSHMEM_OP_TYPE_FINT4);
330  OBJ_OP_CREATE(and, fint8, ompi_fortran_integer8_t, OSHMEM_OP_AND, OSHMEM_OP_TYPE_FINT8);
331  OBJ_OP_CREATE(and, int16, int16_t, OSHMEM_OP_AND, OSHMEM_OP_TYPE_INT16_T);
332  OBJ_OP_CREATE(and, int32, int32_t, OSHMEM_OP_AND, OSHMEM_OP_TYPE_INT32_T);
333  OBJ_OP_CREATE(and, int64, int64_t, OSHMEM_OP_AND, OSHMEM_OP_TYPE_INT64_T);
334 
335  /* Bitwise OR */
336  OBJ_OP_CREATE(or, short, short, OSHMEM_OP_OR, OSHMEM_OP_TYPE_SHORT);
339  OBJ_OP_CREATE(or, longlong, long long, OSHMEM_OP_OR, OSHMEM_OP_TYPE_LLONG);
340  OBJ_OP_CREATE(or, fint2, ompi_fortran_integer2_t, OSHMEM_OP_OR, OSHMEM_OP_TYPE_FINT2);
341  OBJ_OP_CREATE(or, fint4, ompi_fortran_integer4_t, OSHMEM_OP_OR, OSHMEM_OP_TYPE_FINT4);
342  OBJ_OP_CREATE(or, fint8, ompi_fortran_integer8_t, OSHMEM_OP_OR, OSHMEM_OP_TYPE_FINT8);
343  OBJ_OP_CREATE(or, int16, int16_t, OSHMEM_OP_OR, OSHMEM_OP_TYPE_INT16_T);
344  OBJ_OP_CREATE(or, int32, int32_t, OSHMEM_OP_OR, OSHMEM_OP_TYPE_INT32_T);
345  OBJ_OP_CREATE(or, int64, int64_t, OSHMEM_OP_OR, OSHMEM_OP_TYPE_INT64_T);
346 
347  /* Bitwise XOR */
348  OBJ_OP_CREATE(xor, short, short, OSHMEM_OP_XOR, OSHMEM_OP_TYPE_SHORT);
351  OBJ_OP_CREATE(xor, longlong, long long, OSHMEM_OP_XOR, OSHMEM_OP_TYPE_LLONG);
352  OBJ_OP_CREATE(xor, fint2, ompi_fortran_integer2_t, OSHMEM_OP_XOR, OSHMEM_OP_TYPE_FINT2);
353  OBJ_OP_CREATE(xor, fint4, ompi_fortran_integer4_t, OSHMEM_OP_XOR, OSHMEM_OP_TYPE_FINT4);
354  OBJ_OP_CREATE(xor, fint8, ompi_fortran_integer8_t, OSHMEM_OP_XOR, OSHMEM_OP_TYPE_FINT8);
355  OBJ_OP_CREATE(xor, int16, int16_t, OSHMEM_OP_XOR, OSHMEM_OP_TYPE_INT16_T);
356  OBJ_OP_CREATE(xor, int32, int32_t, OSHMEM_OP_XOR, OSHMEM_OP_TYPE_INT32_T);
357  OBJ_OP_CREATE(xor, int64, int64_t, OSHMEM_OP_XOR, OSHMEM_OP_TYPE_INT64_T);
358 
359  /* MAX */
363  OBJ_OP_CREATE(max, longlong, long long, OSHMEM_OP_MAX, OSHMEM_OP_TYPE_LLONG);
366  OBJ_OP_CREATE(max, longdouble, long double, OSHMEM_OP_MAX, OSHMEM_OP_TYPE_LDOUBLE);
367  OBJ_OP_CREATE(max, fint2, ompi_fortran_integer2_t, OSHMEM_OP_MAX, OSHMEM_OP_TYPE_FINT2);
368  OBJ_OP_CREATE(max, fint4, ompi_fortran_integer4_t, OSHMEM_OP_MAX, OSHMEM_OP_TYPE_FINT4);
369  OBJ_OP_CREATE(max, fint8, ompi_fortran_integer8_t, OSHMEM_OP_MAX, OSHMEM_OP_TYPE_FINT8);
370  OBJ_OP_CREATE(max, freal4, ompi_fortran_real4_t, OSHMEM_OP_MAX, OSHMEM_OP_TYPE_FREAL4);
371  OBJ_OP_CREATE(max, freal8, ompi_fortran_real8_t, OSHMEM_OP_MAX, OSHMEM_OP_TYPE_FREAL8);
372 #if OMPI_HAVE_FORTRAN_REAL16
373  OBJ_OP_CREATE(max, freal16, ompi_fortran_real16_t, OSHMEM_OP_MAX, OSHMEM_OP_TYPE_FREAL16);
374 #endif
378 
379  /* MIN */
383  OBJ_OP_CREATE(min, longlong, long long, OSHMEM_OP_MIN, OSHMEM_OP_TYPE_LLONG);
386  OBJ_OP_CREATE(min, longdouble, long double, OSHMEM_OP_MIN, OSHMEM_OP_TYPE_LDOUBLE);
387  OBJ_OP_CREATE(min, fint2, ompi_fortran_integer2_t, OSHMEM_OP_MIN, OSHMEM_OP_TYPE_FINT2);
388  OBJ_OP_CREATE(min, fint4, ompi_fortran_integer4_t, OSHMEM_OP_MIN, OSHMEM_OP_TYPE_FINT4);
389  OBJ_OP_CREATE(min, fint8, ompi_fortran_integer8_t, OSHMEM_OP_MIN, OSHMEM_OP_TYPE_FINT8);
390  OBJ_OP_CREATE(min, freal4, ompi_fortran_real4_t, OSHMEM_OP_MIN, OSHMEM_OP_TYPE_FREAL4);
391  OBJ_OP_CREATE(min, freal8, ompi_fortran_real8_t, OSHMEM_OP_MIN, OSHMEM_OP_TYPE_FREAL8);
392 #if OMPI_HAVE_FORTRAN_REAL16
393  OBJ_OP_CREATE(min, freal16, ompi_fortran_real16_t, OSHMEM_OP_MIN, OSHMEM_OP_TYPE_FREAL16);
394 #endif
398 
399  /* SUM */
400  OBJ_OP_CREATE(sum, short, short, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_SHORT);
403  OBJ_OP_CREATE(sum, longlong, long long, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_LLONG);
404  OBJ_OP_CREATE(sum, float, float, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_FLOAT);
405  OBJ_OP_CREATE(sum, double, double, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_DOUBLE);
406  OBJ_OP_CREATE(sum, longdouble, long double, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_LDOUBLE);
407  OBJ_OP_CREATE(sum, complexf, float complex, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_FCOMPLEX);
408  OBJ_OP_CREATE(sum, complexd, double complex, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_DCOMPLEX);
409  OBJ_OP_CREATE(sum, fint2, ompi_fortran_integer2_t, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_FINT2);
410  OBJ_OP_CREATE(sum, fint4, ompi_fortran_integer4_t, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_FINT4);
411  OBJ_OP_CREATE(sum, fint8, ompi_fortran_integer8_t, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_FINT8);
412  OBJ_OP_CREATE(sum, freal4, ompi_fortran_real4_t, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_FREAL4);
413  OBJ_OP_CREATE(sum, freal8, ompi_fortran_real8_t, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_FREAL8);
414 #if OMPI_HAVE_FORTRAN_REAL16
415  OBJ_OP_CREATE(sum, freal16, ompi_fortran_real16_t, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_FREAL16);
416 #endif
417  OBJ_OP_CREATE(sum, int16, int16_t, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_INT16_T);
418  OBJ_OP_CREATE(sum, int32, int32_t, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_INT32_T);
419  OBJ_OP_CREATE(sum, int64, int64_t, OSHMEM_OP_SUM, OSHMEM_OP_TYPE_INT64_T);
420 
421  /* PROD */
422  OBJ_OP_CREATE(prod, short, short, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_SHORT);
425  OBJ_OP_CREATE(prod, longlong, long long, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_LLONG);
426  OBJ_OP_CREATE(prod, float, float, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_FLOAT);
427  OBJ_OP_CREATE(prod, double, double, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_DOUBLE);
428  OBJ_OP_CREATE(prod, longdouble, long double, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_LDOUBLE);
429  OBJ_OP_CREATE(prod, complexf, float complex, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_FCOMPLEX);
430  OBJ_OP_CREATE(prod, complexd, double complex, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_DCOMPLEX);
431  OBJ_OP_CREATE(prod, fint2, ompi_fortran_integer2_t, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_FINT2);
432  OBJ_OP_CREATE(prod, fint4, ompi_fortran_integer4_t, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_FINT4);
433  OBJ_OP_CREATE(prod, fint8, ompi_fortran_integer8_t, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_FINT8);
434  OBJ_OP_CREATE(prod, freal4, ompi_fortran_real4_t, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_FREAL4);
435  OBJ_OP_CREATE(prod, freal8, ompi_fortran_real8_t, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_FREAL8);
436 #if OMPI_HAVE_FORTRAN_REAL16
437  OBJ_OP_CREATE(prod, freal16, ompi_fortran_real16_t, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_FREAL16);
438 #endif
439  OBJ_OP_CREATE(prod, int16, int16_t, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_INT16_T);
440  OBJ_OP_CREATE(prod, int32, int32_t, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_INT32_T);
441  OBJ_OP_CREATE(prod, int64, int64_t, OSHMEM_OP_PROD, OSHMEM_OP_TYPE_INT64_T);
442 
443  return OSHMEM_SUCCESS;
444 }
445 
446 int oshmem_op_finalize(void)
447 {
448  int max, i;
449  oshmem_op_t *op;
450 
451  /* Check whether we have some left */
453  for (i = 0; i < max; i++) {
455  if (NULL != op) {
456  OBJ_RELEASE(op);
457  }
458  }
459 
461 
462  return OSHMEM_SUCCESS;
463 }
464 
465 
471 /*
472  * Op constructor
473  */
474 static void oshmem_op_construct(oshmem_op_t *object)
475 {
476  object->id = opal_pointer_array_add(&oshmem_op_array, object);
477 }
478 
479 /*
480  * Op destructor
481  */
482 static void oshmem_op_destruct(oshmem_op_t *object)
483 {
486  }
487 }
oshmem_op_xor_longlong
oshmem_op_t * oshmem_op_xor_longlong
Definition: op.c:75
oshmem_op_prod_complexf
oshmem_op_t * oshmem_op_prod_complexf
Definition: op.c:147
OSHMEM_OP_TYPE_LLONG
@ OSHMEM_OP_TYPE_LLONG
C integer: long.
Definition: op.h:35
oshmem_op_min_short
oshmem_op_t * oshmem_op_min_short
Definition: op.c:102
oshmem_op_sum_double
oshmem_op_t * oshmem_op_sum_double
Definition: op.c:125
oshmem_op_max_float
oshmem_op_t * oshmem_op_max_float
Definition: op.c:88
oshmem_op_finalize
int oshmem_op_finalize(void)
Finalize the op interface.
Definition: op.c:393
oshmem_op_max_double
oshmem_op_t * oshmem_op_max_double
Definition: op.c:89
oshmem_op_min_longdouble
oshmem_op_t * oshmem_op_min_longdouble
Definition: op.c:108
oshmem_op_min_float
oshmem_op_t * oshmem_op_min_float
Definition: op.c:106
OBJ_CONSTRUCT
#define OBJ_CONSTRUCT(object, type)
Construct (initialize) objects that are not dynamically allocated.
Definition: opal_object.h:356
OSHMEM_OP_MIN
@ OSHMEM_OP_MIN
MAX.
Definition: op.h:66
oshmem_op_and_int32
oshmem_op_t * oshmem_op_and_int32
Definition: op.c:56
oshmem_op_and_long
oshmem_op_t * oshmem_op_and_long
Definition: op.c:50
oshmem_op_prod_longlong
oshmem_op_t * oshmem_op_prod_longlong
Definition: op.c:143
opal_pointer_array.h
OSHMEM_OP_AND
@ OSHMEM_OP_AND
Definition: op.h:62
orte_globals.h
oshmem_op_init
iint oshmem_op_init(void)
Initialize the op interface.
Definition: op.c:257
oshmem_op_min_int
oshmem_op_t * oshmem_op_min_int
Definition: op.c:103
oshmem_op_max_short
oshmem_op_t * oshmem_op_max_short
Definition: op.c:84
oshmem_op_xor_short
oshmem_op_t * oshmem_op_xor_short
Definition: op.c:72
oshmem_op_sum_int64
oshmem_op_t * oshmem_op_sum_int64
Definition: op.c:137
oshmem_op_prod_longdouble
oshmem_op_t * oshmem_op_prod_longdouble
Definition: op.c:146
oshmem_op_xor_int64
oshmem_op_t * oshmem_op_xor_int64
Definition: op.c:81
oshmem_op_and_int64
oshmem_op_t * oshmem_op_and_int64
Definition: op.c:57
oshmem_op_prod_fint2
oshmem_op_t * oshmem_op_prod_fint2
Definition: op.c:149
__sum_op
#define __sum_op(a, b)
Definition: op.c:232
OBJ_DESTRUCT
#define OBJ_DESTRUCT(object)
Destruct (finalize) an object that is not dynamically allocated.
Definition: opal_object.h:388
oshmem_op_or_int64
oshmem_op_t * oshmem_op_or_int64
Definition: op.c:69
oshmem_op_max_freal4
oshmem_op_t * oshmem_op_max_freal4
Definition: op.c:94
OSHMEM_OP_TYPE_LDOUBLE
@ OSHMEM_OP_TYPE_LDOUBLE
Floating point: double.
Definition: op.h:42
__prod_op
#define __prod_op(a, b)
Definition: op.c:245
oshmem_op_sum_short
oshmem_op_t * oshmem_op_sum_short
Definition: op.c:120
oshmem_op_min_long
oshmem_op_t * oshmem_op_min_long
Definition: op.c:104
oshmem_op_or_fint2
oshmem_op_t * oshmem_op_or_fint2
Definition: op.c:64
oshmem_op_max_int
oshmem_op_t * oshmem_op_max_int
Definition: op.c:85
oshmem_op_max_longlong
oshmem_op_t * oshmem_op_max_longlong
Definition: op.c:87
oshmem_op_xor_int
oshmem_op_t * oshmem_op_xor_int
Definition: op.c:73
oshmem_op_or_int
oshmem_op_t * oshmem_op_or_int
Definition: op.c:61
oshmem_op_prod_long
oshmem_op_t * oshmem_op_prod_long
Definition: op.c:142
oshmem_op_prod_int
oshmem_op_t * oshmem_op_prod_int
Definition: op.c:141
OBJ_OP_CREATE
#define OBJ_OP_CREATE(name, type_name, type, op_id, dt_id)
Definition: op.c:173
opal_object_t
Base object.
Definition: opal_object.h:194
oshmem_op_max_int32
oshmem_op_t * oshmem_op_max_int32
Definition: op.c:98
oshmem_op_prod_int32
oshmem_op_t * oshmem_op_prod_int32
Definition: op.c:156
oshmem_op_sum_longdouble
oshmem_op_t * oshmem_op_sum_longdouble
Definition: op.c:126
oshmem_op_sum_fint4
oshmem_op_t * oshmem_op_sum_fint4
Definition: op.c:130
OSHMEM_OP_TYPE_INT32_T
@ OSHMEM_OP_TYPE_INT32_T
C integer: int16_t.
Definition: op.h:37
OSHMEM_OP_MAX
@ OSHMEM_OP_MAX
XOR.
Definition: op.h:65
OSHMEM_OP_TYPE_INT64_T
@ OSHMEM_OP_TYPE_INT64_T
C integer: int32_t.
Definition: op.h:38
OSHMEM_OP_TYPE_FINT4
@ OSHMEM_OP_TYPE_FINT4
Fortran integer: int2.
Definition: op.h:48
oshmem_op_and_fint4
oshmem_op_t * oshmem_op_and_fint4
Definition: op.c:53
oshmem_op_destruct
static void oshmem_op_destruct(oshmem_op_t *object)
Definition: op.c:429
oshmem_op_min_int32
oshmem_op_t * oshmem_op_min_int32
Definition: op.c:116
FUNC_OP_CREATE
#define FUNC_OP_CREATE(name, type_name, type, calc)
Definition: op.c:159
oshmem_op_xor_fint4
oshmem_op_t * oshmem_op_xor_fint4
Definition: op.c:77
oshmem_op_sum_int32
oshmem_op_t * oshmem_op_sum_int32
Definition: op.c:136
OSHMEM_OP_XOR
@ OSHMEM_OP_XOR
OR.
Definition: op.h:64
oshmem_op_and_fint2
oshmem_op_t * oshmem_op_and_fint2
Definition: op.c:52
oshmem_op_sum_freal16
oshmem_op_t * oshmem_op_sum_freal16
Definition: op.c:134
oshmem_op_sum_long
oshmem_op_t * oshmem_op_sum_long
Definition: op.c:122
oshmem_op_prod_int64
oshmem_op_t * oshmem_op_prod_int64
Definition: op.c:157
oshmem_op_min_fint2
oshmem_op_t * oshmem_op_min_fint2
Definition: op.c:109
OSHMEM_OP_TYPE_FINT8
@ OSHMEM_OP_TYPE_FINT8
Fortran integer: int4.
Definition: op.h:49
oshmem_op_or_int16
oshmem_op_t * oshmem_op_or_int16
Definition: op.c:67
OSHMEM_OP_TYPE_INT
@ OSHMEM_OP_TYPE_INT
C integer: short.
Definition: op.h:33
oshmem_op_max_freal8
oshmem_op_t * oshmem_op_max_freal8
Definition: op.c:95
max
#define max(a, b)
Definition: mtl_mxm.c:143
OSHMEM_ERROR
@ OSHMEM_ERROR
Definition: constants.h:26
oshmem_op_xor_int32
oshmem_op_t * oshmem_op_xor_int32
Definition: op.c:80
OSHMEM_OP_OR
@ OSHMEM_OP_OR
AND.
Definition: op.h:63
op.h
__or_op
#define __or_op(a, b)
oshmem_op_or_longlong
oshmem_op_t * oshmem_op_or_longlong
Definition: op.c:63
oshmem_op_sum_fint2
oshmem_op_t * oshmem_op_sum_fint2
Definition: op.c:129
oshmem_op_min_fint4
oshmem_op_t * oshmem_op_min_fint4
Definition: op.c:110
OSHMEM_OP_TYPE_LONG
@ OSHMEM_OP_TYPE_LONG
C integer: int.
Definition: op.h:34
opal_pointer_array_get_size
static int opal_pointer_array_get_size(opal_pointer_array_t *array)
Get the size of the pointer array.
Definition: opal_pointer_array.h:150
oshmem_op_max_fint4
oshmem_op_t * oshmem_op_max_fint4
Definition: op.c:92
opal_pointer_array_set_item
int opal_pointer_array_set_item(opal_pointer_array_t *table, int index, void *value)
Set the value of the dynamic array at a specified location.
Definition: opal_pointer_array.c:271
oshmem_op_min_double
oshmem_op_t * oshmem_op_min_double
Definition: op.c:107
oshmem_op_prod_freal8
oshmem_op_t * oshmem_op_prod_freal8
Definition: op.c:153
oshmem_op_min_freal8
oshmem_op_t * oshmem_op_min_freal8
Definition: op.c:113
oshmem_op_prod_float
oshmem_op_t * oshmem_op_prod_float
Definition: op.c:144
oshmem_op_min_int16
oshmem_op_t * oshmem_op_min_int16
Definition: op.c:115
oshmem_op_xor_fint2
oshmem_op_t * oshmem_op_xor_fint2
Definition: op.c:76
oshmem_op_min_longlong
oshmem_op_t * oshmem_op_min_longlong
Definition: op.c:105
oshmem_op_min_fint8
oshmem_op_t * oshmem_op_min_fint8
Definition: op.c:111
oshmem_op_max_longdouble
oshmem_op_t * oshmem_op_max_longdouble
Definition: op.c:90
oshmem_op_max_long
oshmem_op_t * oshmem_op_max_long
Definition: op.c:86
min
#define min(a, b)
Definition: coll_portals4.h:359
oshmem_op_and_fint8
oshmem_op_t * oshmem_op_and_fint8
Definition: op.c:54
oshmem_op_max_fint2
oshmem_op_t * oshmem_op_max_fint2
Definition: op.c:91
OSHMEM_OP_TYPE_FLOAT
@ OSHMEM_OP_TYPE_FLOAT
C integer: int64_t.
Definition: op.h:40
__and_op
#define __and_op(a, b)
Definition: op.c:184
oshmem_op_prod_freal16
oshmem_op_t * oshmem_op_prod_freal16
Definition: op.c:154
opal_datatype_internal.h
OSHMEM_SUCCESS
@ OSHMEM_SUCCESS
Definition: constants.h:24
oshmem_op_sum_complexd
oshmem_op_t * oshmem_op_sum_complexd
Definition: op.c:128
opal_pointer_array_add
int opal_pointer_array_add(opal_pointer_array_t *table, void *ptr)
add a pointer to dynamic pointer table
Definition: opal_pointer_array.c:220
opal_pointer_array_init
int opal_pointer_array_init(opal_pointer_array_t *array, int initial_allocation, int max_size, int block_size)
initialize an array object
Definition: opal_pointer_array.c:178
oshmem_op_sum_complexf
oshmem_op_t * oshmem_op_sum_complexf
Definition: op.c:127
oshmem_op_sum_int
oshmem_op_t * oshmem_op_sum_int
Definition: op.c:121
OPAL_SUCCESS
@ OPAL_SUCCESS
Definition: constants.h:29
oshmem_op_xor_long
oshmem_op_t * oshmem_op_xor_long
Definition: op.c:74
oshmem_op_prod_complexd
oshmem_op_t * oshmem_op_prod_complexd
Definition: op.c:148
oshmem_op_prod_fint4
oshmem_op_t * oshmem_op_prod_fint4
Definition: op.c:150
oshmem_op_t
Back-end type of OSHMEM reduction operations.
Definition: op.h:79
oshmem_op_max_int16
oshmem_op_t * oshmem_op_max_int16
Definition: op.c:97
oshmem_op_and_int16
oshmem_op_t * oshmem_op_and_int16
Definition: op.c:55
oshmem_op_and_short
oshmem_op_t * oshmem_op_and_short
Definition: op.c:48
constants.h
oshmem_op_prod_short
oshmem_op_t * oshmem_op_prod_short
Definition: op.c:140
ORTE_GLOBAL_ARRAY_MAX_SIZE
#define ORTE_GLOBAL_ARRAY_MAX_SIZE
Definition: orte_globals.h:145
oshmem_op_and_longlong
oshmem_op_t * oshmem_op_and_longlong
Definition: op.c:51
OBJ_CLASS_INSTANCE
OBJ_CLASS_INSTANCE(ompi_op_t, opal_object_t, ompi_op_construct, ompi_op_destruct)
oshmem_op_prod_freal4
oshmem_op_t * oshmem_op_prod_freal4
Definition: op.c:152
oshmem_op_min_freal4
oshmem_op_t * oshmem_op_min_freal4
Definition: op.c:112
oshmem_op_or_int32
oshmem_op_t * oshmem_op_or_int32
Definition: op.c:68
oshmem_op_max_int64
oshmem_op_t * oshmem_op_max_int64
Definition: op.c:99
oshmem_op_min_freal16
oshmem_op_t * oshmem_op_min_freal16
Definition: op.c:114
OSHMEM_OP_TYPE_FREAL4
@ OSHMEM_OP_TYPE_FREAL4
Fortran integer: int8.
Definition: op.h:50
oshmem_op_min_int64
oshmem_op_t * oshmem_op_min_int64
Definition: op.c:117
oshmem_op_sum_fint8
oshmem_op_t * oshmem_op_sum_fint8
Definition: op.c:131
opal_pointer_array_t
dynamic pointer array
Definition: opal_pointer_array.h:43
oshmem_op_xor_int16
oshmem_op_t * oshmem_op_xor_int16
Definition: op.c:79
oshmem_op_construct
static void oshmem_op_construct(oshmem_op_t *object)
Static functions.
Definition: op.c:421
oshmem_op_sum_freal4
oshmem_op_t * oshmem_op_sum_freal4
Definition: op.c:132
opal_pointer_array_get_item
static void * opal_pointer_array_get_item(opal_pointer_array_t *table, int element_index)
Get the value of an element in array.
Definition: opal_pointer_array.h:125
oshmem_config.h
oshmem_op_prod_double
oshmem_op_t * oshmem_op_prod_double
Definition: op.c:145
OSHMEM_OP_TYPE_SHORT
@ OSHMEM_OP_TYPE_SHORT
Definition: op.h:32
oshmem_op_max_freal16
oshmem_op_t * oshmem_op_max_freal16
Definition: op.c:96
__max_op
#define __max_op(a, b)
OSHMEM_OP_TYPE_FREAL8
@ OSHMEM_OP_TYPE_FREAL8
Fortran integer: real4.
Definition: op.h:51
oshmem_op_and_int
oshmem_op_t * oshmem_op_and_int
Definition: op.c:49
oshmem_op_sum_freal8
oshmem_op_t * oshmem_op_sum_freal8
Definition: op.c:133
oshmem_op_max_fint8
oshmem_op_t * oshmem_op_max_fint8
Definition: op.c:93
oshmem_op_sum_int16
oshmem_op_t * oshmem_op_sum_int16
Definition: op.c:135
OSHMEM_OP_TYPE_INT16_T
@ OSHMEM_OP_TYPE_INT16_T
C integer: long long.
Definition: op.h:36
oshmem_op_sum_float
oshmem_op_t * oshmem_op_sum_float
Definition: op.c:124
OSHMEM_OP_TYPE_FCOMPLEX
@ OSHMEM_OP_TYPE_FCOMPLEX
Floating point: long double.
Definition: op.h:44
OSHMEM_OP_TYPE_DOUBLE
@ OSHMEM_OP_TYPE_DOUBLE
Floating point: float.
Definition: op.h:41
OSHMEM_OP_TYPE_FREAL16
@ OSHMEM_OP_TYPE_FREAL16
Fortran integer: real8.
Definition: op.h:52
oshmem_op_xor_fint8
oshmem_op_t * oshmem_op_xor_fint8
Definition: op.c:78
OSHMEM_OP_PROD
@ OSHMEM_OP_PROD
SUM.
Definition: op.h:68
__min_op
#define __min_op(a, b)
Definition: op.c:220
oshmem_op_or_long
oshmem_op_t * oshmem_op_or_long
Definition: op.c:62
oshmem_op_or_fint8
oshmem_op_t * oshmem_op_or_fint8
Definition: op.c:66
oshmem_op_or_fint4
oshmem_op_t * oshmem_op_or_fint4
Definition: op.c:65
oshmem_op_prod_int16
oshmem_op_t * oshmem_op_prod_int16
Definition: op.c:155
OSHMEM_OP_TYPE_FINT2
@ OSHMEM_OP_TYPE_FINT2
Complex: double.
Definition: op.h:47
oshmem_op_or_short
oshmem_op_t * oshmem_op_or_short
Definition: op.c:60
OBJ_RELEASE
#define OBJ_RELEASE(object)
Release an object (by decrementing its reference count).
Definition: opal_object.h:338
oshmem_op_prod_fint8
oshmem_op_t * oshmem_op_prod_fint8
Definition: op.c:151
NULL
#define NULL
Copyright (C) 2000-2004 by Etnus, LLC.
Definition: ompi_msgq_dll.c:136
oshmem_op_t::id
int id
index in global array
Definition: op.h:81
OSHMEM_OP_SUM
@ OSHMEM_OP_SUM
MIN.
Definition: op.h:67
OSHMEM_OP_TYPE_DCOMPLEX
@ OSHMEM_OP_TYPE_DCOMPLEX
Complex: float.
Definition: op.h:45
oshmem_op_array
opal_pointer_array_t oshmem_op_array
Definition: op.c:28
__xor_op
#define __xor_op(a, b)
oshmem_op_sum_longlong
oshmem_op_t * oshmem_op_sum_longlong
Definition: op.c:123