Reshape the datatype engine. The basic types are built down in OPAL. MPI types are
either direct link to these basic predefined types, or a combination of them. Anyway, the first items in the datatype list belong to OPAL, the second round are MPI datatypes created by composing basic OPAL datatypes, and the last batch are mapped datatype (direct correspondance between an OMPI datatype and an OPAL one such as int -> int32_t). Modify the op to fit this new scheme. This commit was SVN r24247.
Этот коммит содержится в:
родитель
b09f57b03d
Коммит
5390fd6f33
24
configure.ac
24
configure.ac
@ -3,7 +3,7 @@
|
||||
# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# Copyright (c) 2004-2010 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
|
||||
@ -790,7 +790,17 @@ if test "$MPI_OFFSET_TYPE" = "not found"; then
|
||||
AC_MSG_WARN([*** Unable to find the right definition for MPI_Offset])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
AC_MSG_CHECKING([checking for an MPI datatype for MPI_Offset])
|
||||
AC_MSG_RESULT([$MPI_OFFSET_DATATYPE])
|
||||
# this should never happens
|
||||
if test "$MPI_OFFSET_DATATYPE" = "not found"; then
|
||||
AC_MSG_WARN([*** Unable to find an MPI datatype corresponding to MPI_Offset])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(OMPI_MPI_OFFSET_TYPE, $MPI_OFFSET_TYPE, [Type of MPI_Offset -- has to be defined here and typedef'ed later because mpi.h does not get AC SUBST's])
|
||||
AC_DEFINE_UNQUOTED(OMPI_MPI_OFFSET_SIZE, $MPI_OFFSET_SIZE, [Size of the MPI_Offset])
|
||||
AC_DEFINE_UNQUOTED(OMPI_OFFSET_DATATYPE, $MPI_OFFSET_DATATYPE, [MPI datatype corresponding to MPI_Offset])
|
||||
|
||||
#
|
||||
# Check for MPI_Aint type. Yes, there are platforms where
|
||||
@ -808,18 +818,6 @@ fi
|
||||
AC_DEFINE_UNQUOTED([OPAL_PTRDIFF_TYPE], [$opal_ptrdiff_t],
|
||||
[type to use for ptrdiff_t])
|
||||
|
||||
#
|
||||
# If we haven't already, figure out an MPI datatype that corresponds
|
||||
# to the back-end C type of MPI_Offset.
|
||||
#
|
||||
AC_MSG_CHECKING([checking for an MPI datatype for MPI_Offset])
|
||||
AC_MSG_RESULT([$MPI_OFFSET_DATATYPE])
|
||||
if test "$MPI_OFFSET_DATATYPE" = "not found"; then
|
||||
AC_MSG_WARN([*** Unable to find an MPI datatype corresponding to MPI_Offset])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(OMPI_OFFSET_DATATYPE, $MPI_OFFSET_DATATYPE, [MPI datatype corresponding to MPI_Offset])
|
||||
|
||||
# Do we have _SC_NPROCESSORS_ONLN? (only going to pass if we also have
|
||||
# <unistd.h> and sysconf(), which is ok) OS X 10.4 has <unistd.h> and
|
||||
# sysconf(), but does not have _SC_NPROCESSORS_ONLN. Doh!
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; -*- */
|
||||
/*
|
||||
* Copyright (c) 2009 The University of Tennessee and The University
|
||||
* Copyright (c) 2009-2010 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||
@ -24,67 +24,159 @@
|
||||
#define OMPI_DATATYPE_INTERNAL_H
|
||||
|
||||
#include "opal/datatype/opal_datatype_internal.h"
|
||||
#include "ompi/class/ompi_free_list.h"
|
||||
|
||||
/*
|
||||
* This is the OMPI-layered numbering of ALL supported MPI types
|
||||
* (derived from the old DT_ names).
|
||||
* NOTE: These numbers have to match the d_f_to_c_index.
|
||||
*/
|
||||
#define OMPI_DATATYPE_MPI_NULL 0x00
|
||||
#define OMPI_DATATYPE_MPI_LB 0x00
|
||||
#define OMPI_DATATYPE_MPI_UB 0x01
|
||||
#define OMPI_DATATYPE_MPI_CHAR 0x02
|
||||
#define OMPI_DATATYPE_MPI_SIGNED_CHAR 0x03 /* Changed order */
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_CHAR 0x04 /* Changed order */
|
||||
#define OMPI_DATATYPE_MPI_BYTE 0x05
|
||||
#define OMPI_DATATYPE_MPI_SHORT 0x06
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_SHORT 0x07
|
||||
#define OMPI_DATATYPE_MPI_INT 0x08
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_INT 0x09
|
||||
#define OMPI_DATATYPE_MPI_LONG 0x0A
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG 0x0B
|
||||
#define OMPI_DATATYPE_MPI_LONG_LONG 0x0C /* Was LONG_LONG_INT */
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG_LONG 0x0D
|
||||
#define OMPI_DATATYPE_MPI_FLOAT 0x0E
|
||||
#define OMPI_DATATYPE_MPI_DOUBLE 0x0F
|
||||
#define OMPI_DATATYPE_MPI_LONG_DOUBLE 0x10
|
||||
#define OMPI_DATATYPE_MPI_COMPLEX8 0x11
|
||||
#define OMPI_DATATYPE_MPI_COMPLEX16 0x12
|
||||
#define OMPI_DATATYPE_MPI_COMPLEX32 0x13
|
||||
#define OMPI_DATATYPE_MPI_WCHAR 0x14
|
||||
#define OMPI_DATATYPE_MPI_PACKED 0x15
|
||||
#define OMPI_DATATYPE_MPI_EMPTY 0x00
|
||||
#define OMPI_DATATYPE_MPI_INT8_T 0x01
|
||||
#define OMPI_DATATYPE_MPI_UINT8_T 0x02
|
||||
#define OMPI_DATATYPE_MPI_INT16_T 0x03
|
||||
#define OMPI_DATATYPE_MPI_UINT16_T 0x04
|
||||
#define OMPI_DATATYPE_MPI_INT32_T 0x05
|
||||
#define OMPI_DATATYPE_MPI_UINT32_T 0x06
|
||||
#define OMPI_DATATYPE_MPI_INT64_T 0x07
|
||||
#define OMPI_DATATYPE_MPI_UINT64_T 0x08
|
||||
#define OMPI_DATATYPE_MPI_FLOAT 0x09
|
||||
#define OMPI_DATATYPE_MPI_DOUBLE 0x0A
|
||||
#define OMPI_DATATYPE_MPI_LONG_DOUBLE 0x0B
|
||||
#define OMPI_DATATYPE_MPI_COMPLEX8 0x0C
|
||||
#define OMPI_DATATYPE_MPI_COMPLEX16 0x0D
|
||||
#define OMPI_DATATYPE_MPI_COMPLEX32 0x0E
|
||||
#define OMPI_DATATYPE_MPI_WCHAR 0x0F
|
||||
#define OMPI_DATATYPE_MPI_PACKED 0x10
|
||||
|
||||
#define OMPI_DATATYPE_MPI_BOOL 0x16 /* Was CXX_BOOL */
|
||||
#define OMPI_DATATYPE_MPI_BOOL 0x11
|
||||
|
||||
#define OMPI_DATATYPE_MPI_LOGICAL 0x17
|
||||
#define OMPI_DATATYPE_MPI_CHARACTER 0x18 /* Changed */
|
||||
#define OMPI_DATATYPE_MPI_INTEGER 0x19
|
||||
#define OMPI_DATATYPE_MPI_REAL 0x1A
|
||||
#define OMPI_DATATYPE_MPI_DOUBLE_PRECISION 0x1B /* Was DBLPREC */
|
||||
#define OMPI_DATATYPE_MPI_LOGICAL 0x12
|
||||
#define OMPI_DATATYPE_MPI_CHARACTER 0x13
|
||||
#define OMPI_DATATYPE_MPI_INTEGER 0x14
|
||||
#define OMPI_DATATYPE_MPI_REAL 0x15
|
||||
#define OMPI_DATATYPE_MPI_DOUBLE_PRECISION 0x16
|
||||
|
||||
/*
|
||||
* Derived datatypes supposely contiguous
|
||||
*/
|
||||
#define OMPI_DATATYPE_MPI_COMPLEX 0x1C /* Was COMPLEX_FLOAT */
|
||||
#define OMPI_DATATYPE_MPI_DOUBLE_COMPLEX 0x1D /* Was COMPLEX_DOUBLE */
|
||||
#define OMPI_DATATYPE_MPI_LONG_DOUBLE_COMPLEX 0x1E /* Was COMPLEX_LONG_DOUBLE */
|
||||
#define OMPI_DATATYPE_MPI_2INT 0x1F
|
||||
#define OMPI_DATATYPE_MPI_2INTEGER 0x20
|
||||
#define OMPI_DATATYPE_MPI_2REAL 0x21
|
||||
#define OMPI_DATATYPE_MPI_2DBLPREC 0x22
|
||||
#define OMPI_DATATYPE_MPI_2COMPLEX 0x23
|
||||
#define OMPI_DATATYPE_MPI_2DOUBLE_COMPLEX 0x24
|
||||
#define OMPI_DATATYPE_MPI_COMPLEX 0x17 /* Was COMPLEX_FLOAT */
|
||||
#define OMPI_DATATYPE_MPI_DOUBLE_COMPLEX 0x18 /* Was COMPLEX_DOUBLE */
|
||||
#define OMPI_DATATYPE_MPI_LONG_DOUBLE_COMPLEX 0x19 /* Was COMPLEX_LONG_DOUBLE */
|
||||
#define OMPI_DATATYPE_MPI_2INT 0x1A
|
||||
#define OMPI_DATATYPE_MPI_2INTEGER 0x1B
|
||||
#define OMPI_DATATYPE_MPI_2REAL 0x1C
|
||||
#define OMPI_DATATYPE_MPI_2DBLPREC 0x1D
|
||||
#define OMPI_DATATYPE_MPI_2COMPLEX 0x1E
|
||||
#define OMPI_DATATYPE_MPI_2DOUBLE_COMPLEX 0x1F
|
||||
/*
|
||||
* Derived datatypes which will definitively be non contiguous on some architectures.
|
||||
*/
|
||||
#define OMPI_DATATYPE_MPI_FLOAT_INT 0x25
|
||||
#define OMPI_DATATYPE_MPI_DOUBLE_INT 0x26
|
||||
#define OMPI_DATATYPE_MPI_LONG_DOUBLE_INT 0x27
|
||||
#define OMPI_DATATYPE_MPI_LONG_INT 0x28
|
||||
#define OMPI_DATATYPE_MPI_SHORT_INT 0x29
|
||||
#define OMPI_DATATYPE_MPI_UNAVAILABLE 0x2A
|
||||
#define OMPI_DATATYPE_MPI_FLOAT_INT 0x20
|
||||
#define OMPI_DATATYPE_MPI_DOUBLE_INT 0x21
|
||||
#define OMPI_DATATYPE_MPI_LONG_DOUBLE_INT 0x22
|
||||
#define OMPI_DATATYPE_MPI_LONG_INT 0x23
|
||||
#define OMPI_DATATYPE_MPI_SHORT_INT 0x24
|
||||
/*
|
||||
* Datatypes from the MPI 2.2 standard
|
||||
*/
|
||||
#define OMPI_DATATYPE_MPI_AINT 0x25
|
||||
#define OMPI_DATATYPE_MPI_OFFSET 0x26
|
||||
#define OMPI_DATATYPE_MPI_C_BOOL 0x27
|
||||
#define OMPI_DATATYPE_MPI_C_COMPLEX 0x28
|
||||
#define OMPI_DATATYPE_MPI_C_FLOAT_COMPLEX 0x29
|
||||
#define OMPI_DATATYPE_MPI_C_DOUBLE_COMPLEX 0x2A
|
||||
#define OMPI_DATATYPE_MPI_C_LONG_DOUBLE_COMPLEX 0x2B
|
||||
|
||||
#define OMPI_DATATYPE_MPI_MAX_PREDEFINED 0x2B
|
||||
#define OMPI_DATATYPE_MPI_LB 0x2C
|
||||
#define OMPI_DATATYPE_MPI_UB 0x2D
|
||||
/* This should __ALWAYS__ stay last */
|
||||
#define OMPI_DATATYPE_MPI_UNAVAILABLE 0x2E
|
||||
|
||||
#define OMPI_DATATYPE_MPI_MAX_PREDEFINED (OMPI_DATATYPE_MPI_UNAVAILABLE+1)
|
||||
|
||||
/*
|
||||
* Mapped types. The following types have basic equivalents in OPAL. Instead
|
||||
* of being redefined as independent types, they will be made synonyms to
|
||||
* the most basic type.
|
||||
*/
|
||||
#if SIZEOF_CHAR == 1
|
||||
#define OMPI_DATATYPE_MPI_CHAR OMPI_DATATYPE_MPI_INT8_T
|
||||
#define OMPI_DATATYPE_MPI_SIGNED_CHAR OMPI_DATATYPE_MPI_INT8_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_CHAR OMPI_DATATYPE_MPI_UINT8_T
|
||||
#define OMPI_DATATYPE_MPI_BYTE OMPI_DATATYPE_MPI_UINT8_T
|
||||
#elif SIZEOF_CHAR == 2
|
||||
#define OMPI_DATATYPE_MPI_CHAR OMPI_DATATYPE_MPI_INT16_T
|
||||
#define OMPI_DATATYPE_MPI_SIGNED_CHAR OMPI_DATATYPE_MPI_INT16_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_CHAR OMPI_DATATYPE_MPI_UINT16_T
|
||||
#define OMPI_DATATYPE_MPI_BYTE OMPI_DATATYPE_MPI_UINT16_T
|
||||
#elif SIZEOF_CHAR == 4
|
||||
#define OMPI_DATATYPE_MPI_CHAR OMPI_DATATYPE_MPI_INT32_T
|
||||
#define OMPI_DATATYPE_MPI_SIGNED_CHAR OMPI_DATATYPE_MPI_INT32_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_CHAR OMPI_DATATYPE_MPI_UINT32_T
|
||||
#define OMPI_DATATYPE_MPI_BYTE OMPI_DATATYPE_MPI_UINT32_T
|
||||
#elif SIZEOF_CHAR == 8
|
||||
#define OMPI_DATATYPE_MPI_CHAR OMPI_DATATYPE_MPI_INT64_T
|
||||
#define OMPI_DATATYPE_MPI_SIGNED_CHAR OMPI_DATATYPE_MPI_INT64_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_CHAR OMPI_DATATYPE_MPI_UINT64_T
|
||||
#define OMPI_DATATYPE_MPI_BYTE OMPI_DATATYPE_MPI_UINT64_T
|
||||
#endif
|
||||
|
||||
#if SIZEOF_SHORT == 1
|
||||
#define OMPI_DATATYPE_MPI_SHORT OMPI_DATATYPE_MPI_INT8_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_SHORT OMPI_DATATYPE_MPI_UINT8_T
|
||||
#elif SIZEOF_SHORT == 2
|
||||
#define OMPI_DATATYPE_MPI_SHORT OMPI_DATATYPE_MPI_INT16_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_SHORT OMPI_DATATYPE_MPI_UINT16_T
|
||||
#elif SIZEOF_SHORT == 4
|
||||
#define OMPI_DATATYPE_MPI_SHORT OMPI_DATATYPE_MPI_INT32_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_SHORT OMPI_DATATYPE_MPI_UINT32_T
|
||||
#elif SIZEOF_SHORT == 8
|
||||
#define OMPI_DATATYPE_MPI_SHORT OMPI_DATATYPE_MPI_INT64_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_SHORT OMPI_DATATYPE_MPI_UINT64_T
|
||||
#endif
|
||||
|
||||
#if SIZEOF_INT == 1
|
||||
#define OMPI_DATATYPE_MPI_INT OMPI_DATATYPE_MPI_INT8_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_INT OMPI_DATATYPE_MPI_INT8_T
|
||||
#elif SIZEOF_INT == 2
|
||||
#define OMPI_DATATYPE_MPI_INT OMPI_DATATYPE_MPI_INT16_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_INT OMPI_DATATYPE_MPI_INT16_T
|
||||
#elif SIZEOF_INT == 4
|
||||
#define OMPI_DATATYPE_MPI_INT OMPI_DATATYPE_MPI_INT32_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_INT OMPI_DATATYPE_MPI_INT32_T
|
||||
#elif SIZEOF_INT == 8
|
||||
#define OMPI_DATATYPE_MPI_INT OMPI_DATATYPE_MPI_INT64_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_INT OMPI_DATATYPE_MPI_INT64_T
|
||||
#endif
|
||||
|
||||
#if SIZEOF_LONG == 1
|
||||
#define OMPI_DATATYPE_MPI_LONG OMPI_DATATYPE_MPI_INT8_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG OMPI_DATATYPE_MPI_INT8_T
|
||||
#elif SIZEOF_LONG == 2
|
||||
#define OMPI_DATATYPE_MPI_LONG OMPI_DATATYPE_MPI_INT16_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG OMPI_DATATYPE_MPI_INT16_T
|
||||
#elif SIZEOF_LONG == 4
|
||||
#define OMPI_DATATYPE_MPI_LONG OMPI_DATATYPE_MPI_INT32_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG OMPI_DATATYPE_MPI_INT32_T
|
||||
#elif SIZEOF_LONG == 8
|
||||
#define OMPI_DATATYPE_MPI_LONG OMPI_DATATYPE_MPI_INT64_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG OMPI_DATATYPE_MPI_INT64_T
|
||||
#endif
|
||||
|
||||
#if SIZEOF_LONG_LONG == 1
|
||||
#define OMPI_DATATYPE_MPI_LONG_LONG OMPI_DATATYPE_MPI_INT8_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG_LONG OMPI_DATATYPE_MPI_INT8_T
|
||||
#elif SIZEOF_LONG_LONG == 2
|
||||
#define OMPI_DATATYPE_MPI_LONG_LONG OMPI_DATATYPE_MPI_INT16_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG_LONG OMPI_DATATYPE_MPI_INT16_T
|
||||
#elif SIZEOF_LONG_LONG == 4
|
||||
#define OMPI_DATATYPE_MPI_LONG_LONG OMPI_DATATYPE_MPI_INT32_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG_LONG OMPI_DATATYPE_MPI_INT32_T
|
||||
#elif SIZEOF_LONG_LONG == 8
|
||||
#define OMPI_DATATYPE_MPI_LONG_LONG OMPI_DATATYPE_MPI_INT64_T
|
||||
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG_LONG OMPI_DATATYPE_MPI_INT64_T
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Optional Fortran datatypes, these map to representable types
|
||||
@ -95,56 +187,56 @@
|
||||
/* LOGICAL */
|
||||
#if OMPI_SIZEOF_FORTRAN_LOGICAL1 == OMPI_SIZEOF_FORTRAN_LOGICAL
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_LOGICAL
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == SIZEOF_CHAR
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_CHAR
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == SIZEOF_SHORT
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_SHORT
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == SIZEOF_INT
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_INT
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == SIZEOF_LONG
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_LONG
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == 1
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_INT8_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == 2
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_INT16_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == 4
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_INT32_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == 8
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_INT64_T
|
||||
#else
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL1 OMPI_DATATYPE_MPI_UNAVAILABLE
|
||||
#endif
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_LOGICAL2 == OMPI_SIZEOF_FORTRAN_LOGICAL
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_LOGICAL
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == SIZEOF_CHAR
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_CHAR
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == SIZEOF_SHORT
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_SHORT
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == SIZEOF_INT
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_INT
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == SIZEOF_LONG
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_LONG
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == 1
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_INT8_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == 2
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_INT16_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == 4
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_INT32_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == 8
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_INT64_T
|
||||
#else
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL2 OMPI_DATATYPE_MPI_UNAVAILABLE
|
||||
#endif
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_LOGICAL4 == OMPI_SIZEOF_FORTRAN_LOGICAL
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_LOGICAL
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == SIZEOF_CHAR
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_CHAR
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == SIZEOF_SHORT
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_SHORT
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == SIZEOF_INT
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_INT
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == SIZEOF_LONG
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_LONG
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == 1
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_INT8_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == 2
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_INT16_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == 4
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_INT32_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == 8
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_INT64_T
|
||||
#else
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL4 OMPI_DATATYPE_MPI_UNAVAILABLE
|
||||
#endif
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_LOGICAL8 == OMPI_SIZEOF_FORTRAN_LOGICAL
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_LOGICAL
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == SIZEOF_CHAR
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_CHAR
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == SIZEOF_SHORT
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_SHORT
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == SIZEOF_INT
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_INT
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == SIZEOF_LONG
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_LONG
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == 1
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_INT8_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == 2
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_INT16_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == 4
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_INT32_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == 8
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_INT64_T
|
||||
#else
|
||||
# define OMPI_DATATYPE_MPI_LOGICAL8 OMPI_DATATYPE_MPI_UNAVAILABLE
|
||||
#endif
|
||||
@ -152,70 +244,70 @@
|
||||
/* INTEGER */
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER1 == OMPI_SIZEOF_FORTRAN_INTEGER
|
||||
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_INTEGER
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER1 == SIZEOF_CHAR
|
||||
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_CHAR
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER1 == SIZEOF_SHORT
|
||||
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_SHORT
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER1 == SIZEOF_INT
|
||||
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_INT
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER1 == SIZEOF_LONG
|
||||
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_LONG
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER1 == 1
|
||||
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_INT8_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER1 == 2
|
||||
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_INT16_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER1 == 4
|
||||
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_INT32_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER1 == 8
|
||||
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_INT64_T
|
||||
#else
|
||||
# define OMPI_DATATYPE_MPI_INTEGER1 OMPI_DATATYPE_MPI_UNAVAILABLE
|
||||
#endif
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER2 == OMPI_SIZEOF_FORTRAN_INTEGER
|
||||
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_INTEGER
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER2 == SIZEOF_CHAR
|
||||
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_CHAR
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER2 == SIZEOF_SHORT
|
||||
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_SHORT
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER2 == SIZEOF_INT
|
||||
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_INT
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER2 == SIZEOF_LONG
|
||||
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_LONG
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER2 == 1
|
||||
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_INT8_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER2 == 2
|
||||
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_INT16_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER2 == 4
|
||||
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_INT32_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER2 == 8
|
||||
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_INT64_T
|
||||
#else
|
||||
# define OMPI_DATATYPE_MPI_INTEGER2 OMPI_DATATYPE_MPI_UNAVAILABLE
|
||||
#endif
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER4 == OMPI_SIZEOF_FORTRAN_INTEGER
|
||||
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_INTEGER
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER4 == SIZEOF_CHAR
|
||||
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_CHAR
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER4 == SIZEOF_SHORT
|
||||
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_SHORT
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER4 == SIZEOF_INT
|
||||
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_INT
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER4 == SIZEOF_LONG
|
||||
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_LONG
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER4 == 1
|
||||
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_INT8_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER4 == 2
|
||||
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_INT16_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER4 == 4
|
||||
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_INT32_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER4 == 8
|
||||
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_INT64_T
|
||||
#else
|
||||
# define OMPI_DATATYPE_MPI_INTEGER4 OMPI_DATATYPE_MPI_UNAVAILABLE
|
||||
#endif
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER8 == OMPI_SIZEOF_FORTRAN_INTEGER
|
||||
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_INTEGER
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER8 == SIZEOF_CHAR
|
||||
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_CHAR
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER8 == SIZEOF_SHORT
|
||||
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_SHORT
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER8 == SIZEOF_INT
|
||||
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_INT
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER8 == SIZEOF_LONG
|
||||
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_LONG
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER8 == 1
|
||||
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_INT8_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER8 == 2
|
||||
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_INT16_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER8 == 4
|
||||
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_INT32_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER8 == 8
|
||||
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_INT64_T
|
||||
#else
|
||||
# define OMPI_DATATYPE_MPI_INTEGER8 OMPI_DATATYPE_MPI_UNAVAILABLE
|
||||
#endif
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER16 == OMPI_SIZEOF_FORTRAN_INTEGER
|
||||
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_INTEGER
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER16 == SIZEOF_CHAR
|
||||
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_CHAR
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER16 == SIZEOF_SHORT
|
||||
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_SHORT
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER16 == SIZEOF_INT
|
||||
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_INT
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER16 == SIZEOF_LONG
|
||||
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_LONG
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER16 == 1
|
||||
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_INT8_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER16 == 2
|
||||
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_INT16_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER16 == 4
|
||||
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_INT32_T
|
||||
#elif OMPI_SIZEOF_FORTRAN_INTEGER16 == 8
|
||||
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_INT64_T
|
||||
#else
|
||||
# define OMPI_DATATYPE_MPI_INTEGER16 OMPI_DATATYPE_MPI_UNAVAILABLE
|
||||
#endif
|
||||
@ -383,10 +475,37 @@ extern const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX
|
||||
|
||||
#define OMPI_DATATYPE_INITIALIZER_LB OPAL_DATATYPE_INITIALIZER_LB
|
||||
#define OMPI_DATATYPE_INITIALIZER_UB OPAL_DATATYPE_INITIALIZER_UB
|
||||
|
||||
#define OMPI_DATATYPE_INITIALIZER_INT8_T OPAL_DATATYPE_INITIALIZER_INT1
|
||||
#define OMPI_DATATYPE_INITIALIZER_UINT8_T OPAL_DATATYPE_INITIALIZER_UINT1
|
||||
#define OMPI_DATATYPE_INITIALIZER_INT16_T OPAL_DATATYPE_INITIALIZER_INT2
|
||||
#define OMPI_DATATYPE_INITIALIZER_UINT16_T OPAL_DATATYPE_INITIALIZER_UINT2
|
||||
#define OMPI_DATATYPE_INITIALIZER_INT32_T OPAL_DATATYPE_INITIALIZER_INT4
|
||||
#define OMPI_DATATYPE_INITIALIZER_UINT32_T OPAL_DATATYPE_INITIALIZER_UINT4
|
||||
#define OMPI_DATATYPE_INITIALIZER_INT64_T OPAL_DATATYPE_INITIALIZER_INT8
|
||||
#define OMPI_DATATYPE_INITIALIZER_UINT64_T OPAL_DATATYPE_INITIALIZER_UINT8
|
||||
|
||||
#if SIZEOF_CHAR == 1
|
||||
#define OMPI_DATATYPE_INITIALIZER_CHAR OPAL_DATATYPE_INITIALIZER_INT1
|
||||
#define OMPI_DATATYPE_INITIALIZER_UNSIGNED_CHAR OPAL_DATATYPE_INITIALIZER_UINT1
|
||||
#define OMPI_DATATYPE_INITIALIZER_SIGNED_CHAR OPAL_DATATYPE_INITIALIZER_INT1
|
||||
#define OMPI_DATATYPE_INITIALIZER_BYTE OPAL_DATATYPE_INITIALIZER_UINT1
|
||||
#elif SIZEOF_CHAR == 2
|
||||
#define OMPI_DATATYPE_INITIALIZER_CHAR OPAL_DATATYPE_INITIALIZER_INT2
|
||||
#define OMPI_DATATYPE_INITIALIZER_UNSIGNED_CHAR OPAL_DATATYPE_INITIALIZER_UINT2
|
||||
#define OMPI_DATATYPE_INITIALIZER_SIGNED_CHAR OPAL_DATATYPE_INITIALIZER_INT2
|
||||
#define OMPI_DATATYPE_INITIALIZER_BYTE OPAL_DATATYPE_INITIALIZER_UINT2
|
||||
#elif SIZEOF_CHAR == 4
|
||||
#define OMPI_DATATYPE_INITIALIZER_CHAR OPAL_DATATYPE_INITIALIZER_INT4
|
||||
#define OMPI_DATATYPE_INITIALIZER_UNSIGNED_CHAR OPAL_DATATYPE_INITIALIZER_UINT4
|
||||
#define OMPI_DATATYPE_INITIALIZER_SIGNED_CHAR OPAL_DATATYPE_INITIALIZER_INT4
|
||||
#define OMPI_DATATYPE_INITIALIZER_BYTE OPAL_DATATYPE_INITIALIZER_UINT4
|
||||
#elif SIZEOF_CHAR == 8
|
||||
#define OMPI_DATATYPE_INITIALIZER_CHAR OPAL_DATATYPE_INITIALIZER_INT8
|
||||
#define OMPI_DATATYPE_INITIALIZER_UNSIGNED_CHAR OPAL_DATATYPE_INITIALIZER_UINT8
|
||||
#define OMPI_DATATYPE_INITIALIZER_SIGNED_CHAR OPAL_DATATYPE_INITIALIZER_INT8
|
||||
#define OMPI_DATATYPE_INITIALIZER_BYTE OPAL_DATATYPE_INITIALIZER_UINT8
|
||||
#endif
|
||||
|
||||
#if SIZEOF_SHORT == 2
|
||||
#define OMPI_DATATYPE_INITIALIZER_SHORT OPAL_DATATYPE_INITIALIZER_INT2
|
||||
@ -399,16 +518,6 @@ extern const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX
|
||||
#define OMPI_DATATYPE_INITIALIZER_UNSIGNED_SHORT OPAL_DATATYPE_INITIALIZER_UINT8
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Unfortunately, the following does not work:
|
||||
*
|
||||
#define OMPI_DATATYPE_INITIALIZER_INT OPAL_DATATYPE_INITIALIZER_INT ## SIZEOF_INT
|
||||
#define OMPI_DATATYPE_INITIALIZER_UINT OPAL_DATATYPE_INITIALIZER_UINT ## SIZEOF_INT
|
||||
#define OMPI_DATATYPE_INT OPAL_DATATYPE_INT ## SIZEOF_INT
|
||||
#define OMPI_DATATYPE_UNSIGNED_INT OPAL_DATATYPE_UINT ## SIZEOF_INT
|
||||
* therefore do it the long way
|
||||
*/
|
||||
|
||||
#if SIZEOF_INT == 2
|
||||
#define OMPI_DATATYPE_INITIALIZER_INT OPAL_DATATYPE_INITIALIZER_INT2
|
||||
#define OMPI_DATATYPE_INITIALIZER_UNSIGNED_INT OPAL_DATATYPE_INITIALIZER_UINT2
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2009 The University of Tennessee and The University
|
||||
* Copyright (c) 2004-2010 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
|
||||
@ -27,22 +27,12 @@
|
||||
|
||||
#include "ompi/constants.h"
|
||||
#include "opal/datatype/opal_convertor_internal.h"
|
||||
#include "opal/datatype/opal_datatype_internal.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "ompi/datatype/ompi_datatype.h"
|
||||
#include "ompi/datatype/ompi_datatype_internal.h"
|
||||
|
||||
#include "mpi.h"
|
||||
|
||||
#if OPAL_ENABLE_DEBUG
|
||||
#include "opal/mca/base/mca_base_param.h"
|
||||
/* These are used within test/datatype/position.c -- and therefore not static */
|
||||
int ompi_unpack_debug = 0;
|
||||
int ompi_pack_debug = 0;
|
||||
int ompi_copy_debug = 0;
|
||||
int ompi_position_debug = 0;
|
||||
#endif /* OPAL_ENABLE_DEBUG */
|
||||
|
||||
/* by default the debuging is turned off */
|
||||
int ompi_datatype_dfd = -1;
|
||||
OMPI_DECLSPEC union dt_elem_desc ompi_datatype_predefined_elem_desc[2 * OMPI_DATATYPE_MPI_MAX_PREDEFINED];
|
||||
@ -64,14 +54,12 @@ int32_t ompi_datatype_number_of_predefined_data = 0;
|
||||
* The Macros in the OMPI Layer differ in that:
|
||||
* Additionally to OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE, we have a OMPI_DATATYPE_INIT_PREDEFINED,
|
||||
* for all available types (getting rid of duplication of the name.
|
||||
* Of course initialization of ompi_mpi_datatype_null includes the string-name NULL,
|
||||
* which CPP converts to ((void*)0), which we do not really want...
|
||||
*/
|
||||
ompi_predefined_datatype_t ompi_mpi_datatype_null =
|
||||
{
|
||||
{
|
||||
OPAL_DATATYPE_INITIALIZER_NULL(OMPI_DATATYPE_FLAG_PREDEFINED),
|
||||
OMPI_DATATYPE_EMPTY_DATA(NULL),
|
||||
OPAL_DATATYPE_INITIALIZER_EMPTY(OMPI_DATATYPE_FLAG_PREDEFINED),
|
||||
OMPI_DATATYPE_EMPTY_DATA(EMPTY),
|
||||
},
|
||||
{0, } /* padding */
|
||||
};
|
||||
@ -251,6 +239,43 @@ ompi_predefined_datatype_t ompi_mpi_complex32 = OMPI_DATATYPE_INIT_DEFER (C
|
||||
ompi_predefined_datatype_t ompi_mpi_complex32 = OMPI_DATATYPE_INIT_UNAVAILABLE (COMPLEX32, OMPI_DATATYPE_FLAG_DATA_FORTRAN | OMPI_DATATYPE_FLAG_DATA_COMPLEX);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* MPI 2.2 Datatypes
|
||||
*/
|
||||
ompi_predefined_datatype_t ompi_mpi_int8_t = OMPI_DATATYPE_INIT_PREDEFINED( INT8_T, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT);
|
||||
ompi_predefined_datatype_t ompi_mpi_uint8_t = OMPI_DATATYPE_INIT_PREDEFINED( UINT8_T, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT);
|
||||
ompi_predefined_datatype_t ompi_mpi_int16_t = OMPI_DATATYPE_INIT_PREDEFINED( INT16_T, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT);
|
||||
ompi_predefined_datatype_t ompi_mpi_uint16_t = OMPI_DATATYPE_INIT_PREDEFINED(UINT16_T, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT);
|
||||
ompi_predefined_datatype_t ompi_mpi_int32_t = OMPI_DATATYPE_INIT_PREDEFINED( INT32_T, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT);
|
||||
ompi_predefined_datatype_t ompi_mpi_uint32_t = OMPI_DATATYPE_INIT_PREDEFINED(UINT32_T, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT);
|
||||
ompi_predefined_datatype_t ompi_mpi_int64_t = OMPI_DATATYPE_INIT_PREDEFINED( INT64_T, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT);
|
||||
ompi_predefined_datatype_t ompi_mpi_uint64_t = OMPI_DATATYPE_INIT_PREDEFINED(UINT64_T, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT);
|
||||
|
||||
#if SIZEOF_PTRDIFF_T == 4
|
||||
ompi_predefined_datatype_t ompi_mpi_aint = OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE(INT32_T, AINT, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT);
|
||||
#elif SIZEOF_PTRDIFF_T == 8
|
||||
ompi_predefined_datatype_t ompi_mpi_aint = OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE(INT64_T, AINT, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT);
|
||||
#else
|
||||
ompi_predefined_datatype_t ompi_mpi_aint = OMPI_DATATYPE_INIT_UNAVAILABLE_BASIC_TYPE(INT64_T, AINT, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT);
|
||||
#endif /* SIZEOF_PTRDIFF_T == SIZEOF_LONG */
|
||||
|
||||
#if OMPI_MPI_OFFSET_SIZE == 4
|
||||
ompi_predefined_datatype_t ompi_mpi_offset = OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE(UINT32_T, OFFSET, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT);
|
||||
#elif OMPI_MPI_OFFSET_SIZE == 8
|
||||
ompi_predefined_datatype_t ompi_mpi_offset = OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE(UINT64_T, OFFSET, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT);
|
||||
#else
|
||||
ompi_predefined_datatype_t ompi_mpi_offset = OMPI_DATATYPE_INIT_UNAVAILABLE_BASIC_TYPE(UINT64_T, OFFSET, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT);
|
||||
#endif /* OMPI_MPI_OFFSET_SIZE == SIZEOF_INT */
|
||||
|
||||
ompi_predefined_datatype_t ompi_mpi_c_bool = OMPI_DATATYPE_INIT_PREDEFINED (BOOL, OMPI_DATATYPE_FLAG_DATA_C);
|
||||
ompi_predefined_datatype_t ompi_mpi_c_complex = OMPI_DATATYPE_INIT_DEFER (COMPLEX, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
|
||||
ompi_predefined_datatype_t ompi_mpi_c_float_complex = OMPI_DATATYPE_INIT_DEFER (COMPLEX, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
|
||||
ompi_predefined_datatype_t ompi_mpi_c_double_complex = OMPI_DATATYPE_INIT_DEFER (DOUBLE_COMPLEX, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
|
||||
#if HAVE_LONG_DOUBLE
|
||||
ompi_predefined_datatype_t ompi_mpi_c_long_double_complex = OMPI_DATATYPE_INIT_DEFER (LONG_DOUBLE_COMPLEX, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
|
||||
#else
|
||||
ompi_predefined_datatype_t ompi_mpi_c_long_double_complex = OMPI_DATATYPE_INIT_UNAVAILABLE (LONG_DOUBLE_COMPLEX, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
|
||||
#endif /* HAVE_LONG_DOUBLE */
|
||||
|
||||
/*
|
||||
* NOTE: The order of this array *MUST* match what is listed in
|
||||
@ -258,55 +283,62 @@ ompi_predefined_datatype_t ompi_mpi_complex32 = OMPI_DATATYPE_INIT_UNAVAILA
|
||||
* Everything referring to types/ids should be ORDERED as in ompi_datatype_basicDatatypes array.
|
||||
*/
|
||||
const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX_PREDEFINED] = {
|
||||
&ompi_mpi_lb.dt, /* 0 */
|
||||
&ompi_mpi_ub.dt,
|
||||
&ompi_mpi_char.dt,
|
||||
&ompi_mpi_signed_char.dt,
|
||||
&ompi_mpi_unsigned_char.dt,
|
||||
&ompi_mpi_byte.dt, /* 5 */
|
||||
&ompi_mpi_short.dt,
|
||||
&ompi_mpi_unsigned_short.dt,
|
||||
&ompi_mpi_int.dt,
|
||||
&ompi_mpi_unsigned.dt,
|
||||
&ompi_mpi_long.dt, /* 10 */
|
||||
&ompi_mpi_unsigned_long.dt,
|
||||
&ompi_mpi_long_long_int.dt,
|
||||
&ompi_mpi_unsigned_long_long.dt,
|
||||
&ompi_mpi_float.dt,
|
||||
&ompi_mpi_double.dt, /* 15 */
|
||||
&ompi_mpi_long_double.dt,
|
||||
&ompi_mpi_complex8.dt,
|
||||
&ompi_mpi_complex16.dt,
|
||||
&ompi_mpi_complex32.dt,
|
||||
&ompi_mpi_wchar.dt, /* 20 */
|
||||
&ompi_mpi_packed.dt,
|
||||
&ompi_mpi_datatype_null.dt, /* 0x00 */
|
||||
&ompi_mpi_int8_t.dt, /* 0x01 */
|
||||
&ompi_mpi_uint8_t.dt, /* 0x02 */
|
||||
&ompi_mpi_int16_t.dt, /* 0x03 */
|
||||
&ompi_mpi_uint16_t.dt, /* 0x04 */
|
||||
&ompi_mpi_int32_t.dt, /* 0x05 */
|
||||
&ompi_mpi_uint32_t.dt, /* 0x06 */
|
||||
&ompi_mpi_int64_t.dt, /* 0x07 */
|
||||
&ompi_mpi_uint64_t.dt, /* 0x08 */
|
||||
&ompi_mpi_float.dt, /* 0x09 */
|
||||
&ompi_mpi_double.dt, /* 0x0A */
|
||||
&ompi_mpi_long_double.dt, /* 0x0B */
|
||||
&ompi_mpi_complex8.dt, /* 0x0C */
|
||||
&ompi_mpi_complex16.dt, /* 0x0D */
|
||||
&ompi_mpi_complex32.dt, /* 0x0E */
|
||||
&ompi_mpi_wchar.dt, /* 0x0F */
|
||||
&ompi_mpi_packed.dt, /* 0x10 */
|
||||
|
||||
/* C++ / C99 datatypes */
|
||||
&ompi_mpi_cxx_bool.dt,
|
||||
&ompi_mpi_cxx_bool.dt, /* 0x11 */
|
||||
|
||||
/* Fortran datatypes */
|
||||
&ompi_mpi_logical.dt,
|
||||
&ompi_mpi_character.dt,
|
||||
&ompi_mpi_integer.dt, /* 25 */
|
||||
&ompi_mpi_real.dt,
|
||||
&ompi_mpi_dblprec.dt,
|
||||
&ompi_mpi_cplex.dt,
|
||||
&ompi_mpi_dblcplex.dt,
|
||||
&ompi_mpi_ldblcplex.dt, /* 30 */
|
||||
&ompi_mpi_logical.dt, /* 0x12 */
|
||||
&ompi_mpi_character.dt, /* 0x13 */
|
||||
&ompi_mpi_integer.dt, /* 0x14 */
|
||||
&ompi_mpi_real.dt, /* 0x15 */
|
||||
&ompi_mpi_dblprec.dt, /* 0x16 */
|
||||
|
||||
/* Structure types, based on two basic types */
|
||||
&ompi_mpi_2int.dt,
|
||||
&ompi_mpi_2integer.dt,
|
||||
&ompi_mpi_2real.dt,
|
||||
&ompi_mpi_2dblprec.dt,
|
||||
&ompi_mpi_2cplex.dt, /* 35 */
|
||||
&ompi_mpi_2dblcplex.dt,
|
||||
&ompi_mpi_float_int.dt,
|
||||
&ompi_mpi_double_int.dt,
|
||||
&ompi_mpi_longdbl_int.dt,
|
||||
&ompi_mpi_long_int.dt, /* 40 */
|
||||
&ompi_mpi_short_int.dt,
|
||||
&ompi_mpi_unavailable.dt
|
||||
&ompi_mpi_cplex.dt, /* 0x17 */
|
||||
&ompi_mpi_dblcplex.dt, /* 0x18 */
|
||||
&ompi_mpi_ldblcplex.dt, /* 0x19 */
|
||||
&ompi_mpi_2int.dt, /* 0x1A */
|
||||
&ompi_mpi_2integer.dt, /* 0x1B */
|
||||
&ompi_mpi_2real.dt, /* 0x1C */
|
||||
&ompi_mpi_2dblprec.dt, /* 0x1D */
|
||||
&ompi_mpi_2cplex.dt, /* 0x1E */
|
||||
&ompi_mpi_2dblcplex.dt, /* 0x1F */
|
||||
|
||||
&ompi_mpi_float_int.dt, /* 0x20 */
|
||||
&ompi_mpi_double_int.dt, /* 0x21 */
|
||||
&ompi_mpi_longdbl_int.dt, /* 0x22 */
|
||||
&ompi_mpi_long_int.dt, /* 0x23 */
|
||||
&ompi_mpi_short_int.dt, /* 0x24 */
|
||||
|
||||
/* MPI 2.2 types */
|
||||
&ompi_mpi_aint.dt, /* 0x25 */
|
||||
&ompi_mpi_offset.dt, /* 0x26 */
|
||||
&ompi_mpi_c_bool.dt, /* 0x27 */
|
||||
&ompi_mpi_c_complex.dt, /* 0x28 */
|
||||
&ompi_mpi_c_float_complex.dt, /* 0x29 */
|
||||
&ompi_mpi_c_double_complex.dt, /* 0x2A */
|
||||
&ompi_mpi_c_long_double_complex.dt, /* 0x2B */
|
||||
|
||||
&ompi_mpi_lb.dt, /* 0x2C */
|
||||
&ompi_mpi_ub.dt, /* 0x2D */
|
||||
&ompi_mpi_unavailable.dt, /* 0x2E */
|
||||
};
|
||||
|
||||
opal_pointer_array_t ompi_datatype_f_to_c_table;
|
||||
@ -395,9 +427,10 @@ int32_t ompi_datatype_init( void )
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
for( i = OMPI_DATATYPE_FIRST_TYPE; i < OMPI_DATATYPE_MPI_MAX_PREDEFINED; i++ ) {
|
||||
for( i = 0; i < OMPI_DATATYPE_MPI_MAX_PREDEFINED; i++ ) {
|
||||
const ompi_datatype_t* datatype = (ompi_datatype_t*)ompi_datatype_basicDatatypes[i];
|
||||
|
||||
if( 0 == datatype->super.size ) continue;
|
||||
datatype->super.desc.desc[0].elem.common.flags = OPAL_DATATYPE_FLAG_PREDEFINED |
|
||||
OPAL_DATATYPE_FLAG_DATA |
|
||||
OPAL_DATATYPE_FLAG_CONTIGUOUS;
|
||||
@ -509,86 +542,102 @@ int32_t ompi_datatype_init( void )
|
||||
/* This macro makes everything significantly easier to read below.
|
||||
All hail the moog! :-) */
|
||||
|
||||
#define MOOG(name) \
|
||||
#define MOOG(name, index) \
|
||||
{ \
|
||||
ompi_mpi_##name.dt.d_f_to_c_index = \
|
||||
opal_pointer_array_add(&ompi_datatype_f_to_c_table, &ompi_mpi_##name); \
|
||||
if( ompi_datatype_number_of_predefined_data < (ompi_mpi_##name).dt.d_f_to_c_index ) \
|
||||
ompi_datatype_number_of_predefined_data = (ompi_mpi_##name).dt.d_f_to_c_index; \
|
||||
assert( (index) == ompi_mpi_##name.dt.d_f_to_c_index ); \
|
||||
}
|
||||
|
||||
/*
|
||||
* This MUST match the order of ompi/include/mpif-common.h
|
||||
* Any change will break binary compatibility of Fortran programs.
|
||||
*/
|
||||
MOOG(datatype_null);
|
||||
MOOG(byte);
|
||||
MOOG(packed);
|
||||
MOOG(ub);
|
||||
MOOG(lb);
|
||||
MOOG(character);
|
||||
MOOG(logical);
|
||||
MOOG(integer);
|
||||
MOOG(integer1);
|
||||
MOOG(integer2);
|
||||
MOOG(integer4);
|
||||
MOOG(integer8);
|
||||
MOOG(integer16);
|
||||
MOOG(real);
|
||||
MOOG(real4);
|
||||
MOOG(real8);
|
||||
MOOG(real16);
|
||||
MOOG(dblprec);
|
||||
MOOG(cplex);
|
||||
MOOG(complex8);
|
||||
MOOG(complex16);
|
||||
MOOG(complex32);
|
||||
MOOG(dblcplex);
|
||||
MOOG(2real);
|
||||
MOOG(2dblprec);
|
||||
MOOG(2integer);
|
||||
MOOG(2cplex);
|
||||
MOOG(2dblcplex);
|
||||
MOOG(real2);
|
||||
MOOG(logical1);
|
||||
MOOG(logical2);
|
||||
MOOG(logical4);
|
||||
MOOG(logical8);
|
||||
MOOG(datatype_null, 0);
|
||||
MOOG(byte, 1);
|
||||
MOOG(packed, 2);
|
||||
MOOG(ub, 3);
|
||||
MOOG(lb, 4);
|
||||
MOOG(character, 5);
|
||||
MOOG(logical, 6);
|
||||
MOOG(integer, 7);
|
||||
MOOG(integer1, 8);
|
||||
MOOG(integer2, 9);
|
||||
MOOG(integer4, 10);
|
||||
MOOG(integer8, 11);
|
||||
MOOG(integer16, 12);
|
||||
MOOG(real, 13);
|
||||
MOOG(real4, 14);
|
||||
MOOG(real8, 15);
|
||||
MOOG(real16, 16);
|
||||
MOOG(dblprec, 17);
|
||||
MOOG(cplex, 18);
|
||||
MOOG(complex8, 19);
|
||||
MOOG(complex16, 20);
|
||||
MOOG(complex32, 21);
|
||||
MOOG(dblcplex, 22);
|
||||
MOOG(2real, 23);
|
||||
MOOG(2dblprec, 24);
|
||||
MOOG(2integer, 25);
|
||||
MOOG(2cplex, 26);
|
||||
MOOG(2dblcplex, 27);
|
||||
MOOG(real2, 28);
|
||||
MOOG(logical1, 29);
|
||||
MOOG(logical2, 30);
|
||||
MOOG(logical4, 31);
|
||||
MOOG(logical8, 32);
|
||||
|
||||
/* Now the C types */
|
||||
|
||||
MOOG(wchar);
|
||||
MOOG(char);
|
||||
MOOG(unsigned_char);
|
||||
MOOG(signed_char);
|
||||
MOOG(short);
|
||||
MOOG(unsigned_short);
|
||||
MOOG(int);
|
||||
MOOG(unsigned);
|
||||
MOOG(long);
|
||||
MOOG(unsigned_long);
|
||||
MOOG(long_long_int);
|
||||
MOOG(unsigned_long_long);
|
||||
MOOG(wchar, 33);
|
||||
MOOG(char, 34);
|
||||
MOOG(unsigned_char, 35);
|
||||
MOOG(signed_char, 36);
|
||||
MOOG(short, 37);
|
||||
MOOG(unsigned_short, 38);
|
||||
MOOG(int, 39);
|
||||
MOOG(unsigned, 40);
|
||||
MOOG(long, 41);
|
||||
MOOG(unsigned_long, 42);
|
||||
MOOG(long_long_int, 43);
|
||||
MOOG(unsigned_long_long, 44);
|
||||
|
||||
MOOG(float);
|
||||
MOOG(double);
|
||||
MOOG(long_double);
|
||||
MOOG(float, 45);
|
||||
MOOG(double, 46);
|
||||
MOOG(long_double, 47);
|
||||
|
||||
MOOG(float_int);
|
||||
MOOG(double_int);
|
||||
MOOG(longdbl_int);
|
||||
MOOG(long_int);
|
||||
MOOG(2int);
|
||||
MOOG(short_int);
|
||||
MOOG(float_int, 48);
|
||||
MOOG(double_int, 49);
|
||||
MOOG(longdbl_int, 50);
|
||||
MOOG(long_int, 51);
|
||||
MOOG(2int, 52);
|
||||
MOOG(short_int, 53);
|
||||
|
||||
/* C++ types */
|
||||
|
||||
MOOG(cxx_bool);
|
||||
MOOG(cxx_cplex);
|
||||
MOOG(cxx_dblcplex);
|
||||
MOOG(cxx_ldblcplex);
|
||||
MOOG(cxx_bool, 54);
|
||||
MOOG(cxx_cplex, 55);
|
||||
MOOG(cxx_dblcplex, 56);
|
||||
MOOG(cxx_ldblcplex, 57);
|
||||
|
||||
for( i = 0; i < ompi_mpi_cxx_ldblcplex.dt.d_f_to_c_index; i++ ) {
|
||||
/* MPI 2.2 types */
|
||||
MOOG(int8_t, 58);
|
||||
MOOG(uint8_t, 59);
|
||||
MOOG(int16_t, 60);
|
||||
MOOG(uint16_t, 61);
|
||||
MOOG(int32_t, 62);
|
||||
MOOG(uint32_t, 63);
|
||||
MOOG(int64_t, 64);
|
||||
MOOG(uint64_t, 65);
|
||||
MOOG(aint, 66);
|
||||
MOOG(offset, 67);
|
||||
|
||||
/**
|
||||
* Now make sure all non-contiguous types are marked as such.
|
||||
*/
|
||||
for( i = 0; i < ompi_mpi_offset.dt.d_f_to_c_index; i++ ) {
|
||||
opal_datatype_t* datatype = (opal_datatype_t*)opal_pointer_array_get_item(&ompi_datatype_f_to_c_table, i );
|
||||
|
||||
if( (datatype->ub - datatype->lb) == (OPAL_PTRDIFF_TYPE)datatype->size ) {
|
||||
@ -712,9 +761,9 @@ void ompi_datatype_dump( const ompi_datatype_t* pData )
|
||||
(long)pData->super.lb, (long)pData->super.ub, (long)(pData->super.ub - pData->super.lb),
|
||||
(int)pData->super.nbElems, (int)pData->super.btypes[OPAL_DATATYPE_LOOP], (int)pData->super.flags );
|
||||
/* dump the flags */
|
||||
if( ompi_datatype_is_predefined(pData) )
|
||||
if( ompi_datatype_is_predefined(pData) ) {
|
||||
index += snprintf( buffer + index, length - index, "predefined " );
|
||||
else {
|
||||
} else {
|
||||
if( pData->super.flags & OPAL_DATATYPE_FLAG_COMMITED ) index += snprintf( buffer + index, length - index, "commited " );
|
||||
if( pData->super.flags & OPAL_DATATYPE_FLAG_CONTIGUOUS) index += snprintf( buffer + index, length - index, "contiguous " );
|
||||
}
|
||||
|
@ -125,9 +125,24 @@
|
||||
/* Whether we have FORTRAN REAL*8 or not */
|
||||
#undef OMPI_HAVE_FORTRAN_REAL8
|
||||
|
||||
/* Whether we have float _Complex or not */
|
||||
#undef HAVE_FLOAT__COMPLEX
|
||||
|
||||
/* Whether we have double _Complex or not */
|
||||
#undef HAVE_DOUBLE__COMPLEX
|
||||
|
||||
/* Whether we have long double _Complex or not */
|
||||
#undef HAVE_LONG_DOUBLE__COMPLEX
|
||||
|
||||
/* Type of MPI_Offset -- has to be defined here and typedef'ed later because mpi.h does not get AC SUBST's */
|
||||
#undef OMPI_MPI_OFFSET_TYPE
|
||||
|
||||
/* MPI datatype corresponding to MPI_Offset */
|
||||
#undef OMPI_OFFSET_DATATYPE
|
||||
|
||||
/* Size of the MPI_Offset corresponding type */
|
||||
#undef OMPI_MPI_OFFSET_SIZE
|
||||
|
||||
/* type to use for ptrdiff_t, if it does not exist, set to ptrdiff_t if it does exist */
|
||||
#undef OPAL_PTRDIFF_TYPE
|
||||
|
||||
@ -156,9 +171,6 @@
|
||||
/* Whether or not we have compiled with C++ exceptions support */
|
||||
#undef OMPI_HAVE_CXX_EXCEPTION_SUPPORT
|
||||
|
||||
/* MPI datatype corresponding to MPI_Offset */
|
||||
#undef OMPI_OFFSET_DATATYPE
|
||||
|
||||
/* Major, minor, and release version of Open MPI */
|
||||
#undef OMPI_MAJOR_VERSION
|
||||
#undef OMPI_MINOR_VERSION
|
||||
@ -831,6 +843,22 @@ OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex8;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex16;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex32;
|
||||
|
||||
/* New datatypes from the MPI 2.2 standard */
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_int8_t;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_uint8_t;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_int16_t;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_uint16_t;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_int32_t;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_uint32_t;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_int64_t;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_uint64_t;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_aint;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_offset;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_c_bool;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_c_complex;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_c_float_complex;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_c_double_complex;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_c_long_double_complex;
|
||||
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_errhandler_t ompi_mpi_errhandler_null;
|
||||
OMPI_DECLSPEC extern struct ompi_predefined_errhandler_t ompi_mpi_errors_are_fatal;
|
||||
@ -956,6 +984,29 @@ OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUSES_IGNORE;
|
||||
#define MPI_2DOUBLE_PRECISION OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_2dblprec)
|
||||
#define MPI_2INTEGER OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_2integer)
|
||||
|
||||
/* New datatypes from the MPI 2.2 standard */
|
||||
#define MPI_INT8_T OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_int8_t)
|
||||
#define MPI_UINT8_T OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_uint8_t)
|
||||
#define MPI_INT16_T OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_int16_t)
|
||||
#define MPI_UINT16_T OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_uint16_t)
|
||||
#define MPI_INT32_T OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_int32_t)
|
||||
#define MPI_UINT32_T OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_uint32_t)
|
||||
#define MPI_INT64_T OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_int64_t)
|
||||
#define MPI_UINT64_T OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_uint64_t)
|
||||
#define MPI_AINT OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_aint)
|
||||
#define MPI_OFFSET OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_offset)
|
||||
#define MPI_C_BOOL OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_c_bool)
|
||||
#if HAVE_FLOAT__COMPLEX
|
||||
#define MPI_C_COMPLEX OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_c_complex)
|
||||
#define MPI_C_FLOAT_COMPLEX OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_c_float_complex)
|
||||
#endif
|
||||
#if HAVE_DOUBLE__COMPLEX
|
||||
#define MPI_C_DOUBLE_COMPLEX OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_c_double_complex)
|
||||
#endif
|
||||
#if HAVE_LONG_DOUBLE__COMPLEX
|
||||
#define MPI_C_LONG_DOUBLE_COMPLEX OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_c_long_double_complex)
|
||||
#endif
|
||||
|
||||
#define MPI_ERRORS_ARE_FATAL OMPI_PREDEFINED_GLOBAL(MPI_Errhandler, ompi_mpi_errors_are_fatal)
|
||||
#define MPI_ERRORS_RETURN OMPI_PREDEFINED_GLOBAL(MPI_Errhandler, ompi_mpi_errors_return)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
! Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
! University Research and Technology
|
||||
! Corporation. All rights reserved.
|
||||
! Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
! Copyright (c) 2004-2010 The University of Tennessee and The University
|
||||
! of Tennessee Research Foundation. All rights
|
||||
! reserved.
|
||||
! Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
|
||||
@ -412,42 +412,95 @@
|
||||
! other MPI implementations that have them, so it's good for us to have
|
||||
! as well.
|
||||
integer MPI_LOGICAL1, MPI_LOGICAL2, MPI_LOGICAL4, MPI_LOGICAL8
|
||||
|
||||
! All other MPI types including the C and C++, as well as the
|
||||
! ones defined in the MPI 2.2
|
||||
integer MPI_WCHAR, MPI_CHAR
|
||||
integer MPI_SIGNED_CHAR, MPI_UNSIGNED_CHAR
|
||||
integer MPI_SHORT, MPI_UNSIGNED_SHORT
|
||||
integer MPI_INT, MPI_UNSIGNED, MPI_LONG
|
||||
integer MPI_UNSIGNED_LONG, MPI_LONG_LONG_INT
|
||||
integer MPI_UNSIGNED_LONG_LONG
|
||||
integer MPI_FLOAT, MPI_DOUBLE, MPI_LONG_DOUBLE
|
||||
integer MPI_FLOAT_INT, MPI_DOUBLE_INT
|
||||
integer MPI_LONGDBL_INT, MPI_LONG_INT
|
||||
integer MPI_2INT, MPI_SHORT_INT
|
||||
integer MPI_CXX_BOOL, MPI_CXX_CPLEX
|
||||
integer MPI_CXX_DBLCPLEX, MPI_CXX_LDBLCPLEX
|
||||
integer MPI_INT8_T, MPI_UINT8_T
|
||||
integer MPI_INT16_T, MPI_UINT16_T
|
||||
integer MPI_INT32_T, MPI_UINT32_T
|
||||
integer MPI_INT64_T, MPI_UINT64_T
|
||||
integer MPI_AINT, MPI_OFFSET
|
||||
!
|
||||
! Do NOT change the order of these parameters
|
||||
!
|
||||
parameter (MPI_BYTE=1)
|
||||
parameter (MPI_PACKED=2)
|
||||
parameter (MPI_UB=3)
|
||||
parameter (MPI_LB=4)
|
||||
parameter (MPI_CHARACTER=5)
|
||||
parameter (MPI_LOGICAL=6)
|
||||
parameter (MPI_INTEGER=7)
|
||||
parameter (MPI_INTEGER1=8)
|
||||
parameter (MPI_INTEGER2=9)
|
||||
parameter (MPI_INTEGER4=10)
|
||||
parameter (MPI_INTEGER8=11)
|
||||
parameter (MPI_INTEGER16=12)
|
||||
parameter (MPI_REAL=13)
|
||||
parameter (MPI_REAL4=14)
|
||||
parameter (MPI_REAL8=15)
|
||||
parameter (MPI_REAL16=16)
|
||||
parameter (MPI_DOUBLE_PRECISION=17)
|
||||
parameter (MPI_COMPLEX=18)
|
||||
parameter (MPI_COMPLEX8=19)
|
||||
parameter (MPI_COMPLEX16=20)
|
||||
parameter (MPI_COMPLEX32=21)
|
||||
parameter (MPI_DOUBLE_COMPLEX=22)
|
||||
parameter (MPI_2REAL=23)
|
||||
parameter (MPI_2DOUBLE_PRECISION=24)
|
||||
parameter (MPI_2INTEGER=25)
|
||||
parameter (MPI_2COMPLEX=26)
|
||||
parameter (MPI_2DOUBLE_COMPLEX=27)
|
||||
parameter (MPI_REAL2=28)
|
||||
parameter (MPI_LOGICAL1=29)
|
||||
parameter (MPI_LOGICAL2=30)
|
||||
parameter (MPI_LOGICAL4=31)
|
||||
parameter (MPI_LOGICAL8=32)
|
||||
parameter (MPI_BYTE = 1)
|
||||
parameter (MPI_PACKED = 2)
|
||||
parameter (MPI_UB = 3)
|
||||
parameter (MPI_LB = 4)
|
||||
parameter (MPI_CHARACTER = 5)
|
||||
parameter (MPI_LOGICAL = 6)
|
||||
parameter (MPI_INTEGER = 7)
|
||||
parameter (MPI_INTEGER1 = 8)
|
||||
parameter (MPI_INTEGER2 = 9)
|
||||
parameter (MPI_INTEGER4 = 10)
|
||||
parameter (MPI_INTEGER8 = 11)
|
||||
parameter (MPI_INTEGER16 = 12)
|
||||
parameter (MPI_REAL = 13)
|
||||
parameter (MPI_REAL4 = 14)
|
||||
parameter (MPI_REAL8 = 15)
|
||||
parameter (MPI_REAL16 = 16)
|
||||
parameter (MPI_DOUBLE_PRECISION = 17)
|
||||
parameter (MPI_COMPLEX = 18)
|
||||
parameter (MPI_COMPLEX8 = 19)
|
||||
parameter (MPI_COMPLEX16 = 20)
|
||||
parameter (MPI_COMPLEX32 = 21)
|
||||
parameter (MPI_DOUBLE_COMPLEX = 22)
|
||||
parameter (MPI_2REAL = 23)
|
||||
parameter (MPI_2DOUBLE_PRECISION = 24)
|
||||
parameter (MPI_2INTEGER = 25)
|
||||
parameter (MPI_2COMPLEX = 26)
|
||||
parameter (MPI_2DOUBLE_COMPLEX = 27)
|
||||
parameter (MPI_REAL2 = 28)
|
||||
parameter (MPI_LOGICAL1 = 29)
|
||||
parameter (MPI_LOGICAL2 = 30)
|
||||
parameter (MPI_LOGICAL4 = 31)
|
||||
parameter (MPI_LOGICAL8 = 32)
|
||||
parameter (MPI_WCHAR = 33)
|
||||
parameter (MPI_CHAR = 34)
|
||||
parameter (MPI_UNSIGNED_CHAR = 35)
|
||||
parameter (MPI_SIGNED_CHAR = 36)
|
||||
parameter (MPI_SHORT = 37)
|
||||
parameter (MPI_UNSIGNED_SHORT = 38)
|
||||
parameter (MPI_INT = 39)
|
||||
parameter (MPI_UNSIGNED = 40)
|
||||
parameter (MPI_LONG = 41)
|
||||
parameter (MPI_UNSIGNED_LONG = 42)
|
||||
parameter (MPI_LONG_LONG_INT = 43)
|
||||
parameter (MPI_UNSIGNED_LONG_LONG = 44)
|
||||
parameter (MPI_FLOAT = 45)
|
||||
parameter (MPI_DOUBLE = 46)
|
||||
parameter (MPI_LONG_DOUBLE = 47)
|
||||
parameter (MPI_FLOAT_INT = 48)
|
||||
parameter (MPI_DOUBLE_INT = 49)
|
||||
parameter (MPI_LONGDBL_INT = 50)
|
||||
parameter (MPI_LONG_INT = 51)
|
||||
parameter (MPI_2INT = 52)
|
||||
parameter (MPI_SHORT_INT = 53)
|
||||
parameter (MPI_CXX_BOOL = 54)
|
||||
parameter (MPI_CXX_CPLEX = 55)
|
||||
parameter (MPI_CXX_DBLCPLEX = 56)
|
||||
parameter (MPI_CXX_LDBLCPLEX = 57)
|
||||
parameter (MPI_INT8_T = 58)
|
||||
parameter (MPI_UINT8_T = 59)
|
||||
parameter (MPI_INT16_T = 60)
|
||||
parameter (MPI_UINT16_T = 61)
|
||||
parameter (MPI_INT32_T = 62)
|
||||
parameter (MPI_UINT32_T = 63)
|
||||
parameter (MPI_INT64_T = 64)
|
||||
parameter (MPI_UINT64_T = 65)
|
||||
parameter (MPI_AINT = 66)
|
||||
parameter (MPI_OFFSET = 67)
|
||||
|
||||
integer MPI_MAX, MPI_MIN, MPI_SUM, MPI_PROD, MPI_LAND
|
||||
integer MPI_BAND, MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* Copyright (c) 2004-2010 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
|
||||
@ -30,27 +30,17 @@
|
||||
#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)
|
||||
|
||||
/* C integer */
|
||||
|
||||
#define OMPI_OP_HANDLER_C_INTEGER_INTRINSIC(name) \
|
||||
void ompi_op_base_##name##_unsigned_char OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_signed_char OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_int OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_long OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_short OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_unsigned_short OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_unsigned OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_unsigned_long OMPI_OP_PROTO;
|
||||
#if HAVE_LONG_LONG
|
||||
#define OMPI_OP_HANDLER_C_INTEGER_OPTIONAL(name) \
|
||||
void ompi_op_base_##name##_long_long_int OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_long_long OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_unsigned_long_long OMPI_OP_PROTO;
|
||||
#else
|
||||
#define OMPI_OP_HANDLER_C_INTEGER_OPTIONAL(name)
|
||||
#endif
|
||||
void ompi_op_base_##name##_int8_t OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_uint8_t OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_int16_t OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_uint16_t OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_int32_t OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_uint32_t OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_int64_t OMPI_OP_PROTO; \
|
||||
void ompi_op_base_##name##_uint64_t OMPI_OP_PROTO;
|
||||
#define OMPI_OP_HANDLER_C_INTEGER(name) \
|
||||
OMPI_OP_HANDLER_C_INTEGER_INTRINSIC(name) \
|
||||
OMPI_OP_HANDLER_C_INTEGER_OPTIONAL(name) \
|
||||
OMPI_OP_HANDLER_C_INTEGER_INTRINSIC(name)
|
||||
|
||||
/* Fortran integer */
|
||||
|
||||
@ -287,25 +277,16 @@ BEGIN_C_DECLS
|
||||
/* C integer */
|
||||
|
||||
#define OMPI_OP_3BUFF_HANDLER_C_INTEGER_INTRINSIC(name) \
|
||||
void ompi_op_base_3buff_##name##_unsigned_char OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_signed_char OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_int OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_long OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_short OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_unsigned_short OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_unsigned OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_unsigned_long OMPI_OP_PROTO_3BUF;
|
||||
#if HAVE_LONG_LONG
|
||||
#define OMPI_OP_3BUFF_HANDLER_C_INTEGER_OPTIONAL(name) \
|
||||
void ompi_op_base_3buff_##name##_long_long_int OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_long_long OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_unsigned_long_long OMPI_OP_PROTO_3BUF;
|
||||
#else
|
||||
#define OMPI_OP_3BUFF_HANDLER_C_INTEGER_OPTIONAL(name)
|
||||
#endif
|
||||
void ompi_op_base_3buff_##name##_int8_t OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_uint8_t OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_int16_t OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_uint16_t OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_int32_t OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_uint32_t OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_int64_t OMPI_OP_PROTO_3BUF; \
|
||||
void ompi_op_base_3buff_##name##_uint64_t OMPI_OP_PROTO_3BUF;
|
||||
#define OMPI_OP_3BUFF_HANDLER_C_INTEGER(name) \
|
||||
OMPI_OP_3BUFF_HANDLER_C_INTEGER_INTRINSIC(name) \
|
||||
OMPI_OP_3BUFF_HANDLER_C_INTEGER_OPTIONAL(name) \
|
||||
OMPI_OP_3BUFF_HANDLER_C_INTEGER_INTRINSIC(name)
|
||||
|
||||
/* Fortran integer */
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
||||
* Copyright (c) 2004-2010 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
|
||||
@ -138,18 +138,14 @@
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a) > (b) ? (a) : (b))
|
||||
/* C integer */
|
||||
FUNC_FUNC(max, signed_char, signed char)
|
||||
FUNC_FUNC(max, unsigned_char, unsigned char)
|
||||
FUNC_FUNC(max, int, int)
|
||||
FUNC_FUNC(max, long, long)
|
||||
FUNC_FUNC(max, short, short)
|
||||
FUNC_FUNC(max, unsigned_short, unsigned short)
|
||||
FUNC_FUNC(max, unsigned, unsigned)
|
||||
FUNC_FUNC(max, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC(max, long_long_int, long long int)
|
||||
FUNC_FUNC(max, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC(max, int8_t, int8_t)
|
||||
FUNC_FUNC(max, uint8_t, uint8_t)
|
||||
FUNC_FUNC(max, int16_t, int16_t)
|
||||
FUNC_FUNC(max, uint16_t, uint16_t)
|
||||
FUNC_FUNC(max, int32_t, int32_t)
|
||||
FUNC_FUNC(max, uint32_t, uint32_t)
|
||||
FUNC_FUNC(max, int64_t, int64_t)
|
||||
FUNC_FUNC(max, uint64_t, uint64_t)
|
||||
/* Fortran integer */
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER
|
||||
FUNC_FUNC(max, fortran_integer, ompi_fortran_integer_t)
|
||||
@ -202,18 +198,14 @@ FUNC_FUNC(max, fortran_real16, ompi_fortran_real16_t)
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a) < (b) ? (a) : (b))
|
||||
/* C integer */
|
||||
FUNC_FUNC(min, signed_char, signed char)
|
||||
FUNC_FUNC(min, unsigned_char, unsigned char)
|
||||
FUNC_FUNC(min, int, int)
|
||||
FUNC_FUNC(min, long, long)
|
||||
FUNC_FUNC(min, short, short)
|
||||
FUNC_FUNC(min, unsigned_short, unsigned short)
|
||||
FUNC_FUNC(min, unsigned, unsigned)
|
||||
FUNC_FUNC(min, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC(min, long_long_int, long long int)
|
||||
FUNC_FUNC(min, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC(min, int8_t, int8_t)
|
||||
FUNC_FUNC(min, uint8_t, uint8_t)
|
||||
FUNC_FUNC(min, int16_t, int16_t)
|
||||
FUNC_FUNC(min, uint16_t, uint16_t)
|
||||
FUNC_FUNC(min, int32_t, int32_t)
|
||||
FUNC_FUNC(min, uint32_t, uint32_t)
|
||||
FUNC_FUNC(min, int64_t, int64_t)
|
||||
FUNC_FUNC(min, uint64_t, uint64_t)
|
||||
/* Fortran integer */
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER
|
||||
FUNC_FUNC(min, fortran_integer, ompi_fortran_integer_t)
|
||||
@ -263,18 +255,14 @@ FUNC_FUNC(min, fortran_real16, ompi_fortran_real16_t)
|
||||
*************************************************************************/
|
||||
|
||||
/* C integer */
|
||||
OP_FUNC(sum, signed_char, signed char, +=)
|
||||
OP_FUNC(sum, unsigned_char, unsigned char, +=)
|
||||
OP_FUNC(sum, int, int, +=)
|
||||
OP_FUNC(sum, long, long, +=)
|
||||
OP_FUNC(sum, short, short, +=)
|
||||
OP_FUNC(sum, unsigned_short, unsigned short, +=)
|
||||
OP_FUNC(sum, unsigned, unsigned, +=)
|
||||
OP_FUNC(sum, unsigned_long, unsigned long, +=)
|
||||
#if HAVE_LONG_LONG
|
||||
OP_FUNC(sum, long_long_int, long long int, +=)
|
||||
OP_FUNC(sum, unsigned_long_long, unsigned long long, +=)
|
||||
#endif
|
||||
OP_FUNC(sum, int8_t, int8_t, +=)
|
||||
OP_FUNC(sum, uint8_t, uint8_t, +=)
|
||||
OP_FUNC(sum, int16_t, int16_t, +=)
|
||||
OP_FUNC(sum, uint16_t, uint16_t, +=)
|
||||
OP_FUNC(sum, int32_t, int32_t, +=)
|
||||
OP_FUNC(sum, uint32_t, uint32_t, +=)
|
||||
OP_FUNC(sum, int64_t, int64_t, +=)
|
||||
OP_FUNC(sum, uint64_t, uint64_t, +=)
|
||||
/* Fortran integer */
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER
|
||||
OP_FUNC(sum, fortran_integer, ompi_fortran_integer_t, +=)
|
||||
@ -340,18 +328,14 @@ COMPLEX_OP_FUNC_SUM(fortran_complex32, ompi_fortran_complex32_t)
|
||||
*************************************************************************/
|
||||
|
||||
/* C integer */
|
||||
OP_FUNC(prod, signed_char, signed char, *=)
|
||||
OP_FUNC(prod, unsigned_char, unsigned char, *=)
|
||||
OP_FUNC(prod, int, int, *=)
|
||||
OP_FUNC(prod, long, long, *=)
|
||||
OP_FUNC(prod, short, short, *=)
|
||||
OP_FUNC(prod, unsigned_short, unsigned short, *=)
|
||||
OP_FUNC(prod, unsigned, unsigned, *=)
|
||||
OP_FUNC(prod, unsigned_long, unsigned long, *=)
|
||||
#if HAVE_LONG_LONG
|
||||
OP_FUNC(prod, long_long_int, long long int, *=)
|
||||
OP_FUNC(prod, unsigned_long_long, unsigned long long, *=)
|
||||
#endif
|
||||
OP_FUNC(prod, int8_t, int8_t, *=)
|
||||
OP_FUNC(prod, uint8_t, uint8_t, *=)
|
||||
OP_FUNC(prod, int16_t, int16_t, *=)
|
||||
OP_FUNC(prod, uint16_t, uint16_t, *=)
|
||||
OP_FUNC(prod, int32_t, int32_t, *=)
|
||||
OP_FUNC(prod, uint32_t, uint32_t, *=)
|
||||
OP_FUNC(prod, int64_t, int64_t, *=)
|
||||
OP_FUNC(prod, uint64_t, uint64_t, *=)
|
||||
/* Fortran integer */
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER
|
||||
OP_FUNC(prod, fortran_integer, ompi_fortran_integer_t, *=)
|
||||
@ -419,18 +403,14 @@ COMPLEX_OP_FUNC_PROD(fortran_complex32, ompi_fortran_complex32_t)
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a) && (b))
|
||||
/* C integer */
|
||||
FUNC_FUNC(land, unsigned_char, unsigned char)
|
||||
FUNC_FUNC(land, signed_char, signed char)
|
||||
FUNC_FUNC(land, int, int)
|
||||
FUNC_FUNC(land, long, long)
|
||||
FUNC_FUNC(land, short, short)
|
||||
FUNC_FUNC(land, unsigned_short, unsigned short)
|
||||
FUNC_FUNC(land, unsigned, unsigned)
|
||||
FUNC_FUNC(land, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC(land, long_long_int, long long int)
|
||||
FUNC_FUNC(land, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC(land, int8_t, int8_t)
|
||||
FUNC_FUNC(land, uint8_t, uint8_t)
|
||||
FUNC_FUNC(land, int16_t, int16_t)
|
||||
FUNC_FUNC(land, uint16_t, uint16_t)
|
||||
FUNC_FUNC(land, int32_t, int32_t)
|
||||
FUNC_FUNC(land, uint32_t, uint32_t)
|
||||
FUNC_FUNC(land, int64_t, int64_t)
|
||||
FUNC_FUNC(land, uint64_t, uint64_t)
|
||||
/* Logical */
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL
|
||||
FUNC_FUNC(land, fortran_logical, ompi_fortran_logical_t)
|
||||
@ -445,18 +425,14 @@ FUNC_FUNC(land, bool, bool)
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a) || (b))
|
||||
/* C integer */
|
||||
FUNC_FUNC(lor, unsigned_char, unsigned char)
|
||||
FUNC_FUNC(lor, signed_char, signed char)
|
||||
FUNC_FUNC(lor, int, int)
|
||||
FUNC_FUNC(lor, long, long)
|
||||
FUNC_FUNC(lor, short, short)
|
||||
FUNC_FUNC(lor, unsigned_short, unsigned short)
|
||||
FUNC_FUNC(lor, unsigned, unsigned)
|
||||
FUNC_FUNC(lor, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC(lor, long_long_int, long long int)
|
||||
FUNC_FUNC(lor, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC(lor, int8_t, int8_t)
|
||||
FUNC_FUNC(lor, uint8_t, uint8_t)
|
||||
FUNC_FUNC(lor, int16_t, int16_t)
|
||||
FUNC_FUNC(lor, uint16_t, uint16_t)
|
||||
FUNC_FUNC(lor, int32_t, int32_t)
|
||||
FUNC_FUNC(lor, uint32_t, uint32_t)
|
||||
FUNC_FUNC(lor, int64_t, int64_t)
|
||||
FUNC_FUNC(lor, uint64_t, uint64_t)
|
||||
/* Logical */
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL
|
||||
FUNC_FUNC(lor, fortran_logical, ompi_fortran_logical_t)
|
||||
@ -471,18 +447,14 @@ FUNC_FUNC(lor, bool, bool)
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a ? 1 : 0) ^ (b ? 1: 0))
|
||||
/* C integer */
|
||||
FUNC_FUNC(lxor, unsigned_char, unsigned char)
|
||||
FUNC_FUNC(lxor, signed_char, signed char)
|
||||
FUNC_FUNC(lxor, int, int)
|
||||
FUNC_FUNC(lxor, long, long)
|
||||
FUNC_FUNC(lxor, short, short)
|
||||
FUNC_FUNC(lxor, unsigned_short, unsigned short)
|
||||
FUNC_FUNC(lxor, unsigned, unsigned)
|
||||
FUNC_FUNC(lxor, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC(lxor, long_long_int, long long int)
|
||||
FUNC_FUNC(lxor, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC(lxor, int8_t, int8_t)
|
||||
FUNC_FUNC(lxor, uint8_t, uint8_t)
|
||||
FUNC_FUNC(lxor, int16_t, int16_t)
|
||||
FUNC_FUNC(lxor, uint16_t, uint16_t)
|
||||
FUNC_FUNC(lxor, int32_t, int32_t)
|
||||
FUNC_FUNC(lxor, uint32_t, uint32_t)
|
||||
FUNC_FUNC(lxor, int64_t, int64_t)
|
||||
FUNC_FUNC(lxor, uint64_t, uint64_t)
|
||||
/* Logical */
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL
|
||||
FUNC_FUNC(lxor, fortran_logical, ompi_fortran_logical_t)
|
||||
@ -497,18 +469,14 @@ FUNC_FUNC(lxor, bool, bool)
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a) & (b))
|
||||
/* C integer */
|
||||
FUNC_FUNC(band, unsigned_char, unsigned char)
|
||||
FUNC_FUNC(band, signed_char, signed char)
|
||||
FUNC_FUNC(band, int, int)
|
||||
FUNC_FUNC(band, long, long)
|
||||
FUNC_FUNC(band, short, short)
|
||||
FUNC_FUNC(band, unsigned_short, unsigned short)
|
||||
FUNC_FUNC(band, unsigned, unsigned)
|
||||
FUNC_FUNC(band, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC(band, long_long_int, long long int)
|
||||
FUNC_FUNC(band, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC(band, int8_t, int8_t)
|
||||
FUNC_FUNC(band, uint8_t, uint8_t)
|
||||
FUNC_FUNC(band, int16_t, int16_t)
|
||||
FUNC_FUNC(band, uint16_t, uint16_t)
|
||||
FUNC_FUNC(band, int32_t, int32_t)
|
||||
FUNC_FUNC(band, uint32_t, uint32_t)
|
||||
FUNC_FUNC(band, int64_t, int64_t)
|
||||
FUNC_FUNC(band, uint64_t, uint64_t)
|
||||
/* Fortran integer */
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER
|
||||
FUNC_FUNC(band, fortran_integer, ompi_fortran_integer_t)
|
||||
@ -538,18 +506,14 @@ FUNC_FUNC(band, byte, char)
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a) | (b))
|
||||
/* C integer */
|
||||
FUNC_FUNC(bor, unsigned_char, unsigned char)
|
||||
FUNC_FUNC(bor, signed_char, signed char)
|
||||
FUNC_FUNC(bor, int, int)
|
||||
FUNC_FUNC(bor, long, long)
|
||||
FUNC_FUNC(bor, short, short)
|
||||
FUNC_FUNC(bor, unsigned_short, unsigned short)
|
||||
FUNC_FUNC(bor, unsigned, unsigned)
|
||||
FUNC_FUNC(bor, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC(bor, long_long_int, long long int)
|
||||
FUNC_FUNC(bor, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC(bor, int8_t, int8_t)
|
||||
FUNC_FUNC(bor, uint8_t, uint8_t)
|
||||
FUNC_FUNC(bor, int16_t, int16_t)
|
||||
FUNC_FUNC(bor, uint16_t, uint16_t)
|
||||
FUNC_FUNC(bor, int32_t, int32_t)
|
||||
FUNC_FUNC(bor, uint32_t, uint32_t)
|
||||
FUNC_FUNC(bor, int64_t, int64_t)
|
||||
FUNC_FUNC(bor, uint64_t, uint64_t)
|
||||
/* Fortran integer */
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER
|
||||
FUNC_FUNC(bor, fortran_integer, ompi_fortran_integer_t)
|
||||
@ -579,18 +543,14 @@ FUNC_FUNC(bor, byte, char)
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a) ^ (b))
|
||||
/* C integer */
|
||||
FUNC_FUNC(bxor, unsigned_char, unsigned char)
|
||||
FUNC_FUNC(bxor, signed_char, signed char)
|
||||
FUNC_FUNC(bxor, int, int)
|
||||
FUNC_FUNC(bxor, long, long)
|
||||
FUNC_FUNC(bxor, short, short)
|
||||
FUNC_FUNC(bxor, unsigned_short, unsigned short)
|
||||
FUNC_FUNC(bxor, unsigned, unsigned)
|
||||
FUNC_FUNC(bxor, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC(bxor, long_long_int, long long int)
|
||||
FUNC_FUNC(bxor, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC(bxor, int8_t, int8_t)
|
||||
FUNC_FUNC(bxor, uint8_t, uint8_t)
|
||||
FUNC_FUNC(bxor, int16_t, int16_t)
|
||||
FUNC_FUNC(bxor, uint16_t, uint16_t)
|
||||
FUNC_FUNC(bxor, int32_t, int32_t)
|
||||
FUNC_FUNC(bxor, uint32_t, uint32_t)
|
||||
FUNC_FUNC(bxor, int64_t, int64_t)
|
||||
FUNC_FUNC(bxor, uint64_t, uint64_t)
|
||||
/* Fortran integer */
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER
|
||||
FUNC_FUNC(bxor, fortran_integer, ompi_fortran_integer_t)
|
||||
@ -803,18 +763,14 @@ LOC_FUNC(minloc, long_double_int, <)
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a) > (b) ? (a) : (b))
|
||||
/* C integer */
|
||||
FUNC_FUNC_3BUF(max, signed_char, signed char)
|
||||
FUNC_FUNC_3BUF(max, unsigned_char, unsigned char)
|
||||
FUNC_FUNC_3BUF(max, int, int)
|
||||
FUNC_FUNC_3BUF(max, long, long)
|
||||
FUNC_FUNC_3BUF(max, short, short)
|
||||
FUNC_FUNC_3BUF(max, unsigned_short, unsigned short)
|
||||
FUNC_FUNC_3BUF(max, unsigned, unsigned)
|
||||
FUNC_FUNC_3BUF(max, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC_3BUF(max, long_long_int, long long int)
|
||||
FUNC_FUNC_3BUF(max, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC_3BUF(max, int8_t, int8_t)
|
||||
FUNC_FUNC_3BUF(max, uint8_t, uint8_t)
|
||||
FUNC_FUNC_3BUF(max, int16_t, int16_t)
|
||||
FUNC_FUNC_3BUF(max, uint16_t, uint16_t)
|
||||
FUNC_FUNC_3BUF(max, int32_t, int32_t)
|
||||
FUNC_FUNC_3BUF(max, uint32_t, uint32_t)
|
||||
FUNC_FUNC_3BUF(max, int64_t, int64_t)
|
||||
FUNC_FUNC_3BUF(max, uint64_t, uint64_t)
|
||||
/* Fortran integer */
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER
|
||||
FUNC_FUNC_3BUF(max, fortran_integer, ompi_fortran_integer_t)
|
||||
@ -867,18 +823,14 @@ FUNC_FUNC_3BUF(max, fortran_real16, ompi_fortran_real16_t)
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a) < (b) ? (a) : (b))
|
||||
/* C integer */
|
||||
FUNC_FUNC_3BUF(min, signed_char, signed char)
|
||||
FUNC_FUNC_3BUF(min, unsigned_char, unsigned char)
|
||||
FUNC_FUNC_3BUF(min, int, int)
|
||||
FUNC_FUNC_3BUF(min, long, long)
|
||||
FUNC_FUNC_3BUF(min, short, short)
|
||||
FUNC_FUNC_3BUF(min, unsigned_short, unsigned short)
|
||||
FUNC_FUNC_3BUF(min, unsigned, unsigned)
|
||||
FUNC_FUNC_3BUF(min, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC_3BUF(min, long_long_int, long long int)
|
||||
FUNC_FUNC_3BUF(min, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC_3BUF(min, int8_t, int8_t)
|
||||
FUNC_FUNC_3BUF(min, uint8_t, uint8_t)
|
||||
FUNC_FUNC_3BUF(min, int16_t, int16_t)
|
||||
FUNC_FUNC_3BUF(min, uint16_t, uint16_t)
|
||||
FUNC_FUNC_3BUF(min, int32_t, int32_t)
|
||||
FUNC_FUNC_3BUF(min, uint32_t, uint32_t)
|
||||
FUNC_FUNC_3BUF(min, int64_t, int64_t)
|
||||
FUNC_FUNC_3BUF(min, uint64_t, uint64_t)
|
||||
/* Fortran integer */
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER
|
||||
FUNC_FUNC_3BUF(min, fortran_integer, ompi_fortran_integer_t)
|
||||
@ -928,18 +880,14 @@ FUNC_FUNC_3BUF(min, fortran_real16, ompi_fortran_real16_t)
|
||||
*************************************************************************/
|
||||
|
||||
/* C integer */
|
||||
OP_FUNC_3BUF(sum, signed_char, signed char, +)
|
||||
OP_FUNC_3BUF(sum, unsigned_char, unsigned char, +)
|
||||
OP_FUNC_3BUF(sum, int, int, +)
|
||||
OP_FUNC_3BUF(sum, long, long, +)
|
||||
OP_FUNC_3BUF(sum, short, short, +)
|
||||
OP_FUNC_3BUF(sum, unsigned_short, unsigned short, +)
|
||||
OP_FUNC_3BUF(sum, unsigned, unsigned, +)
|
||||
OP_FUNC_3BUF(sum, unsigned_long, unsigned long, +)
|
||||
#if HAVE_LONG_LONG
|
||||
OP_FUNC_3BUF(sum, long_long_int, long long int, +)
|
||||
OP_FUNC_3BUF(sum, unsigned_long_long, unsigned long long, +)
|
||||
#endif
|
||||
OP_FUNC_3BUF(sum, int8_t, int8_t, +=)
|
||||
OP_FUNC_3BUF(sum, uint8_t, uint8_t, +=)
|
||||
OP_FUNC_3BUF(sum, int16_t, int16_t, +=)
|
||||
OP_FUNC_3BUF(sum, uint16_t, uint16_t, +=)
|
||||
OP_FUNC_3BUF(sum, int32_t, int32_t, +=)
|
||||
OP_FUNC_3BUF(sum, uint32_t, uint32_t, +=)
|
||||
OP_FUNC_3BUF(sum, int64_t, int64_t, +=)
|
||||
OP_FUNC_3BUF(sum, uint64_t, uint64_t, +=)
|
||||
/* Fortran integer */
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER
|
||||
OP_FUNC_3BUF(sum, fortran_integer, ompi_fortran_integer_t, +)
|
||||
@ -1005,18 +953,14 @@ COMPLEX_OP_FUNC_SUM_3BUF(fortran_complex32, ompi_fortran_complex32_t)
|
||||
*************************************************************************/
|
||||
|
||||
/* C integer */
|
||||
OP_FUNC_3BUF(prod, signed_char, signed char, *)
|
||||
OP_FUNC_3BUF(prod, unsigned_char, unsigned char, *)
|
||||
OP_FUNC_3BUF(prod, int, int, *)
|
||||
OP_FUNC_3BUF(prod, long, long, *)
|
||||
OP_FUNC_3BUF(prod, short, short, *)
|
||||
OP_FUNC_3BUF(prod, unsigned_short, unsigned short, *)
|
||||
OP_FUNC_3BUF(prod, unsigned, unsigned, *)
|
||||
OP_FUNC_3BUF(prod, unsigned_long, unsigned long, *)
|
||||
#if HAVE_LONG_LONG
|
||||
OP_FUNC_3BUF(prod, long_long_int, long long int, *)
|
||||
OP_FUNC_3BUF(prod, unsigned_long_long, unsigned long long, *)
|
||||
#endif
|
||||
OP_FUNC_3BUF(prod, int8_t, int8_t, *=)
|
||||
OP_FUNC_3BUF(prod, uint8_t, uint8_t, *=)
|
||||
OP_FUNC_3BUF(prod, int16_t, int16_t, *=)
|
||||
OP_FUNC_3BUF(prod, uint16_t, uint16_t, *=)
|
||||
OP_FUNC_3BUF(prod, int32_t, int32_t, *=)
|
||||
OP_FUNC_3BUF(prod, uint32_t, uint32_t, *=)
|
||||
OP_FUNC_3BUF(prod, int64_t, int64_t, *=)
|
||||
OP_FUNC_3BUF(prod, uint64_t, uint64_t, *=)
|
||||
/* Fortran integer */
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER
|
||||
OP_FUNC_3BUF(prod, fortran_integer, ompi_fortran_integer_t, *)
|
||||
@ -1084,18 +1028,14 @@ COMPLEX_OP_FUNC_PROD_3BUF(fortran_complex32, ompi_fortran_complex32_t)
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a) && (b))
|
||||
/* C integer */
|
||||
FUNC_FUNC_3BUF(land, unsigned_char, unsigned char)
|
||||
FUNC_FUNC_3BUF(land, signed_char, signed char)
|
||||
FUNC_FUNC_3BUF(land, int, int)
|
||||
FUNC_FUNC_3BUF(land, long, long)
|
||||
FUNC_FUNC_3BUF(land, short, short)
|
||||
FUNC_FUNC_3BUF(land, unsigned_short, unsigned short)
|
||||
FUNC_FUNC_3BUF(land, unsigned, unsigned)
|
||||
FUNC_FUNC_3BUF(land, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC_3BUF(land, long_long_int, long long int)
|
||||
FUNC_FUNC_3BUF(land, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC_3BUF(land, int8_t, int8_t)
|
||||
FUNC_FUNC_3BUF(land, uint8_t, uint8_t)
|
||||
FUNC_FUNC_3BUF(land, int16_t, int16_t)
|
||||
FUNC_FUNC_3BUF(land, uint16_t, uint16_t)
|
||||
FUNC_FUNC_3BUF(land, int32_t, int32_t)
|
||||
FUNC_FUNC_3BUF(land, uint32_t, uint32_t)
|
||||
FUNC_FUNC_3BUF(land, int64_t, int64_t)
|
||||
FUNC_FUNC_3BUF(land, uint64_t, uint64_t)
|
||||
/* Logical */
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL
|
||||
FUNC_FUNC_3BUF(land, fortran_logical, ompi_fortran_logical_t)
|
||||
@ -1110,18 +1050,14 @@ FUNC_FUNC_3BUF(land, bool, bool)
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a) || (b))
|
||||
/* C integer */
|
||||
FUNC_FUNC_3BUF(lor, unsigned_char, unsigned char)
|
||||
FUNC_FUNC_3BUF(lor, signed_char, signed char)
|
||||
FUNC_FUNC_3BUF(lor, int, int)
|
||||
FUNC_FUNC_3BUF(lor, long, long)
|
||||
FUNC_FUNC_3BUF(lor, short, short)
|
||||
FUNC_FUNC_3BUF(lor, unsigned_short, unsigned short)
|
||||
FUNC_FUNC_3BUF(lor, unsigned, unsigned)
|
||||
FUNC_FUNC_3BUF(lor, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC_3BUF(lor, long_long_int, long long int)
|
||||
FUNC_FUNC_3BUF(lor, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC_3BUF(lor, int8_t, int8_t)
|
||||
FUNC_FUNC_3BUF(lor, uint8_t, uint8_t)
|
||||
FUNC_FUNC_3BUF(lor, int16_t, int16_t)
|
||||
FUNC_FUNC_3BUF(lor, uint16_t, uint16_t)
|
||||
FUNC_FUNC_3BUF(lor, int32_t, int32_t)
|
||||
FUNC_FUNC_3BUF(lor, uint32_t, uint32_t)
|
||||
FUNC_FUNC_3BUF(lor, int64_t, int64_t)
|
||||
FUNC_FUNC_3BUF(lor, uint64_t, uint64_t)
|
||||
/* Logical */
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL
|
||||
FUNC_FUNC_3BUF(lor, fortran_logical, ompi_fortran_logical_t)
|
||||
@ -1136,18 +1072,14 @@ FUNC_FUNC_3BUF(lor, bool, bool)
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a ? 1 : 0) ^ (b ? 1: 0))
|
||||
/* C integer */
|
||||
FUNC_FUNC_3BUF(lxor, unsigned_char, unsigned char)
|
||||
FUNC_FUNC_3BUF(lxor, signed_char, signed char)
|
||||
FUNC_FUNC_3BUF(lxor, int, int)
|
||||
FUNC_FUNC_3BUF(lxor, long, long)
|
||||
FUNC_FUNC_3BUF(lxor, short, short)
|
||||
FUNC_FUNC_3BUF(lxor, unsigned_short, unsigned short)
|
||||
FUNC_FUNC_3BUF(lxor, unsigned, unsigned)
|
||||
FUNC_FUNC_3BUF(lxor, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC_3BUF(lxor, long_long_int, long long int)
|
||||
FUNC_FUNC_3BUF(lxor, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC_3BUF(lxor, int8_t, int8_t)
|
||||
FUNC_FUNC_3BUF(lxor, uint8_t, uint8_t)
|
||||
FUNC_FUNC_3BUF(lxor, int16_t, int16_t)
|
||||
FUNC_FUNC_3BUF(lxor, uint16_t, uint16_t)
|
||||
FUNC_FUNC_3BUF(lxor, int32_t, int32_t)
|
||||
FUNC_FUNC_3BUF(lxor, uint32_t, uint32_t)
|
||||
FUNC_FUNC_3BUF(lxor, int64_t, int64_t)
|
||||
FUNC_FUNC_3BUF(lxor, uint64_t, uint64_t)
|
||||
/* Logical */
|
||||
#if OMPI_HAVE_FORTRAN_LOGICAL
|
||||
FUNC_FUNC_3BUF(lxor, fortran_logical, ompi_fortran_logical_t)
|
||||
@ -1162,18 +1094,14 @@ FUNC_FUNC_3BUF(lxor, bool, bool)
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a) & (b))
|
||||
/* C integer */
|
||||
FUNC_FUNC_3BUF(band, unsigned_char, unsigned char)
|
||||
FUNC_FUNC_3BUF(band, signed_char, signed char)
|
||||
FUNC_FUNC_3BUF(band, int, int)
|
||||
FUNC_FUNC_3BUF(band, long, long)
|
||||
FUNC_FUNC_3BUF(band, short, short)
|
||||
FUNC_FUNC_3BUF(band, unsigned_short, unsigned short)
|
||||
FUNC_FUNC_3BUF(band, unsigned, unsigned)
|
||||
FUNC_FUNC_3BUF(band, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC_3BUF(band, long_long_int, long long int)
|
||||
FUNC_FUNC_3BUF(band, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC_3BUF(band, int8_t, int8_t)
|
||||
FUNC_FUNC_3BUF(band, uint8_t, uint8_t)
|
||||
FUNC_FUNC_3BUF(band, int16_t, int16_t)
|
||||
FUNC_FUNC_3BUF(band, uint16_t, uint16_t)
|
||||
FUNC_FUNC_3BUF(band, int32_t, int32_t)
|
||||
FUNC_FUNC_3BUF(band, uint32_t, uint32_t)
|
||||
FUNC_FUNC_3BUF(band, int64_t, int64_t)
|
||||
FUNC_FUNC_3BUF(band, uint64_t, uint64_t)
|
||||
/* Fortran integer */
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER
|
||||
FUNC_FUNC_3BUF(band, fortran_integer, ompi_fortran_integer_t)
|
||||
@ -1203,18 +1131,14 @@ FUNC_FUNC_3BUF(band, byte, char)
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a) | (b))
|
||||
/* C integer */
|
||||
FUNC_FUNC_3BUF(bor, unsigned_char, unsigned char)
|
||||
FUNC_FUNC_3BUF(bor, signed_char, signed char)
|
||||
FUNC_FUNC_3BUF(bor, int, int)
|
||||
FUNC_FUNC_3BUF(bor, long, long)
|
||||
FUNC_FUNC_3BUF(bor, short, short)
|
||||
FUNC_FUNC_3BUF(bor, unsigned_short, unsigned short)
|
||||
FUNC_FUNC_3BUF(bor, unsigned, unsigned)
|
||||
FUNC_FUNC_3BUF(bor, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC_3BUF(bor, long_long_int, long long int)
|
||||
FUNC_FUNC_3BUF(bor, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC_3BUF(bor, int8_t, int8_t)
|
||||
FUNC_FUNC_3BUF(bor, uint8_t, uint8_t)
|
||||
FUNC_FUNC_3BUF(bor, int16_t, int16_t)
|
||||
FUNC_FUNC_3BUF(bor, uint16_t, uint16_t)
|
||||
FUNC_FUNC_3BUF(bor, int32_t, int32_t)
|
||||
FUNC_FUNC_3BUF(bor, uint32_t, uint32_t)
|
||||
FUNC_FUNC_3BUF(bor, int64_t, int64_t)
|
||||
FUNC_FUNC_3BUF(bor, uint64_t, uint64_t)
|
||||
/* Fortran integer */
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER
|
||||
FUNC_FUNC_3BUF(bor, fortran_integer, ompi_fortran_integer_t)
|
||||
@ -1244,18 +1168,14 @@ FUNC_FUNC_3BUF(bor, byte, char)
|
||||
#undef current_func
|
||||
#define current_func(a, b) ((a) ^ (b))
|
||||
/* C integer */
|
||||
FUNC_FUNC_3BUF(bxor, unsigned_char, unsigned char)
|
||||
FUNC_FUNC_3BUF(bxor, signed_char, signed char)
|
||||
FUNC_FUNC_3BUF(bxor, int, int)
|
||||
FUNC_FUNC_3BUF(bxor, long, long)
|
||||
FUNC_FUNC_3BUF(bxor, short, short)
|
||||
FUNC_FUNC_3BUF(bxor, unsigned_short, unsigned short)
|
||||
FUNC_FUNC_3BUF(bxor, unsigned, unsigned)
|
||||
FUNC_FUNC_3BUF(bxor, unsigned_long, unsigned long)
|
||||
#if HAVE_LONG_LONG
|
||||
FUNC_FUNC_3BUF(bxor, long_long_int, long long int)
|
||||
FUNC_FUNC_3BUF(bxor, unsigned_long_long, unsigned long long)
|
||||
#endif
|
||||
FUNC_FUNC_3BUF(bxor, int8_t, int8_t)
|
||||
FUNC_FUNC_3BUF(bxor, uint8_t, uint8_t)
|
||||
FUNC_FUNC_3BUF(bxor, int16_t, int16_t)
|
||||
FUNC_FUNC_3BUF(bxor, uint16_t, uint16_t)
|
||||
FUNC_FUNC_3BUF(bxor, int32_t, int32_t)
|
||||
FUNC_FUNC_3BUF(bxor, uint32_t, uint32_t)
|
||||
FUNC_FUNC_3BUF(bxor, int64_t, int64_t)
|
||||
FUNC_FUNC_3BUF(bxor, uint64_t, uint64_t)
|
||||
/* Fortran integer */
|
||||
#if OMPI_HAVE_FORTRAN_INTEGER
|
||||
FUNC_FUNC_3BUF(bxor, fortran_integer, ompi_fortran_integer_t)
|
||||
@ -1358,44 +1278,6 @@ LOC_FUNC_3BUF(minloc, long_double_int, <)
|
||||
*/
|
||||
|
||||
/** C integer ***********************************************************/
|
||||
|
||||
#ifdef HAVE_LONG_LONG
|
||||
#define C_INTEGER_LONG_LONG(name) \
|
||||
ompi_op_base_##name##_long_long_int, /* OMPI_OP_BASE_TYPE_LONG_LONG_INT */ \
|
||||
ompi_op_base_##name##_unsigned_long_long /* OMPI_OP_BASE_TYPE_UNSIGNED_LONG_LONG */
|
||||
#define C_INTEGER_LONG_LONG_3BUFF(name) \
|
||||
ompi_op_base_3buff_##name##_long_long_int, /* OMPI_OP_BASE_TYPE_LONG_LONG_INT */ \
|
||||
ompi_op_base_3buff_##name##_unsigned_long_long /* OMPI_OP_BASE_TYPE_UNSIGNED_LONG_LONG */
|
||||
#else
|
||||
#define C_INTEGER_LONG_LONG(name) \
|
||||
NULL, /* OMPI_OP_BASE_TYPE_LONG_LONG_INT */ \
|
||||
NULL /* OMPI_OP_BASE_TYPE_UNSIGNED_LONG_LONG */
|
||||
#define C_INTEGER_LONG_LONG_3BUFF(name) \
|
||||
NULL, /* OMPI_OP_BASE_TYPE_LONG_LONG_INT */ \
|
||||
NULL /* OMPI_OP_BASE_TYPE_UNSIGNED_LONG_LONG */
|
||||
#endif
|
||||
|
||||
#define C_INTEGER(name) \
|
||||
ompi_op_base_##name##_unsigned_char, /* OMPI_OP_BASE_TYPE_UNSIGNED_CHAR */ \
|
||||
ompi_op_base_##name##_signed_char, /* OMPI_OP_BASE_TYPE_SIGNED_CHAR */ \
|
||||
ompi_op_base_##name##_int, /* OMPI_OP_BASE_TYPE_INT */ \
|
||||
ompi_op_base_##name##_long, /* OMPI_OP_BASE_TYPE_LONG */ \
|
||||
ompi_op_base_##name##_short, /* OMPI_OP_BASE_TYPE_SHORT */ \
|
||||
ompi_op_base_##name##_unsigned_short, /* OMPI_OP_BASE_TYPE_UNSIGNED_SHORT */ \
|
||||
ompi_op_base_##name##_unsigned, /* OMPI_OP_BASE_TYPE_UNSIGNED */ \
|
||||
ompi_op_base_##name##_unsigned_long, /* OMPI_OP_BASE_TYPE_UNSIGNED_LONG */ \
|
||||
C_INTEGER_LONG_LONG(name)
|
||||
#define C_INTEGER_3BUFF(name) \
|
||||
ompi_op_base_3buff_##name##_unsigned_char, /* OMPI_OP_BASE_TYPE_UNSIGNED_CHAR */ \
|
||||
ompi_op_base_3buff_##name##_signed_char, /* OMPI_OP_BASE_TYPE_SIGNED_CHAR */ \
|
||||
ompi_op_base_3buff_##name##_int, /* OMPI_OP_BASE_TYPE_INT */ \
|
||||
ompi_op_base_3buff_##name##_long, /* OMPI_OP_BASE_TYPE_LONG */ \
|
||||
ompi_op_base_3buff_##name##_short, /* OMPI_OP_BASE_TYPE_SHORT */ \
|
||||
ompi_op_base_3buff_##name##_unsigned_short, /* OMPI_OP_BASE_TYPE_UNSIGNED_SHORT */ \
|
||||
ompi_op_base_3buff_##name##_unsigned, /* OMPI_OP_BASE_TYPE_UNSIGNED */ \
|
||||
ompi_op_base_3buff_##name##_unsigned_long, /* OMPI_OP_BASE_TYPE_UNSIGNED_LONG */ \
|
||||
C_INTEGER_LONG_LONG_3BUFF(name)
|
||||
|
||||
#define C_INTEGER_NULL \
|
||||
NULL, /* OMPI_OP_BASE_TYPE_UNSIGNED_CHAR */ \
|
||||
NULL, /* OMPI_OP_BASE_TYPE_SIGNED_CHAR */ \
|
||||
@ -1404,9 +1286,7 @@ LOC_FUNC_3BUF(minloc, long_double_int, <)
|
||||
NULL, /* OMPI_OP_BASE_TYPE_SHORT */ \
|
||||
NULL, /* OMPI_OP_BASE_TYPE_UNSIGNED_SHORT */ \
|
||||
NULL, /* OMPI_OP_BASE_TYPE_UNSIGNED */ \
|
||||
NULL, /* OMPI_OP_BASE_TYPE_UNSIGNED_LONG */ \
|
||||
NULL, /* OMPI_OP_BASE_TYPE_LONG_LONG_INT */ \
|
||||
NULL /* OMPI_OP_BASE_TYPE_UNSIGNED_LONG_LONG */
|
||||
NULL /* OMPI_OP_BASE_TYPE_UNSIGNED_LONG */
|
||||
|
||||
#define C_INTEGER_NULL_3BUFF \
|
||||
NULL, /* OMPI_OP_BASE_TYPE_UNSIGNED_CHAR */ \
|
||||
@ -1416,9 +1296,27 @@ LOC_FUNC_3BUF(minloc, long_double_int, <)
|
||||
NULL, /* OMPI_OP_BASE_TYPE_SHORT */ \
|
||||
NULL, /* OMPI_OP_BASE_TYPE_UNSIGNED_SHORT */ \
|
||||
NULL, /* OMPI_OP_BASE_TYPE_UNSIGNED */ \
|
||||
NULL, /* OMPI_OP_BASE_TYPE_UNSIGNED_LONG */ \
|
||||
NULL, /* OMPI_OP_BASE_TYPE_LONG_LONG_INT */ \
|
||||
NULL /* OMPI_OP_BASE_TYPE_UNSIGNED_LONG_LONG */
|
||||
NULL /* OMPI_OP_BASE_TYPE_UNSIGNED_LONG */
|
||||
|
||||
#define C_INTEGER(name) \
|
||||
ompi_op_base_##name##_int8_t, /* OMPI_OP_BASE_TYPE_UNSIGNED_CHAR */ \
|
||||
ompi_op_base_##name##_uint8_t, /* OMPI_OP_BASE_TYPE_SIGNED_CHAR */ \
|
||||
ompi_op_base_##name##_int16_t, /* OMPI_OP_BASE_TYPE_INT */ \
|
||||
ompi_op_base_##name##_uint16_t, /* OMPI_OP_BASE_TYPE_LONG */ \
|
||||
ompi_op_base_##name##_int32_t, /* OMPI_OP_BASE_TYPE_SHORT */ \
|
||||
ompi_op_base_##name##_uint32_t, /* OMPI_OP_BASE_TYPE_UNSIGNED_SHORT */ \
|
||||
ompi_op_base_##name##_int64_t, /* OMPI_OP_BASE_TYPE_UNSIGNED */ \
|
||||
ompi_op_base_##name##_uint64_t /* OMPI_OP_BASE_TYPE_UNSIGNED_LONG */
|
||||
|
||||
#define C_INTEGER_3BUFF(name) \
|
||||
ompi_op_base_3buff_##name##_int8_t, /* OMPI_OP_BASE_TYPE_UNSIGNED_CHAR */ \
|
||||
ompi_op_base_3buff_##name##_uint8_t, /* OMPI_OP_BASE_TYPE_SIGNED_CHAR */ \
|
||||
ompi_op_base_3buff_##name##_int16_t, /* OMPI_OP_BASE_TYPE_INT */ \
|
||||
ompi_op_base_3buff_##name##_uint16_t, /* OMPI_OP_BASE_TYPE_LONG */ \
|
||||
ompi_op_base_3buff_##name##_int32_t, /* OMPI_OP_BASE_TYPE_SHORT */ \
|
||||
ompi_op_base_3buff_##name##_uint32_t, /* OMPI_OP_BASE_TYPE_UNSIGNED_SHORT */ \
|
||||
ompi_op_base_3buff_##name##_int64_t, /* OMPI_OP_BASE_TYPE_UNSIGNED */ \
|
||||
ompi_op_base_3buff_##name##_uint64_t /* OMPI_OP_BASE_TYPE_UNSIGNED_LONG */
|
||||
|
||||
/** All the Fortran integers ********************************************/
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2008 The University of Tennessee and The University
|
||||
* Copyright (c) 2004-2010 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
@ -98,27 +98,22 @@ BEGIN_C_DECLS
|
||||
* MPI-2:4.15, p76-77
|
||||
*/
|
||||
enum {
|
||||
/** C integer: unsigned char */
|
||||
OMPI_OP_BASE_TYPE_UNSIGNED_CHAR,
|
||||
/** C integer: signed char */
|
||||
OMPI_OP_BASE_TYPE_SIGNED_CHAR,
|
||||
/** C integer: int */
|
||||
OMPI_OP_BASE_TYPE_INT,
|
||||
/** C integer: long */
|
||||
OMPI_OP_BASE_TYPE_LONG,
|
||||
/** C integer: short */
|
||||
OMPI_OP_BASE_TYPE_SHORT,
|
||||
/** C integer: unsigned short */
|
||||
OMPI_OP_BASE_TYPE_UNSIGNED_SHORT,
|
||||
/** C integer: unsigned */
|
||||
OMPI_OP_BASE_TYPE_UNSIGNED,
|
||||
/** C integer: unsigned long */
|
||||
OMPI_OP_BASE_TYPE_UNSIGNED_LONG,
|
||||
|
||||
/** C integer: long long int (optional) */
|
||||
OMPI_OP_BASE_TYPE_LONG_LONG_INT,
|
||||
/** C integer: unsigned long long (optional) */
|
||||
OMPI_OP_BASE_TYPE_UNSIGNED_LONG_LONG,
|
||||
/** C integer: int8_t */
|
||||
OMPI_OP_BASE_TYPE_INT8_T,
|
||||
/** C integer: uint8_t */
|
||||
OMPI_OP_BASE_TYPE_UINT8_T,
|
||||
/** C integer: int16_t */
|
||||
OMPI_OP_BASE_TYPE_INT16_T,
|
||||
/** C integer: uint16_t */
|
||||
OMPI_OP_BASE_TYPE_UINT16_T,
|
||||
/** C integer: int32_t */
|
||||
OMPI_OP_BASE_TYPE_INT32_T,
|
||||
/** C integer: uint32_t */
|
||||
OMPI_OP_BASE_TYPE_UINT32_T,
|
||||
/** C integer: int64_t */
|
||||
OMPI_OP_BASE_TYPE_INT64_T,
|
||||
/** C integer: uint64_t */
|
||||
OMPI_OP_BASE_TYPE_UINT64_T,
|
||||
|
||||
/** Fortran integer */
|
||||
OMPI_OP_BASE_TYPE_INTEGER,
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2007 The University of Tennessee and The University
|
||||
* Copyright (c) 2004-2010 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
@ -46,12 +46,12 @@ typedef struct {
|
||||
ompi_op_base_handler_fn_t fallback_float;
|
||||
ompi_op_base_module_t *fallback_float_module;
|
||||
|
||||
ompi_op_base_handler_fn_t fallback_short;
|
||||
ompi_op_base_module_t *fallback_short_module;
|
||||
ompi_op_base_handler_fn_t fallback_int;
|
||||
ompi_op_base_module_t *fallback_int_module;
|
||||
ompi_op_base_handler_fn_t fallback_long;
|
||||
ompi_op_base_module_t *fallback_long_module;
|
||||
ompi_op_base_handler_fn_t fallback_int16_t;
|
||||
ompi_op_base_module_t *fallback_int16_t_module;
|
||||
ompi_op_base_handler_fn_t fallback_int32_t;
|
||||
ompi_op_base_module_t *fallback_int32_t_module;
|
||||
ompi_op_base_handler_fn_t fallback_int64_t;
|
||||
ompi_op_base_module_t *fallback_int64_t_module;
|
||||
} module_sum_t;
|
||||
|
||||
/**
|
||||
@ -62,12 +62,12 @@ static void module_sum_constructor(module_sum_t *m)
|
||||
m->fallback_float = NULL;
|
||||
m->fallback_float_module = NULL;
|
||||
|
||||
m->fallback_short = NULL;
|
||||
m->fallback_short_module = NULL;
|
||||
m->fallback_int = NULL;
|
||||
m->fallback_int_module = NULL;
|
||||
m->fallback_long = NULL;
|
||||
m->fallback_long_module = NULL;
|
||||
m->fallback_int16_t = NULL;
|
||||
m->fallback_int16_t_module = NULL;
|
||||
m->fallback_int32_t = NULL;
|
||||
m->fallback_int32_t_module = NULL;
|
||||
m->fallback_int64_t = NULL;
|
||||
m->fallback_int64_t_module = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -78,12 +78,12 @@ static void module_sum_destructor(module_sum_t *m)
|
||||
m->fallback_float = (ompi_op_base_handler_fn_t) 0xdeadbeef;
|
||||
m->fallback_float_module = (ompi_op_base_module_t*) 0xdeadbeef;
|
||||
|
||||
m->fallback_short = (ompi_op_base_handler_fn_t) 0xdeadbeef;
|
||||
m->fallback_short_module = (ompi_op_base_module_t*) 0xdeadbeef;
|
||||
m->fallback_int = (ompi_op_base_handler_fn_t) 0xdeadbeef;
|
||||
m->fallback_int_module = (ompi_op_base_module_t*) 0xdeadbeef;
|
||||
m->fallback_long = (ompi_op_base_handler_fn_t) 0xdeadbeef;
|
||||
m->fallback_long_module = (ompi_op_base_module_t*) 0xdeadbeef;
|
||||
m->fallback_int16_t = (ompi_op_base_handler_fn_t) 0xdeadbeef;
|
||||
m->fallback_int16_t_module = (ompi_op_base_module_t*) 0xdeadbeef;
|
||||
m->fallback_int32_t = (ompi_op_base_handler_fn_t) 0xdeadbeef;
|
||||
m->fallback_int32_t_module = (ompi_op_base_module_t*) 0xdeadbeef;
|
||||
m->fallback_int64_t = (ompi_op_base_handler_fn_t) 0xdeadbeef;
|
||||
m->fallback_int64_t_module = (ompi_op_base_module_t*) 0xdeadbeef;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -112,19 +112,19 @@ static void sum_float(void *in, void *out, int *count,
|
||||
}
|
||||
|
||||
/**
|
||||
* Sum function for C short
|
||||
* Sum function for C int16_t
|
||||
*/
|
||||
static void sum_short(void *in, void *out, int *count,
|
||||
static void sum_int16_t(void *in, void *out, int *count,
|
||||
ompi_datatype_t **type, ompi_op_base_module_t *module)
|
||||
{
|
||||
module_sum_t *m = (module_sum_t*) module;
|
||||
opal_output(0, "In x86 sum short function");
|
||||
opal_output(0, "In x86 sum int16_t function");
|
||||
}
|
||||
|
||||
/**
|
||||
* Sum function for C int
|
||||
* Sum function for C int32_t
|
||||
*/
|
||||
static void sum_int(void *in, void *out, int *count,
|
||||
static void sum_int32_t(void *in, void *out, int *count,
|
||||
ompi_datatype_t **type, ompi_op_base_module_t *module)
|
||||
{
|
||||
module_sum_t *m = (module_sum_t*) module;
|
||||
@ -132,9 +132,9 @@ static void sum_int(void *in, void *out, int *count,
|
||||
}
|
||||
|
||||
/**
|
||||
* Sum function for C long
|
||||
* Sum function for C int64_t
|
||||
*/
|
||||
static void sum_long(void *in, void *out, int *count,
|
||||
static void sum_int64_t(void *in, void *out, int *count,
|
||||
ompi_datatype_t **type, ompi_op_base_module_t *module)
|
||||
{
|
||||
module_sum_t *m = (module_sum_t*) module;
|
||||
@ -172,35 +172,35 @@ ompi_op_base_module_t *ompi_op_x86_setup_sum(ompi_op_t *op)
|
||||
it is being used and won't be freed/destructed. */
|
||||
OBJ_RETAIN(module->fallback_float_module);
|
||||
|
||||
/* C short */
|
||||
module->super.opm_fns[OMPI_OP_BASE_TYPE_SHORT] = sum_short;
|
||||
module->fallback_short = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_SHORT];
|
||||
module->fallback_short_module =
|
||||
op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_SHORT];
|
||||
/* C int16_t */
|
||||
module->super.opm_fns[OMPI_OP_BASE_TYPE_INT16_T] = sum_int16_t;
|
||||
module->fallback_int16_t = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_INT16_T];
|
||||
module->fallback_int16_t_module =
|
||||
op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_INT16_T];
|
||||
/* If you cache a fallback function, you *must* RETAIN (i.e.,
|
||||
increase the refcount) its module so that the module knows that
|
||||
it is being used and won't be freed/destructed. */
|
||||
OBJ_RETAIN(module->fallback_short_module);
|
||||
OBJ_RETAIN(module->fallback_int16_t_module);
|
||||
|
||||
/* C int */
|
||||
module->super.opm_fns[OMPI_OP_BASE_TYPE_INT] = sum_int;
|
||||
module->fallback_int = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_INT];
|
||||
module->fallback_int_module =
|
||||
op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_INT];
|
||||
/* C int32_t */
|
||||
module->super.opm_fns[OMPI_OP_BASE_TYPE_INT32_T] = sum_int32_t;
|
||||
module->fallback_int32_t = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_INT32_T];
|
||||
module->fallback_int32_t_module =
|
||||
op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_INT32_T];
|
||||
/* If you cache a fallback function, you *must* RETAIN (i.e.,
|
||||
increase the refcount) its module so that the module knows that
|
||||
it is being used and won't be freed/destructed. */
|
||||
OBJ_RETAIN(module->fallback_int_module);
|
||||
OBJ_RETAIN(module->fallback_int32_t_module);
|
||||
|
||||
/* C long */
|
||||
module->super.opm_fns[OMPI_OP_BASE_TYPE_LONG] = sum_long;
|
||||
module->fallback_long = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_LONG];
|
||||
module->fallback_long_module =
|
||||
op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_LONG];
|
||||
/* C int64_t */
|
||||
module->super.opm_fns[OMPI_OP_BASE_TYPE_INT64_T] = sum_int64_t;
|
||||
module->fallback_int64_t = op->o_func.intrinsic.fns[OMPI_OP_BASE_TYPE_INT64_T];
|
||||
module->fallback_int64_t_module =
|
||||
op->o_func.intrinsic.modules[OMPI_OP_BASE_TYPE_INT64_T];
|
||||
/* If you cache a fallback function, you *must* RETAIN (i.e.,
|
||||
increase the refcount) its module so that the module knows that
|
||||
it is being used and won't be freed/destructed. */
|
||||
OBJ_RETAIN(module->fallback_long_module);
|
||||
OBJ_RETAIN(module->fallback_int64_t_module);
|
||||
#endif
|
||||
|
||||
return (ompi_op_base_module_t*) module;
|
||||
|
78
ompi/op/op.c
78
ompi/op/op.c
@ -2,7 +2,7 @@
|
||||
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2009 The University of Tennessee and The University
|
||||
* Copyright (c) 2004-2010 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
|
||||
@ -105,37 +105,71 @@ int ompi_op_init(void)
|
||||
ompi_op_ddt_map[i] = -1;
|
||||
}
|
||||
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_UNSIGNED_CHAR] = OMPI_OP_BASE_TYPE_UNSIGNED_CHAR;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_SIGNED_CHAR] = OMPI_OP_BASE_TYPE_SIGNED_CHAR;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_BYTE] = OMPI_OP_BASE_TYPE_BYTE;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_SHORT] = OMPI_OP_BASE_TYPE_SHORT;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_UNSIGNED_SHORT] = OMPI_OP_BASE_TYPE_UNSIGNED_SHORT;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_INT] = OMPI_OP_BASE_TYPE_INT;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_UNSIGNED_INT] = OMPI_OP_BASE_TYPE_UNSIGNED;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_LONG] = OMPI_OP_BASE_TYPE_LONG;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_UNSIGNED_LONG] = OMPI_OP_BASE_TYPE_UNSIGNED_LONG;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_LONG_LONG] = OMPI_OP_BASE_TYPE_LONG_LONG_INT;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_UNSIGNED_LONG_LONG] = OMPI_OP_BASE_TYPE_UNSIGNED_LONG_LONG;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_INT8_T] = OMPI_OP_BASE_TYPE_INT8_T;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_UINT8_T] = OMPI_OP_BASE_TYPE_UINT8_T;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_INT16_T] = OMPI_OP_BASE_TYPE_INT16_T;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_UINT16_T] = OMPI_OP_BASE_TYPE_UINT16_T;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_INT32_T] = OMPI_OP_BASE_TYPE_INT32_T;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_UINT32_T] = OMPI_OP_BASE_TYPE_UINT32_T;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_INT64_T] = OMPI_OP_BASE_TYPE_INT64_T;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_UINT64_T] = OMPI_OP_BASE_TYPE_UINT64_T;
|
||||
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_FLOAT] = OMPI_OP_BASE_TYPE_FLOAT;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_DOUBLE] = OMPI_OP_BASE_TYPE_DOUBLE;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_LONG_DOUBLE] = OMPI_OP_BASE_TYPE_LONG_DOUBLE;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_COMPLEX] = OMPI_OP_BASE_TYPE_COMPLEX;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_DOUBLE_COMPLEX] = OMPI_OP_BASE_TYPE_DOUBLE_COMPLEX;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_LOGICAL] = OMPI_OP_BASE_TYPE_LOGICAL;
|
||||
#if OMPI_SIZEOF_FORTRAN_COMPLEX8 == SIZEOF_FLOAT__COMPLEX
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_COMPLEX8] = OMPI_OP_BASE_TYPE_COMPLEX8;
|
||||
#endif
|
||||
#if OMPI_SIZEOF_FORTRAN_COMPLEX16 == SIZEOF_DOUBLE__COMPLEX
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_COMPLEX16] = OMPI_OP_BASE_TYPE_COMPLEX16;
|
||||
#endif
|
||||
#if OMPI_SIZEOF_FORTRAN_COMPLEX32 == SIZEOF_LONG_DOUBLE__COMPLEX
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_COMPLEX32] = OMPI_OP_BASE_TYPE_COMPLEX32;
|
||||
#endif
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_WCHAR] = OMPI_OP_BASE_TYPE_WCHAR;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_BOOL] = OMPI_OP_BASE_TYPE_BOOL;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_FLOAT_INT] = OMPI_OP_BASE_TYPE_FLOAT_INT;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_DOUBLE_INT] = OMPI_OP_BASE_TYPE_DOUBLE_INT;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_LONG_INT] = OMPI_OP_BASE_TYPE_LONG_INT;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_2INT] = OMPI_OP_BASE_TYPE_2INT;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_SHORT_INT] = OMPI_OP_BASE_TYPE_SHORT_INT;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_LOGICAL] = OMPI_OP_BASE_TYPE_LOGICAL;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_CHARACTER] = OMPI_OP_BASE_TYPE_UINT8_T;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_INTEGER] = OMPI_OP_BASE_TYPE_INTEGER;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_REAL] = OMPI_OP_BASE_TYPE_REAL;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_DOUBLE_PRECISION] = OMPI_OP_BASE_TYPE_DOUBLE_PRECISION;
|
||||
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_COMPLEX] = OMPI_OP_BASE_TYPE_COMPLEX8;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_DOUBLE_COMPLEX] = OMPI_OP_BASE_TYPE_COMPLEX16;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_LONG_DOUBLE_COMPLEX] = OMPI_OP_BASE_TYPE_COMPLEX32;
|
||||
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_2INT] = OMPI_OP_BASE_TYPE_2INT;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_2INTEGER] = OMPI_OP_BASE_TYPE_2INTEGER;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_2REAL] = OMPI_OP_BASE_TYPE_2REAL;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_2DBLPREC] = OMPI_OP_BASE_TYPE_2DOUBLE_PRECISION;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_2INTEGER] = OMPI_OP_BASE_TYPE_2INTEGER;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_2COMPLEX] = -1; /* Not defined */
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_2DOUBLE_COMPLEX] = -1; /* Not defined */
|
||||
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_FLOAT_INT] = OMPI_OP_BASE_TYPE_FLOAT_INT;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_DOUBLE_INT] = OMPI_OP_BASE_TYPE_DOUBLE_INT;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_LONG_DOUBLE_INT] = OMPI_OP_BASE_TYPE_LONG_DOUBLE_INT;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_WCHAR] = OMPI_OP_BASE_TYPE_WCHAR;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_LONG_INT] = OMPI_OP_BASE_TYPE_LONG_INT;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_SHORT_INT] = OMPI_OP_BASE_TYPE_SHORT_INT;
|
||||
|
||||
#if SIZEOF_PTRDIFF_T == 4
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_AINT] = OMPI_OP_BASE_TYPE_INT32_T;
|
||||
#elif SIZEOF_PTRDIFF_T == 8
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_AINT] = OMPI_OP_BASE_TYPE_INT64_T;
|
||||
#else
|
||||
#warning Unsupported definition for MPI_AINT
|
||||
#endif
|
||||
#if OMPI_MPI_OFFSET_SIZE == 4
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_OFFSET] = OMPI_OP_BASE_TYPE_UINT32_T;
|
||||
#elif OMPI_MPI_OFFSET_SIZE == 8
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_OFFSET] = OMPI_OP_BASE_TYPE_UINT64_T;
|
||||
#else
|
||||
#warning Unsupported definition for MPI_OFFSET
|
||||
#endif
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_C_BOOL] = OMPI_OP_BASE_TYPE_BOOL;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_C_COMPLEX] = OMPI_OP_BASE_TYPE_COMPLEX8;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_C_FLOAT_COMPLEX] = OMPI_OP_BASE_TYPE_COMPLEX8;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_C_DOUBLE_COMPLEX] = OMPI_OP_BASE_TYPE_COMPLEX16;
|
||||
ompi_op_ddt_map[OMPI_DATATYPE_MPI_C_LONG_DOUBLE_COMPLEX] = OMPI_OP_BASE_TYPE_COMPLEX32;
|
||||
|
||||
/* Create the intrinsic ops */
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2009 The University of Tennessee and The University
|
||||
* Copyright (c) 2004-2010 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
|
||||
@ -412,9 +412,10 @@ int32_t opal_convertor_set_position_nocheck( opal_convertor_t* convertor,
|
||||
/**
|
||||
* Compute the remote size.
|
||||
*/
|
||||
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
||||
#define OPAL_CONVERTOR_COMPUTE_REMOTE_SIZE(convertor, datatype, bdt_mask) \
|
||||
{ \
|
||||
if( OPAL_UNLIKELY(0 != bdt_mask) ) { \
|
||||
if( OPAL_UNLIKELY(0 != (bdt_mask)) ) { \
|
||||
opal_convertor_master_t* master; \
|
||||
int i; \
|
||||
uint32_t mask = datatype->bdt_used; \
|
||||
@ -432,6 +433,10 @@ int32_t opal_convertor_set_position_nocheck( opal_convertor_t* convertor,
|
||||
convertor->use_desc = &(datatype->desc); \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define OPAL_CONVERTOR_COMPUTE_REMOTE_SIZE(convertor, datatype, bdt_mask) \
|
||||
assert(0 == (bdt_mask))
|
||||
#endif /* OPAL_ENABLE_HETEROGENEOUS_SUPPORT */
|
||||
|
||||
/**
|
||||
* This macro will initialize a convertor based on a previously created
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2009 The University of Tennessee and The University
|
||||
* Copyright (c) 2004-2010 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
|
||||
@ -146,29 +146,29 @@ OPAL_DECLSPEC extern uint32_t opal_local_arch;
|
||||
/*
|
||||
* The OPAL-layer's Basic datatypes themselves.
|
||||
*/
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_null;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_empty;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_loop;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_end_loop;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_lb;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_ub;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_int1;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_int2;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_int4;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_int8;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_int16;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_uint1;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_uint2;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_uint4;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_uint8;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_uint16;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_float2;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_float4;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_float8;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_float12;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_float16;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_complex8;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_complex16;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_complex32;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_int1; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_int2; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_int4; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_int8; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_int16; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_uint1; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_uint2; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_uint4; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_uint8; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_uint16; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_float2; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_float4; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_float8; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_float12; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_float16; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_complex8; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_complex16; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_complex32; /* in bytes */
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_bool;
|
||||
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_wchar;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2009 The University of Tennessee and The University
|
||||
* Copyright (c) 2004-2010 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
|
||||
@ -31,7 +31,7 @@ int32_t opal_datatype_create_contiguous( int count, const opal_datatype_t* oldTy
|
||||
|
||||
if( 0 == count ) {
|
||||
pdt = opal_datatype_create( 0 );
|
||||
opal_datatype_add( pdt, &opal_datatype_null, 0, 0, 0 );
|
||||
opal_datatype_add( pdt, &opal_datatype_empty, 0, 0, 0 );
|
||||
} else {
|
||||
pdt = opal_datatype_create( oldType->desc.used + 2 );
|
||||
opal_datatype_add( pdt, oldType, count, 0, (oldType->ub - oldType->lb) );
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2009 The University of Tennessee and The University
|
||||
* Copyright (c) 2004-2010 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
|
||||
@ -272,7 +272,8 @@ struct opal_datatype_t;
|
||||
#define OPAL_DATATYPE_INIT_BTYPES_ARRAY_BOOL { Z20, 0, 1, } /*22*/
|
||||
#define OPAL_DATATYPE_INIT_BTYPES_ARRAY_WCHAR { Z20, 0, 0, 1, }
|
||||
|
||||
#define OPAL_DATATYPE_INIT_NAME(NAME) "OPAL_" # NAME
|
||||
#define OPAL_DATATYPE_INIT_NAME(NAME) "OPAL_" _OPAL_DATATYPE_INIT_NAME(NAME)
|
||||
#define _OPAL_DATATYPE_INIT_NAME(NAME) #NAME
|
||||
|
||||
/*
|
||||
* Macro to initialize the main description for basic types, setting the pointer
|
||||
@ -286,22 +287,6 @@ struct opal_datatype_t;
|
||||
}
|
||||
#define OPAL_DATATYPE_INIT_DESC_NULL {0 /*length*/, 0/*used*/, NULL /*desc*/}
|
||||
|
||||
#define OPAL_DATATYPE_INITIALIZER_UNAVAILABLE( FLAGS ) \
|
||||
{ \
|
||||
OPAL_OBJ_STATIC_INIT(opal_datatype_t), \
|
||||
OPAL_DATATYPE_FLAG_UNAVAILABLE | OPAL_DATATYPE_FLAG_PREDEFINED | (FLAGS) /*flag*/, \
|
||||
0 /*id*/, \
|
||||
0 /*bdt_used*/, \
|
||||
0 /*size*/, \
|
||||
0 /*true_lb*/, 0 /*true_ub*/, 0 /*lb*/, 0 /*ub*/, \
|
||||
0 /*align*/, \
|
||||
1 /*nbElems*/, \
|
||||
OPAL_DATATYPE_INIT_NAME(UNAVAILABLE), /*name*/ \
|
||||
OPAL_DATATYPE_INIT_DESC_PREDEFINED(UNAVAILABLE), /*desc*/ \
|
||||
OPAL_DATATYPE_INIT_DESC_PREDEFINED(UNAVAILABLE), /*opt_desc*/ \
|
||||
OPAL_DATATYPE_INIT_BTYPES_ARRAY_UNAVAILABLE /*btypes*/ \
|
||||
}
|
||||
|
||||
#define OPAL_DATATYPE_INITIALIZER_UNAVAILABLE_NAMED( NAME, FLAGS ) \
|
||||
{ \
|
||||
OPAL_OBJ_STATIC_INIT(opal_datatype_t), \
|
||||
@ -318,7 +303,10 @@ struct opal_datatype_t;
|
||||
OPAL_DATATYPE_INIT_BTYPES_ARRAY_UNAVAILABLE /*btypes*/ \
|
||||
}
|
||||
|
||||
#define OPAL_DATATYPE_INITIALIZER_NULL( FLAGS ) \
|
||||
#define OPAL_DATATYPE_INITIALIZER_UNAVAILABLE( FLAGS ) \
|
||||
OPAL_DATATYPE_INITIALIZER_UNAVAILABLE_NAMED( UNAVAILABLE, (FLAGS) )
|
||||
|
||||
#define OPAL_DATATYPE_INITIALIZER_EMPTY( FLAGS ) \
|
||||
{ \
|
||||
OPAL_OBJ_STATIC_INIT(opal_datatype_t), \
|
||||
OPAL_DATATYPE_FLAG_PREDEFINED | (FLAGS) /*flag*/, \
|
||||
@ -328,7 +316,7 @@ struct opal_datatype_t;
|
||||
0 /*true_lb*/, 0 /*true_ub*/, 0 /*lb*/, 0 /*ub*/, \
|
||||
0 /*align*/, \
|
||||
1 /*nbElems*/, \
|
||||
OPAL_DATATYPE_INIT_NAME(NULL), /*name*/ \
|
||||
OPAL_DATATYPE_INIT_NAME(EMPTY), /*name*/ \
|
||||
OPAL_DATATYPE_INIT_DESC_NULL, /*desc*/ \
|
||||
OPAL_DATATYPE_INIT_DESC_NULL, /*opt_desc*/ \
|
||||
OPAL_DATATYPE_INIT_BTYPES_ARRAY_UNAVAILABLE /*btypes*/ \
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2009 The University of Tennessee and The University
|
||||
* Copyright (c) 2004-2010 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
|
||||
@ -45,7 +45,7 @@ uint32_t opal_local_arch = 0xFFFFFFFF;
|
||||
* into an array, which is initialized at runtime.
|
||||
* Everything is constant.
|
||||
*/
|
||||
OPAL_DECLSPEC const opal_datatype_t opal_datatype_null = OPAL_DATATYPE_INITIALIZER_NULL(0);
|
||||
OPAL_DECLSPEC const opal_datatype_t opal_datatype_empty = OPAL_DATATYPE_INITIALIZER_EMPTY(0);
|
||||
|
||||
OPAL_DECLSPEC const opal_datatype_t opal_datatype_loop = OPAL_DATATYPE_INITIALIZER_LOOP(0);
|
||||
OPAL_DECLSPEC const opal_datatype_t opal_datatype_end_loop = OPAL_DATATYPE_INITIALIZER_END_LOOP(0);
|
||||
@ -71,7 +71,7 @@ OPAL_DECLSPEC const opal_datatype_t opal_datatype_complex16 = OPAL_DATATYPE_IN
|
||||
OPAL_DECLSPEC const opal_datatype_t opal_datatype_complex32 = OPAL_DATATYPE_INITIALIZER_COMPLEX32(0);
|
||||
OPAL_DECLSPEC const opal_datatype_t opal_datatype_bool = OPAL_DATATYPE_INITIALIZER_BOOL(0);
|
||||
OPAL_DECLSPEC const opal_datatype_t opal_datatype_wchar = OPAL_DATATYPE_INITIALIZER_WCHAR(0);
|
||||
OPAL_DECLSPEC const opal_datatype_t opal_datatype_unavailable = OPAL_DATATYPE_INITIALIZER_UNAVAILABLE(0);
|
||||
OPAL_DECLSPEC const opal_datatype_t opal_datatype_unavailable = OPAL_DATATYPE_INITIALIZER_UNAVAILABLE_NAMED(UNAVAILABLE, 0);
|
||||
|
||||
OPAL_DECLSPEC dt_elem_desc_t opal_datatype_predefined_elem_desc[2 * OPAL_DATATYPE_MAX_PREDEFINED];
|
||||
|
||||
@ -82,16 +82,16 @@ OPAL_DECLSPEC const size_t opal_datatype_local_sizes[OPAL_DATATYPE_MAX_PREDEFINE
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1, /* sizeof (int1_t) */
|
||||
2, /* sizeof (int2_t) */
|
||||
4, /* sizeof (int4_t) */
|
||||
8, /* sizeof (int8_t) */
|
||||
16, /* sizeof (int16_t) */
|
||||
1, /* sizeof (uint1_t) */
|
||||
2, /* sizeof (uint2_t) */
|
||||
4, /* sizeof (uint4_t) */
|
||||
8, /* sizeof (uint8_t) */
|
||||
16, /* sizeof (uint16_t) */
|
||||
1, /* sizeof (int8_t) */
|
||||
2, /* sizeof (int16_t) */
|
||||
4, /* sizeof (int32_t) */
|
||||
8, /* sizeof (int64_t) */
|
||||
16, /* sizeof (int128_t) */
|
||||
1, /* sizeof (uint8_t) */
|
||||
2, /* sizeof (uint16_t) */
|
||||
4, /* sizeof (uint32_t) */
|
||||
8, /* sizeof (uint64_t) */
|
||||
16, /* sizeof (uint128_t) */
|
||||
2, /* sizeof (float2) */
|
||||
4, /* sizeof (float4) */
|
||||
8, /* sizeof (float8) */
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user