2004-04-21 02:37:46 +04:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#ifndef OMPI_OP_PREDEFINED_H
|
|
|
|
#define OMPI_OP_PREDEFINED_H
|
2004-04-21 02:37:46 +04:00
|
|
|
|
|
|
|
#include "op/op.h"
|
|
|
|
|
2004-06-29 04:02:25 +04:00
|
|
|
/*
|
|
|
|
* Since we have so many of these, and they're all identical except
|
|
|
|
* for the name, use macros to prototype them.
|
2004-04-21 02:37:46 +04:00
|
|
|
*/
|
2004-06-29 04:02:25 +04:00
|
|
|
#define OMPI_OP_PROTO (void *in, void *out, int *count, MPI_Datatype *dtype)
|
|
|
|
#define OMPI_OP_HANDLER_C_INTEGER(name) \
|
|
|
|
void ompi_mpi_op_##name##_int OMPI_OP_PROTO; \
|
|
|
|
void ompi_mpi_op_##name##_long OMPI_OP_PROTO; \
|
|
|
|
void ompi_mpi_op_##name##_short OMPI_OP_PROTO; \
|
|
|
|
void ompi_mpi_op_##name##_unsigned_short OMPI_OP_PROTO; \
|
|
|
|
void ompi_mpi_op_##name##_unsigned OMPI_OP_PROTO; \
|
|
|
|
void ompi_mpi_op_##name##_unsigned_long OMPI_OP_PROTO
|
|
|
|
|
|
|
|
#define OMPI_OP_HANDLER_FORTRAN_INTEGER(name) \
|
|
|
|
void ompi_mpi_op_##name##_fortran_integer OMPI_OP_PROTO
|
|
|
|
|
|
|
|
#define OMPI_OP_HANDLER_FLOATING_POINT(name) \
|
|
|
|
void ompi_mpi_op_##name##_float OMPI_OP_PROTO; \
|
|
|
|
void ompi_mpi_op_##name##_double OMPI_OP_PROTO; \
|
|
|
|
void ompi_mpi_op_##name##_fortran_real OMPI_OP_PROTO; \
|
|
|
|
void ompi_mpi_op_##name##_fortran_double_precision OMPI_OP_PROTO; \
|
|
|
|
void ompi_mpi_op_##name##_long_double OMPI_OP_PROTO
|
|
|
|
|
|
|
|
#define OMPI_OP_HANDLER_LOGICAL(name) \
|
|
|
|
void ompi_mpi_op_##name##_fortran_logical OMPI_OP_PROTO
|
|
|
|
|
|
|
|
#define OMPI_OP_HANDLER_COMPLEX(name) \
|
|
|
|
void ompi_mpi_op_##name##_fortran_complex OMPI_OP_PROTO
|
|
|
|
|
|
|
|
#define OMPI_OP_HANDLER_BYTE(name) \
|
|
|
|
void ompi_mpi_op_##name##_byte OMPI_OP_PROTO
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2004-04-21 02:37:46 +04:00
|
|
|
|
|
|
|
/**
|
2004-06-29 04:02:25 +04:00
|
|
|
* Handler functions for MPI_MAX
|
2004-04-21 02:37:46 +04:00
|
|
|
*/
|
2004-06-29 04:02:25 +04:00
|
|
|
OMPI_OP_HANDLER_C_INTEGER(max);
|
|
|
|
OMPI_OP_HANDLER_FORTRAN_INTEGER(max);
|
|
|
|
OMPI_OP_HANDLER_FLOATING_POINT(max);
|
2004-04-21 02:37:46 +04:00
|
|
|
|
|
|
|
/**
|
2004-06-29 04:02:25 +04:00
|
|
|
* Handler functions for MPI_MIN
|
2004-04-21 02:37:46 +04:00
|
|
|
*/
|
2004-06-29 04:02:25 +04:00
|
|
|
OMPI_OP_HANDLER_C_INTEGER(min);
|
|
|
|
OMPI_OP_HANDLER_FORTRAN_INTEGER(min);
|
|
|
|
OMPI_OP_HANDLER_FLOATING_POINT(min);
|
2004-04-21 02:37:46 +04:00
|
|
|
|
|
|
|
/**
|
2004-06-29 04:02:25 +04:00
|
|
|
* Handler functions for MPI_SUM
|
2004-04-21 02:37:46 +04:00
|
|
|
*/
|
2004-06-29 04:02:25 +04:00
|
|
|
OMPI_OP_HANDLER_C_INTEGER(sum);
|
|
|
|
OMPI_OP_HANDLER_FORTRAN_INTEGER(sum);
|
|
|
|
OMPI_OP_HANDLER_FLOATING_POINT(sum);
|
|
|
|
OMPI_OP_HANDLER_COMPLEX(sum);
|
2004-04-21 02:37:46 +04:00
|
|
|
|
|
|
|
/**
|
2004-06-29 04:02:25 +04:00
|
|
|
* Handler functions for MPI_PROD
|
2004-04-21 02:37:46 +04:00
|
|
|
*/
|
2004-06-29 04:02:25 +04:00
|
|
|
OMPI_OP_HANDLER_C_INTEGER(prod);
|
|
|
|
OMPI_OP_HANDLER_FORTRAN_INTEGER(prod);
|
|
|
|
OMPI_OP_HANDLER_FLOATING_POINT(prod);
|
|
|
|
OMPI_OP_HANDLER_COMPLEX(prod);
|
2004-04-21 02:37:46 +04:00
|
|
|
|
|
|
|
/**
|
2004-06-29 04:02:25 +04:00
|
|
|
* Handler functions for MPI_LAND
|
2004-04-21 02:37:46 +04:00
|
|
|
*/
|
2004-06-29 04:02:25 +04:00
|
|
|
OMPI_OP_HANDLER_C_INTEGER(land);
|
|
|
|
OMPI_OP_HANDLER_LOGICAL(land);
|
2004-04-21 02:37:46 +04:00
|
|
|
|
|
|
|
/**
|
2004-06-29 04:02:25 +04:00
|
|
|
* Handler functions for MPI_BAND
|
2004-04-21 02:37:46 +04:00
|
|
|
*/
|
2004-06-29 04:02:25 +04:00
|
|
|
OMPI_OP_HANDLER_C_INTEGER(band);
|
|
|
|
OMPI_OP_HANDLER_FORTRAN_INTEGER(band);
|
|
|
|
OMPI_OP_HANDLER_BYTE(band);
|
2004-04-21 02:37:46 +04:00
|
|
|
|
|
|
|
/**
|
2004-06-29 04:02:25 +04:00
|
|
|
* Handler functions for MPI_LOR
|
2004-04-21 02:37:46 +04:00
|
|
|
*/
|
2004-06-29 04:02:25 +04:00
|
|
|
OMPI_OP_HANDLER_C_INTEGER(lor);
|
|
|
|
OMPI_OP_HANDLER_LOGICAL(lor);
|
2004-04-21 02:37:46 +04:00
|
|
|
|
|
|
|
/**
|
2004-06-29 04:02:25 +04:00
|
|
|
* Handler functions for MPI_BOR
|
2004-04-21 02:37:46 +04:00
|
|
|
*/
|
2004-06-29 04:02:25 +04:00
|
|
|
OMPI_OP_HANDLER_C_INTEGER(bor);
|
|
|
|
OMPI_OP_HANDLER_FORTRAN_INTEGER(bor);
|
|
|
|
OMPI_OP_HANDLER_BYTE(bor);
|
2004-04-21 02:37:46 +04:00
|
|
|
|
|
|
|
/**
|
2004-06-29 04:02:25 +04:00
|
|
|
* Handler functions for MPI_LXOR
|
2004-04-21 02:37:46 +04:00
|
|
|
*/
|
2004-06-29 04:02:25 +04:00
|
|
|
OMPI_OP_HANDLER_C_INTEGER(lxor);
|
|
|
|
OMPI_OP_HANDLER_LOGICAL(lxor);
|
2004-04-21 02:37:46 +04:00
|
|
|
|
|
|
|
/**
|
2004-06-29 04:02:25 +04:00
|
|
|
* Handler functions for MPI_BXOR
|
2004-04-21 02:37:46 +04:00
|
|
|
*/
|
2004-06-29 04:02:25 +04:00
|
|
|
OMPI_OP_HANDLER_C_INTEGER(bxor);
|
|
|
|
OMPI_OP_HANDLER_FORTRAN_INTEGER(bxor);
|
|
|
|
OMPI_OP_HANDLER_BYTE(bxor);
|
2004-04-21 02:37:46 +04:00
|
|
|
|
|
|
|
/**
|
2004-06-29 04:02:25 +04:00
|
|
|
* Handler functions for MPI_MAXLOC
|
2004-04-21 02:37:46 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2004-06-29 04:02:25 +04:00
|
|
|
* Handler functions for MPI_MINLOC
|
2004-04-21 02:37:46 +04:00
|
|
|
*/
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#endif /* OMPI_OP_PREDEFINED_H */
|