Commit 6165992c authored by James Dinan's avatar James Dinan
Browse files

[svn-r10219] Refactoring of oputil for use in RMA.

An extra argument was added to the oputil macros to provide a name,
which can be used to generate union types.  This is needed for
generating types to be included in the RMA packet headers.  The RMA code
is also modified to use this new functionality, replacing the old
hand-coded unions.

Reviewer: goodell@
parent dd49d111
......@@ -62,7 +62,8 @@ noinst_HEADERS += \
src/include/pmi.h \
src/include/pmi2.h \
src/include/rlog.h \
src/include/rlog_macros.h
src/include/rlog_macros.h \
src/include/oputil.h
src/include/param_vals.h: src/util/param/params.yml
$(top_srcdir)/maint/genparams
This diff is collapsed.
......@@ -30,7 +30,7 @@ void MPIR_BAND (
switch (*type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LBAND)
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LBAND)
/* no semicolons by necessity */
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
......@@ -60,7 +60,7 @@ int MPIR_BAND_check_dtype ( MPI_Datatype type )
{
switch (type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) case (mpi_type_):
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) case (mpi_type_):
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
MPIR_OP_TYPE_GROUP(BYTE)
......
......@@ -30,7 +30,7 @@ void MPIR_BOR (
switch (*type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LBOR)
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LBOR)
/* no semicolons by necessity */
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
......@@ -60,7 +60,7 @@ int MPIR_BOR_check_dtype ( MPI_Datatype type )
{
switch (type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) case (mpi_type_):
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) case (mpi_type_):
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
MPIR_OP_TYPE_GROUP(BYTE)
......
......@@ -30,7 +30,7 @@ void MPIR_BXOR (
switch (*type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LBXOR)
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LBXOR)
/* no semicolons by necessity */
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
......@@ -60,7 +60,7 @@ int MPIR_BXOR_check_dtype ( MPI_Datatype type )
{
switch (type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) case (mpi_type_):
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) case (mpi_type_):
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
MPIR_OP_TYPE_GROUP(BYTE)
......
......@@ -39,14 +39,14 @@ void MPIR_LAND (
switch (*type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LLAND)
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LLAND)
/* no semicolons by necessity */
MPIR_OP_TYPE_GROUP(C_INTEGER)
/* MPI_LOGICAL requires special handling (MPIR_{TO,FROM}_FLOG) */
#if defined(HAVE_FORTRAN_BINDING)
# undef MPIR_OP_TYPE_MACRO_HAVE_FORTRAN
# define MPIR_OP_TYPE_MACRO_HAVE_FORTRAN(mpi_type_, c_type_) \
# define MPIR_OP_TYPE_MACRO_HAVE_FORTRAN(mpi_type_, c_type_, type_name_) \
case (mpi_type_): { \
c_type_ * restrict a = (c_type_ *)inoutvec; \
c_type_ * restrict b = (c_type_ *)invec; \
......@@ -60,7 +60,7 @@ void MPIR_LAND (
MPIR_OP_TYPE_GROUP(LOGICAL_EXTRA)
/* now revert _HAVE_FORTRAN macro to default */
# undef MPIR_OP_TYPE_MACRO_HAVE_FORTRAN
# define MPIR_OP_TYPE_MACRO_HAVE_FORTRAN(mpi_type_, c_type_) MPIR_OP_TYPE_MACRO(mpi_type_, c_type_)
# define MPIR_OP_TYPE_MACRO_HAVE_FORTRAN(mpi_type_, c_type_, type_name_) MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_)
#else
/* if we don't have Fortran support then we don't have to jump through
any hoops, simply expand the group */
......@@ -97,7 +97,7 @@ int MPIR_LAND_check_dtype ( MPI_Datatype type )
{
switch (type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) case (mpi_type_):
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) case (mpi_type_):
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(LOGICAL) /* no special handling needed in check_dtype code */
MPIR_OP_TYPE_GROUP(LOGICAL_EXTRA)
......
......@@ -39,14 +39,14 @@ void MPIR_LOR (
switch (*type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LLOR)
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LLOR)
/* no semicolons by necessity */
MPIR_OP_TYPE_GROUP(C_INTEGER)
/* MPI_LOGICAL requires special handling (MPIR_{TO,FROM}_FLOG) */
#if defined(HAVE_FORTRAN_BINDING)
# undef MPIR_OP_TYPE_MACRO_HAVE_FORTRAN
# define MPIR_OP_TYPE_MACRO_HAVE_FORTRAN(mpi_type_, c_type_) \
# define MPIR_OP_TYPE_MACRO_HAVE_FORTRAN(mpi_type_, c_type_, type_name_) \
case (mpi_type_): { \
c_type_ * restrict a = (c_type_ *)inoutvec; \
c_type_ * restrict b = (c_type_ *)invec; \
......@@ -60,7 +60,7 @@ void MPIR_LOR (
MPIR_OP_TYPE_GROUP(LOGICAL_EXTRA)
/* now revert _HAVE_FORTRAN macro to default */
# undef MPIR_OP_TYPE_MACRO_HAVE_FORTRAN
# define MPIR_OP_TYPE_MACRO_HAVE_FORTRAN(mpi_type_, c_type_) MPIR_OP_TYPE_MACRO(mpi_type_, c_type_)
# define MPIR_OP_TYPE_MACRO_HAVE_FORTRAN(mpi_type_, c_type_, type_name_) MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_)
#else
/* if we don't have Fortran support then we don't have to jump through
any hoops, simply expand the group */
......@@ -97,7 +97,7 @@ int MPIR_LOR_check_dtype ( MPI_Datatype type )
{
switch (type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) case (mpi_type_):
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) case (mpi_type_):
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(LOGICAL) /* no special handling needed in check_dtype code */
MPIR_OP_TYPE_GROUP(LOGICAL_EXTRA)
......
......@@ -39,14 +39,14 @@ void MPIR_LXOR (
switch (*type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LLXOR)
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LLXOR)
/* no semicolons by necessity */
MPIR_OP_TYPE_GROUP(C_INTEGER)
/* MPI_LOGICAL requires special handling (MPIR_{TO,FROM}_FLOG) */
#if defined(HAVE_FORTRAN_BINDING)
# undef MPIR_OP_TYPE_MACRO_HAVE_FORTRAN
# define MPIR_OP_TYPE_MACRO_HAVE_FORTRAN(mpi_type_, c_type_) \
# define MPIR_OP_TYPE_MACRO_HAVE_FORTRAN(mpi_type_, c_type_, type_name_) \
case (mpi_type_): { \
c_type_ * restrict a = (c_type_ *)inoutvec; \
c_type_ * restrict b = (c_type_ *)invec; \
......@@ -60,7 +60,7 @@ void MPIR_LXOR (
MPIR_OP_TYPE_GROUP(LOGICAL_EXTRA)
/* now revert _HAVE_FORTRAN macro to default */
# undef MPIR_OP_TYPE_MACRO_HAVE_FORTRAN
# define MPIR_OP_TYPE_MACRO_HAVE_FORTRAN(mpi_type_, c_type_) MPIR_OP_TYPE_MACRO(mpi_type_, c_type_)
# define MPIR_OP_TYPE_MACRO_HAVE_FORTRAN(mpi_type_, c_type_, type_name_) MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_)
#else
/* if we don't have Fortran support then we don't have to jump through
any hoops, simply expand the group */
......@@ -97,7 +97,7 @@ int MPIR_LXOR_check_dtype ( MPI_Datatype type )
{
switch (type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) case (mpi_type_):
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) case (mpi_type_):
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(LOGICAL) /* no special handling needed in check_dtype code */
MPIR_OP_TYPE_GROUP(LOGICAL_EXTRA)
......
......@@ -27,7 +27,7 @@ void MPIR_MAXF(
switch (*type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_MAX)
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_MAX)
/* no semicolons by necessity */
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
......@@ -57,7 +57,7 @@ int MPIR_MAXF_check_dtype( MPI_Datatype type )
{
switch (type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) case (mpi_type_):
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) case (mpi_type_):
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
MPIR_OP_TYPE_GROUP(FLOATING_POINT)
......
......@@ -26,7 +26,7 @@ void MPIR_MINF (
switch (*type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_MIN)
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_MIN)
/* no semicolons by necessity */
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
......@@ -56,7 +56,7 @@ int MPIR_MINF_check_dtype ( MPI_Datatype type )
{
switch (type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) case (mpi_type_):
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) case (mpi_type_):
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
MPIR_OP_TYPE_GROUP(FLOATING_POINT)
......
......@@ -28,7 +28,7 @@ void MPIR_PROD (
switch (*type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LPROD)
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LPROD)
/* no semicolons by necessity */
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
......@@ -40,7 +40,7 @@ void MPIR_PROD (
/* complex multiplication is slightly different than scalar multiplication */
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) \
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) \
case (mpi_type_): { \
c_type_ * restrict a = (c_type_ *)inoutvec; \
c_type_ * restrict b = (c_type_ *)invec; \
......@@ -53,13 +53,13 @@ void MPIR_PROD (
break; \
}
#undef MPIR_OP_C_COMPLEX_TYPE_MACRO
#define MPIR_OP_C_COMPLEX_TYPE_MACRO(mpi_type_,c_type_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_,c_type_,MPIR_LPROD)
#define MPIR_OP_C_COMPLEX_TYPE_MACRO(mpi_type_,c_type_,type_name_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_,c_type_,MPIR_LPROD)
MPIR_OP_TYPE_GROUP(COMPLEX)
MPIR_OP_TYPE_GROUP(COMPLEX_EXTRA)
/* put things back where we found them */
#undef MPIR_OP_TYPE_MACRO
#undef MPIR_OP_C_COMPLEX_TYPE_MACRO
#define MPIR_OP_C_COMPLEX_TYPE_MACRO(mpi_type_,c_type_) MPIR_OP_TYPE_MACRO(mpi_type_,c_type_)
#define MPIR_OP_C_COMPLEX_TYPE_MACRO(mpi_type_,c_type_,type_name_) MPIR_OP_TYPE_MACRO(mpi_type_,c_type_,type_name_)
/* --BEGIN ERROR HANDLING-- */
default: {
MPIU_THREADPRIV_DECL;
......@@ -95,7 +95,7 @@ int MPIR_PROD_check_dtype( MPI_Datatype type )
{
switch (type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) case (mpi_type_):
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) case (mpi_type_):
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
MPIR_OP_TYPE_GROUP(FLOATING_POINT)
......
......@@ -28,7 +28,7 @@ void MPIR_SUM (
switch (*type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LSUM)
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_LSUM)
/* no semicolons by necessity */
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
......@@ -40,7 +40,7 @@ void MPIR_SUM (
/* complex addition is slightly different than scalar addition */
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) \
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) \
case (mpi_type_): { \
c_type_ * restrict a = (c_type_ *)inoutvec; \
const c_type_ * restrict b = (c_type_ *)invec; \
......@@ -52,13 +52,13 @@ void MPIR_SUM (
}
/* C complex types are just simple sums */
#undef MPIR_OP_C_COMPLEX_TYPE_MACRO
#define MPIR_OP_C_COMPLEX_TYPE_MACRO(mpi_type_,c_type_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_,c_type_,MPIR_LSUM)
#define MPIR_OP_C_COMPLEX_TYPE_MACRO(mpi_type_,c_type_,type_name_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_,c_type_,MPIR_LSUM)
MPIR_OP_TYPE_GROUP(COMPLEX)
MPIR_OP_TYPE_GROUP(COMPLEX_EXTRA)
/* put things back where we found them */
#undef MPIR_OP_TYPE_MACRO
#undef MPIR_OP_C_COMPLEX_TYPE_MACRO
#define MPIR_OP_C_COMPLEX_TYPE_MACRO(mpi_type_,c_type_) MPIR_OP_TYPE_MACRO(mpi_type_,c_type_)
#define MPIR_OP_C_COMPLEX_TYPE_MACRO(mpi_type_,c_type_,type_name_) MPIR_OP_TYPE_MACRO(mpi_type_,c_type_,type_name_)
/* --BEGIN ERROR HANDLING-- */
default: {
MPIU_THREADPRIV_DECL;
......@@ -79,7 +79,7 @@ int MPIR_SUM_check_dtype( MPI_Datatype type )
{
switch (type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) case (mpi_type_):
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) case (mpi_type_):
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
MPIR_OP_TYPE_GROUP(FLOATING_POINT)
......
......@@ -48,5 +48,6 @@ mpi_sources += \
noinst_HEADERS += src/mpi/rma/rma.h
lib_lib@MPILIBNAME@_la_SOURCES += \
src/mpi/rma/winutil.c
src/mpi/rma/winutil.c \
src/mpi/rma/rmatypeutil.c
......@@ -24,7 +24,7 @@ int MPIR_Type_is_rma_atomic(MPI_Datatype type)
{
switch (type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) case mpi_type_:
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) case mpi_type_:
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
MPIR_OP_TYPE_GROUP(LOGICAL)
......@@ -32,6 +32,7 @@ int MPIR_Type_is_rma_atomic(MPI_Datatype type)
MPIR_OP_TYPE_GROUP(C_INTEGER_EXTRA)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER_EXTRA)
MPIR_OP_TYPE_GROUP(LOGICAL_EXTRA)
MPIR_OP_TYPE_GROUP(BYTE_EXTRA)
return TRUE;
break;
#undef MPIR_OP_TYPE_MACRO
......@@ -53,7 +54,7 @@ int MPIR_Compare_equal(const void *a, const void *b, MPI_Datatype type)
{
switch (type) {
#undef MPIR_OP_TYPE_MACRO
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) \
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) \
case mpi_type_: \
if (*(c_type_ *)a == *(c_type_ *)b) \
return TRUE; \
......
......@@ -7,6 +7,8 @@
#ifndef HAVE_MPIDPKT_H
#define HAVE_MPIDPKT_H
#include "oputil.h"
/* Enable the use of data within the message packet for small messages */
#define USE_EAGER_SHORT
#define MPIDI_EAGER_SHORT_INTS 4
......@@ -16,177 +18,30 @@
/* This is the number of ints that can be carried within an RMA packet */
#define MPIDI_RMA_IMMED_INTS 1
/* Union over all types that are allowed in a CAS operation. This
is used to allocate enough space in the packet header for immediate
data. */
/* Union over all types (integer, logical, and multi-language types) that are
allowed in a CAS operation. This is used to allocate enough space in the
packet header for immediate data. */
typedef union {
char cas_char;
short cas_short;
int cas_int;
long cas_long;
MPI_Aint cas_aint;
MPI_Offset cas_offset;
#if defined(HAVE_INT8_T)
int8_t cas_int8_t;
#endif
#if defined(HAVE_INT16_T)
int16_t cas_int16_t;
#endif
#if defined(HAVE_INT32_T)
int32_t cas_int32_t;
#endif
#if defined(HAVE_INT64_T)
int64_t cas_int64_t;
#endif
#if defined(HAVE_UINT8_T)
uint8_t cas_uint8_t;
#endif
#if defined(HAVE_UINT16_T)
uint16_t cas_uint16_t;
#endif
#if defined(HAVE_UINT32_T)
uint32_t cas_uint32_t;
#endif
#if defined(HAVE_UINT64_T)
uint64_t cas_uint64_t;
#endif
#if defined(HAVE_LONG_LONG_INT)
long long cas_long_long;
#endif
#if defined(HAVE_FORTRAN_BINDING)
MPI_Fint cas_fint;
#endif
#if defined(HAVE__BOOL)
_Bool cas__bool;
#endif
#if defined(HAVE_CXX_BINDING)
MPIR_CXX_BOOL_CTYPE cas_cxx_bool;
#endif
#if defined(MPIR_INTEGER1_CTYPE)
MPIR_INTEGER1_CTYPE cas_integer1;
#endif
#if defined(MPIR_INTEGER2_CTYPE)
MPIR_INTEGER2_CTYPE cas_integer2;
#endif
#if defined(MPIR_INTEGER4_CTYPE)
MPIR_INTEGER4_CTYPE cas_integer4;
#endif
#if defined(MPIR_INTEGER8_CTYPE)
MPIR_INTEGER8_CTYPE cas_integer8;
#endif
#if defined(MPIR_INTEGER16_CTYPE)
MPIR_INTEGER16_CTYPE cas_integer16;
#endif
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) c_type_ cas_##type_name_;
MPIR_OP_TYPE_GROUP(C_INTEGER)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
MPIR_OP_TYPE_GROUP(LOGICAL)
MPIR_OP_TYPE_GROUP(BYTE)
MPIR_OP_TYPE_GROUP(C_INTEGER_EXTRA)
MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER_EXTRA)
MPIR_OP_TYPE_GROUP(LOGICAL_EXTRA)
MPIR_OP_TYPE_GROUP(BYTE_EXTRA)
#undef MPIR_OP_TYPE_MACRO
} MPIDI_CH3_CAS_Immed_u;
/* Union over all types that are allowed in a Fetch-and-op operation. This
is used to allocate enough space in the packet header for immediate
data. */
/* Union over all types (all builtin types) that are allowed in a Fetch-and-op
operation. This is used to allocate enough space in the packet header for
immediate data. */
typedef union {
char fop_char;
short fop_short;
int fop_int;
long fop_long;
MPI_Aint fop_aint;
MPI_Offset fop_offset;
#if defined(HAVE_INT8_T)
int8_t fop_int8_t;
#endif
#if defined(HAVE_INT16_T)
int16_t fop_int16_t;
#endif
#if defined(HAVE_INT32_T)
int32_t fop_int32_t;
#endif
#if defined(HAVE_INT64_T)
int64_t fop_int64_t;
#endif
#if defined(HAVE_UINT8_T)
uint8_t fop_uint8_t;
#endif
#if defined(HAVE_UINT16_T)
uint16_t fop_uint16_t;
#endif
#if defined(HAVE_UINT32_T)
uint32_t fop_uint32_t;
#endif
#if defined(HAVE_UINT64_T)
uint64_t fop_uint64_t;
#endif
#if defined(HAVE_LONG_LONG_INT)
long long fop_long_long;
#endif
#if defined(HAVE_FORTRAN_BINDING)
MPI_Fint fop_fint;
#endif
#if defined(HAVE__BOOL)
_Bool fop__bool;
#endif
#if defined(HAVE_CXX_BINDING)
MPIR_CXX_BOOL_CTYPE fop_cxx_bool;
#endif
#if defined(MPIR_INTEGER1_CTYPE)
MPIR_INTEGER1_CTYPE fop_integer1;
#endif
#if defined(MPIR_INTEGER2_CTYPE)
MPIR_INTEGER2_CTYPE fop_integer2;
#endif
#if defined(MPIR_INTEGER4_CTYPE)
MPIR_INTEGER4_CTYPE fop_integer4;
#endif
#if defined(MPIR_INTEGER8_CTYPE)
MPIR_INTEGER8_CTYPE fop_integer8;
#endif
#if defined(MPIR_INTEGER16_CTYPE)
MPIR_INTEGER16_CTYPE fop_integer16;
#endif
float fop_float;
double fop_double;
#if defined(HAVE_LONG_DOUBLE)
long double fop_long_double;
#endif
#if defined(MPIR_REAL4_CTYPE)
MPIR_REAL4_CTYPE fop_mpir_real4_ctype;
#endif
#if defined(MPIR_REAL8_CTYPE)
MPIR_REAL8_CTYPE fop_mpir_real8_ctype;
#endif
#if defined(MPIR_REAL16_CTYPE)
MPIR_REAL16_CTYPE fop_mpir_real16_ctype;
#endif
struct {
double re;
double im;
} fop_d_complex;
#if defined(HAVE_LONG_DOUBLE)
struct {
long double re;
long double im;
} fop_ld_complex;
#endif
struct {
float re;
float im;
} fop_s_complex;
#if defined(HAVE_FORTRAN_BINDING)
struct {
MPIR_FC_REAL_CTYPE re;
MPIR_FC_REAL_CTYPE im;
} fop_s_fc_complex;
struct {
MPIR_FC_DOUBLE_CTYPE re;
MPIR_FC_DOUBLE_CTYPE im;
} fop_d_fc_complex;
#endif
#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) c_type_ fop##type_name_;
MPIR_OP_TYPE_GROUP_ALL_BASIC
MPIR_OP_TYPE_GROUP_ALL_EXTRA
#undef MPIR_OP_TYPE_MACRO
} MPIDI_CH3_FOP_Immed_u;
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment