root/ompi/datatype/ompi_datatype_internal.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil  -*- */
   2 /*
   3  * Copyright (c) 2009-2017 The University of Tennessee and The University
   4  *                         of Tennessee Research Foundation.  All rights
   5  *                         reserved.
   6  * Copyright (c) 2009      Oak Ridge National Labs.  All rights reserved.
   7  * Copyright (c) 2010-2012 Cisco Systems, Inc.  All rights reserved.
   8  * Copyright (c) 2013      Los Alamos National Security, LLC. All rights
   9  *                         reserved.
  10  * Copyright (c) 2015-2018 Research Organization for Information Science
  11  *                         and Technology (RIST). All rights reserved.
  12  * Copyright (c) 2016-2018 FUJITSU LIMITED.  All rights reserved.
  13  * $COPYRIGHT$
  14  *
  15  * Additional copyrights may follow
  16  *
  17  * $HEADER$
  18  */
  19 
  20 /**
  21  * ompi_datatype_t interface for OMPI internal data type representation
  22  *
  23  * ompi_datatype_t is a class which represents contiguous or
  24  * non-contiguous data together with constituent type-related
  25  * information.
  26  */
  27 
  28 #ifndef OMPI_DATATYPE_INTERNAL_H
  29 #define OMPI_DATATYPE_INTERNAL_H
  30 
  31 #include "opal/datatype/opal_datatype_internal.h"
  32 
  33 /*
  34  * This is the OMPI-layered numbering of ALL supported MPI types
  35  * (derived from the old DT_ names).
  36  */
  37 #define OMPI_DATATYPE_MPI_EMPTY                   0x00
  38 #define OMPI_DATATYPE_MPI_INT8_T                  0x01
  39 #define OMPI_DATATYPE_MPI_UINT8_T                 0x02
  40 #define OMPI_DATATYPE_MPI_INT16_T                 0x03
  41 #define OMPI_DATATYPE_MPI_UINT16_T                0x04
  42 #define OMPI_DATATYPE_MPI_INT32_T                 0x05
  43 #define OMPI_DATATYPE_MPI_UINT32_T                0x06
  44 #define OMPI_DATATYPE_MPI_INT64_T                 0x07
  45 #define OMPI_DATATYPE_MPI_UINT64_T                0x08
  46 #define OMPI_DATATYPE_MPI_FLOAT                   0x09
  47 #define OMPI_DATATYPE_MPI_DOUBLE                  0x0A
  48 #define OMPI_DATATYPE_MPI_LONG_DOUBLE             0x0B
  49 #define OMPI_DATATYPE_MPI_COMPLEX4                0x0C
  50 #define OMPI_DATATYPE_MPI_COMPLEX8                0x0D
  51 #define OMPI_DATATYPE_MPI_COMPLEX16               0x0E
  52 #define OMPI_DATATYPE_MPI_COMPLEX32               0x0F
  53 #define OMPI_DATATYPE_MPI_WCHAR                   0x10
  54 #define OMPI_DATATYPE_MPI_PACKED                  0x11
  55 
  56 #define OMPI_DATATYPE_MPI_BOOL                    0x12
  57 
  58 #define OMPI_DATATYPE_MPI_LOGICAL                 0x13
  59 #define OMPI_DATATYPE_MPI_CHARACTER               0x14
  60 #define OMPI_DATATYPE_MPI_INTEGER                 0x15
  61 #define OMPI_DATATYPE_MPI_REAL                    0x16
  62 #define OMPI_DATATYPE_MPI_DOUBLE_PRECISION        0x17
  63 
  64 /*
  65  * Derived datatypes supposedly contiguous
  66  */
  67 #define OMPI_DATATYPE_MPI_COMPLEX                 0x18   /* Was COMPLEX_FLOAT */
  68 #define OMPI_DATATYPE_MPI_DOUBLE_COMPLEX          0x19   /* Was COMPLEX_DOUBLE */
  69 #define OMPI_DATATYPE_MPI_LONG_DOUBLE_COMPLEX     0x1A   /* Was COMPLEX_LONG_DOUBLE */
  70 #define OMPI_DATATYPE_MPI_2INT                    0x1B
  71 #define OMPI_DATATYPE_MPI_2INTEGER                0x1C
  72 #define OMPI_DATATYPE_MPI_2REAL                   0x1D
  73 #define OMPI_DATATYPE_MPI_2DBLPREC                0x1E
  74 #define OMPI_DATATYPE_MPI_2COMPLEX                0x1F
  75 #define OMPI_DATATYPE_MPI_2DOUBLE_COMPLEX         0x20
  76 /*
  77  * Derived datatypes which will definitively be non contiguous on some architectures.
  78  */
  79 #define OMPI_DATATYPE_MPI_FLOAT_INT               0x21
  80 #define OMPI_DATATYPE_MPI_DOUBLE_INT              0x22
  81 #define OMPI_DATATYPE_MPI_LONG_DOUBLE_INT         0x23
  82 #define OMPI_DATATYPE_MPI_LONG_INT                0x24
  83 #define OMPI_DATATYPE_MPI_SHORT_INT               0x25
  84 /*
  85  * Datatypes from the MPI 2.2 standard
  86  */
  87 #define OMPI_DATATYPE_MPI_AINT                    0x26
  88 #define OMPI_DATATYPE_MPI_OFFSET                  0x27
  89 #define OMPI_DATATYPE_MPI_C_BOOL                  0x28
  90 #define OMPI_DATATYPE_MPI_C_COMPLEX               0x29
  91 #define OMPI_DATATYPE_MPI_C_FLOAT_COMPLEX         0x2A
  92 #define OMPI_DATATYPE_MPI_C_DOUBLE_COMPLEX        0x2B
  93 #define OMPI_DATATYPE_MPI_C_LONG_DOUBLE_COMPLEX   0x2C
  94 
  95 #define OMPI_DATATYPE_MPI_LB                      0x2D
  96 #define OMPI_DATATYPE_MPI_UB                      0x2E
  97 
  98 /*
  99  * Datatypes from the MPI 3.0 standard
 100  */
 101 #define OMPI_DATATYPE_MPI_COUNT                   0x2F
 102 
 103 /*
 104  * Datatypes proposed to the MPI Forum in June 2017 for proposal in
 105  * the MPI 4.0 standard. As of February 2019, it is not accepted yet.
 106  * See https://github.com/mpi-forum/mpi-issues/issues/65
 107  */
 108 #define OMPI_DATATYPE_MPI_SHORT_FLOAT             0x30
 109 #define OMPI_DATATYPE_MPI_C_SHORT_FLOAT_COMPLEX   0x31
 110 
 111 /* This should __ALWAYS__ stay last  */
 112 #define OMPI_DATATYPE_MPI_UNAVAILABLE             0x32
 113 
 114 
 115 #define OMPI_DATATYPE_MPI_MAX_PREDEFINED          (OMPI_DATATYPE_MPI_UNAVAILABLE+1)
 116 
 117 /*
 118  * Ensure we can support the predefined datatypes.
 119  */
 120 #if OMPI_DATATYPE_MAX_PREDEFINED < OMPI_DATATYPE_MPI_UNAVAILABLE
 121 #error OMPI_DATATYPE_MAX_PREDEFINED should be updated to the value of OMPI_DATATYPE_MPI_UNAVAILABLE
 122 #endif
 123 
 124 /*
 125  * Mapped types. The following types have basic equivalents in OPAL. Instead
 126  * of being redefined as independent types, they will be made synonyms to
 127  * the most basic type.
 128  */
 129 #if SIZEOF_CHAR == 1
 130 #define OMPI_DATATYPE_MPI_CHAR                    OMPI_DATATYPE_MPI_INT8_T
 131 #define OMPI_DATATYPE_MPI_SIGNED_CHAR             OMPI_DATATYPE_MPI_INT8_T
 132 #define OMPI_DATATYPE_MPI_UNSIGNED_CHAR           OMPI_DATATYPE_MPI_UINT8_T
 133 #define OMPI_DATATYPE_MPI_BYTE                    OMPI_DATATYPE_MPI_UINT8_T
 134 #elif SIZEOF_CHAR == 2
 135 #define OMPI_DATATYPE_MPI_CHAR                    OMPI_DATATYPE_MPI_INT16_T
 136 #define OMPI_DATATYPE_MPI_SIGNED_CHAR             OMPI_DATATYPE_MPI_INT16_T
 137 #define OMPI_DATATYPE_MPI_UNSIGNED_CHAR           OMPI_DATATYPE_MPI_UINT16_T
 138 #define OMPI_DATATYPE_MPI_BYTE                    OMPI_DATATYPE_MPI_UINT16_T
 139 #elif SIZEOF_CHAR == 4
 140 #define OMPI_DATATYPE_MPI_CHAR                    OMPI_DATATYPE_MPI_INT32_T
 141 #define OMPI_DATATYPE_MPI_SIGNED_CHAR             OMPI_DATATYPE_MPI_INT32_T
 142 #define OMPI_DATATYPE_MPI_UNSIGNED_CHAR           OMPI_DATATYPE_MPI_UINT32_T
 143 #define OMPI_DATATYPE_MPI_BYTE                    OMPI_DATATYPE_MPI_UINT32_T
 144 #elif SIZEOF_CHAR == 8
 145 #define OMPI_DATATYPE_MPI_CHAR                    OMPI_DATATYPE_MPI_INT64_T
 146 #define OMPI_DATATYPE_MPI_SIGNED_CHAR             OMPI_DATATYPE_MPI_INT64_T
 147 #define OMPI_DATATYPE_MPI_UNSIGNED_CHAR           OMPI_DATATYPE_MPI_UINT64_T
 148 #define OMPI_DATATYPE_MPI_BYTE                    OMPI_DATATYPE_MPI_UINT64_T
 149 #endif
 150 
 151 #if SIZEOF_SHORT == 1
 152 #define OMPI_DATATYPE_MPI_SHORT                   OMPI_DATATYPE_MPI_INT8_T
 153 #define OMPI_DATATYPE_MPI_UNSIGNED_SHORT          OMPI_DATATYPE_MPI_UINT8_T
 154 #elif SIZEOF_SHORT == 2
 155 #define OMPI_DATATYPE_MPI_SHORT                   OMPI_DATATYPE_MPI_INT16_T
 156 #define OMPI_DATATYPE_MPI_UNSIGNED_SHORT          OMPI_DATATYPE_MPI_UINT16_T
 157 #elif SIZEOF_SHORT == 4
 158 #define OMPI_DATATYPE_MPI_SHORT                   OMPI_DATATYPE_MPI_INT32_T
 159 #define OMPI_DATATYPE_MPI_UNSIGNED_SHORT          OMPI_DATATYPE_MPI_UINT32_T
 160 #elif SIZEOF_SHORT == 8
 161 #define OMPI_DATATYPE_MPI_SHORT                   OMPI_DATATYPE_MPI_INT64_T
 162 #define OMPI_DATATYPE_MPI_UNSIGNED_SHORT          OMPI_DATATYPE_MPI_UINT64_T
 163 #endif
 164 
 165 #if SIZEOF_INT == 1
 166 #define OMPI_DATATYPE_MPI_INT                     OMPI_DATATYPE_MPI_INT8_T
 167 #define OMPI_DATATYPE_MPI_UNSIGNED                OMPI_DATATYPE_MPI_UINT8_T
 168 #elif SIZEOF_INT == 2
 169 #define OMPI_DATATYPE_MPI_INT                     OMPI_DATATYPE_MPI_INT16_T
 170 #define OMPI_DATATYPE_MPI_UNSIGNED                OMPI_DATATYPE_MPI_UINT16_T
 171 #elif SIZEOF_INT == 4
 172 #define OMPI_DATATYPE_MPI_INT                     OMPI_DATATYPE_MPI_INT32_T
 173 #define OMPI_DATATYPE_MPI_UNSIGNED                OMPI_DATATYPE_MPI_UINT32_T
 174 #elif SIZEOF_INT == 8
 175 #define OMPI_DATATYPE_MPI_INT                     OMPI_DATATYPE_MPI_INT64_T
 176 #define OMPI_DATATYPE_MPI_UNSIGNED                OMPI_DATATYPE_MPI_UINT64_T
 177 #endif
 178 
 179 #if SIZEOF_LONG == 1
 180 #define OMPI_DATATYPE_MPI_LONG                    OMPI_DATATYPE_MPI_INT8_T
 181 #define OMPI_DATATYPE_MPI_UNSIGNED_LONG           OMPI_DATATYPE_MPI_UINT8_T
 182 #elif SIZEOF_LONG == 2
 183 #define OMPI_DATATYPE_MPI_LONG                    OMPI_DATATYPE_MPI_INT16_T
 184 #define OMPI_DATATYPE_MPI_UNSIGNED_LONG           OMPI_DATATYPE_MPI_UINT16_T
 185 #elif SIZEOF_LONG == 4
 186 #define OMPI_DATATYPE_MPI_LONG                    OMPI_DATATYPE_MPI_INT32_T
 187 #define OMPI_DATATYPE_MPI_UNSIGNED_LONG           OMPI_DATATYPE_MPI_UINT32_T
 188 #elif SIZEOF_LONG == 8
 189 #define OMPI_DATATYPE_MPI_LONG                    OMPI_DATATYPE_MPI_INT64_T
 190 #define OMPI_DATATYPE_MPI_UNSIGNED_LONG           OMPI_DATATYPE_MPI_UINT64_T
 191 #endif
 192 
 193 #if SIZEOF_LONG_LONG == 1
 194 #define OMPI_DATATYPE_MPI_LONG_LONG_INT           OMPI_DATATYPE_MPI_INT8_T
 195 #define OMPI_DATATYPE_MPI_UNSIGNED_LONG_LONG      OMPI_DATATYPE_MPI_UINT8_T
 196 #elif SIZEOF_LONG_LONG == 2
 197 #define OMPI_DATATYPE_MPI_LONG_LONG_INT           OMPI_DATATYPE_MPI_INT16_T
 198 #define OMPI_DATATYPE_MPI_UNSIGNED_LONG_LONG      OMPI_DATATYPE_MPI_UINT16_T
 199 #elif SIZEOF_LONG_LONG == 4
 200 #define OMPI_DATATYPE_MPI_LONG_LONG_INT           OMPI_DATATYPE_MPI_INT32_T
 201 #define OMPI_DATATYPE_MPI_UNSIGNED_LONG_LONG      OMPI_DATATYPE_MPI_UINT32_T
 202 #elif SIZEOF_LONG_LONG == 8
 203 #define OMPI_DATATYPE_MPI_LONG_LONG_INT           OMPI_DATATYPE_MPI_INT64_T
 204 #define OMPI_DATATYPE_MPI_UNSIGNED_LONG_LONG      OMPI_DATATYPE_MPI_UINT64_T
 205 #endif
 206 
 207 /*
 208  * Optional Fortran datatypes, these map to representable types
 209  * in the lower layer, aka as other Fortran types have to map to C types,
 210  * additionally, if the type has the same size as the mandatory
 211  * Fortran type, map to this one.
 212  */
 213 /* LOGICAL */
 214 #if OMPI_SIZEOF_FORTRAN_LOGICAL1 == OMPI_SIZEOF_FORTRAN_LOGICAL
 215 #  define OMPI_DATATYPE_MPI_LOGICAL1              OMPI_DATATYPE_MPI_LOGICAL
 216 #elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == 1
 217 #  define OMPI_DATATYPE_MPI_LOGICAL1              OMPI_DATATYPE_MPI_INT8_T
 218 #elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == 2
 219 #  define OMPI_DATATYPE_MPI_LOGICAL1              OMPI_DATATYPE_MPI_INT16_T
 220 #elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == 4
 221 #  define OMPI_DATATYPE_MPI_LOGICAL1              OMPI_DATATYPE_MPI_INT32_T
 222 #elif OMPI_SIZEOF_FORTRAN_LOGICAL1 == 8
 223 #  define OMPI_DATATYPE_MPI_LOGICAL1              OMPI_DATATYPE_MPI_INT64_T
 224 #else
 225 #  define OMPI_DATATYPE_MPI_LOGICAL1              OMPI_DATATYPE_MPI_UNAVAILABLE
 226 #endif
 227 
 228 #if OMPI_SIZEOF_FORTRAN_LOGICAL2 == OMPI_SIZEOF_FORTRAN_LOGICAL
 229 #  define OMPI_DATATYPE_MPI_LOGICAL2              OMPI_DATATYPE_MPI_LOGICAL
 230 #elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == 1
 231 #  define OMPI_DATATYPE_MPI_LOGICAL2              OMPI_DATATYPE_MPI_INT8_T
 232 #elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == 2
 233 #  define OMPI_DATATYPE_MPI_LOGICAL2              OMPI_DATATYPE_MPI_INT16_T
 234 #elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == 4
 235 #  define OMPI_DATATYPE_MPI_LOGICAL2              OMPI_DATATYPE_MPI_INT32_T
 236 #elif OMPI_SIZEOF_FORTRAN_LOGICAL2 == 8
 237 #  define OMPI_DATATYPE_MPI_LOGICAL2              OMPI_DATATYPE_MPI_INT64_T
 238 #else
 239 #  define OMPI_DATATYPE_MPI_LOGICAL2              OMPI_DATATYPE_MPI_UNAVAILABLE
 240 #endif
 241 
 242 #if OMPI_SIZEOF_FORTRAN_LOGICAL4 == OMPI_SIZEOF_FORTRAN_LOGICAL
 243 #  define OMPI_DATATYPE_MPI_LOGICAL4              OMPI_DATATYPE_MPI_LOGICAL
 244 #elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == 1
 245 #  define OMPI_DATATYPE_MPI_LOGICAL4              OMPI_DATATYPE_MPI_INT8_T
 246 #elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == 2
 247 #  define OMPI_DATATYPE_MPI_LOGICAL4              OMPI_DATATYPE_MPI_INT16_T
 248 #elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == 4
 249 #  define OMPI_DATATYPE_MPI_LOGICAL4              OMPI_DATATYPE_MPI_INT32_T
 250 #elif OMPI_SIZEOF_FORTRAN_LOGICAL4 == 8
 251 #  define OMPI_DATATYPE_MPI_LOGICAL4              OMPI_DATATYPE_MPI_INT64_T
 252 #else
 253 #  define OMPI_DATATYPE_MPI_LOGICAL4              OMPI_DATATYPE_MPI_UNAVAILABLE
 254 #endif
 255 
 256 #if OMPI_SIZEOF_FORTRAN_LOGICAL8 == OMPI_SIZEOF_FORTRAN_LOGICAL
 257 #  define OMPI_DATATYPE_MPI_LOGICAL8              OMPI_DATATYPE_MPI_LOGICAL
 258 #elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == 1
 259 #  define OMPI_DATATYPE_MPI_LOGICAL8              OMPI_DATATYPE_MPI_INT8_T
 260 #elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == 2
 261 #  define OMPI_DATATYPE_MPI_LOGICAL8              OMPI_DATATYPE_MPI_INT16_T
 262 #elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == 4
 263 #  define OMPI_DATATYPE_MPI_LOGICAL8              OMPI_DATATYPE_MPI_INT32_T
 264 #elif OMPI_SIZEOF_FORTRAN_LOGICAL8 == 8
 265 #  define OMPI_DATATYPE_MPI_LOGICAL8              OMPI_DATATYPE_MPI_INT64_T
 266 #else
 267 #  define OMPI_DATATYPE_MPI_LOGICAL8              OMPI_DATATYPE_MPI_UNAVAILABLE
 268 #endif
 269 
 270 /* INTEGER */
 271 #if OMPI_SIZEOF_FORTRAN_INTEGER1 == OMPI_SIZEOF_FORTRAN_INTEGER
 272 #  define OMPI_DATATYPE_MPI_INTEGER1              OMPI_DATATYPE_MPI_INTEGER
 273 #elif OMPI_SIZEOF_FORTRAN_INTEGER1 == 1
 274 #  define OMPI_DATATYPE_MPI_INTEGER1              OMPI_DATATYPE_MPI_INT8_T
 275 #elif OMPI_SIZEOF_FORTRAN_INTEGER1 == 2
 276 #  define OMPI_DATATYPE_MPI_INTEGER1              OMPI_DATATYPE_MPI_INT16_T
 277 #elif OMPI_SIZEOF_FORTRAN_INTEGER1 == 4
 278 #  define OMPI_DATATYPE_MPI_INTEGER1              OMPI_DATATYPE_MPI_INT32_T
 279 #elif OMPI_SIZEOF_FORTRAN_INTEGER1 == 8
 280 #  define OMPI_DATATYPE_MPI_INTEGER1              OMPI_DATATYPE_MPI_INT64_T
 281 #else
 282 #  define OMPI_DATATYPE_MPI_INTEGER1              OMPI_DATATYPE_MPI_UNAVAILABLE
 283 #endif
 284 
 285 #if OMPI_SIZEOF_FORTRAN_INTEGER2 == OMPI_SIZEOF_FORTRAN_INTEGER
 286 #  define OMPI_DATATYPE_MPI_INTEGER2              OMPI_DATATYPE_MPI_INTEGER
 287 #elif OMPI_SIZEOF_FORTRAN_INTEGER2 == 1
 288 #  define OMPI_DATATYPE_MPI_INTEGER2              OMPI_DATATYPE_MPI_INT8_T
 289 #elif OMPI_SIZEOF_FORTRAN_INTEGER2 == 2
 290 #  define OMPI_DATATYPE_MPI_INTEGER2              OMPI_DATATYPE_MPI_INT16_T
 291 #elif OMPI_SIZEOF_FORTRAN_INTEGER2 == 4
 292 #  define OMPI_DATATYPE_MPI_INTEGER2              OMPI_DATATYPE_MPI_INT32_T
 293 #elif OMPI_SIZEOF_FORTRAN_INTEGER2 == 8
 294 #  define OMPI_DATATYPE_MPI_INTEGER2              OMPI_DATATYPE_MPI_INT64_T
 295 #else
 296 #  define OMPI_DATATYPE_MPI_INTEGER2              OMPI_DATATYPE_MPI_UNAVAILABLE
 297 #endif
 298 
 299 #if OMPI_SIZEOF_FORTRAN_INTEGER4 == OMPI_SIZEOF_FORTRAN_INTEGER
 300 #  define OMPI_DATATYPE_MPI_INTEGER4              OMPI_DATATYPE_MPI_INTEGER
 301 #elif OMPI_SIZEOF_FORTRAN_INTEGER4 == 1
 302 #  define OMPI_DATATYPE_MPI_INTEGER4              OMPI_DATATYPE_MPI_INT8_T
 303 #elif OMPI_SIZEOF_FORTRAN_INTEGER4 == 2
 304 #  define OMPI_DATATYPE_MPI_INTEGER4              OMPI_DATATYPE_MPI_INT16_T
 305 #elif OMPI_SIZEOF_FORTRAN_INTEGER4 == 4
 306 #  define OMPI_DATATYPE_MPI_INTEGER4              OMPI_DATATYPE_MPI_INT32_T
 307 #elif OMPI_SIZEOF_FORTRAN_INTEGER4 == 8
 308 #  define OMPI_DATATYPE_MPI_INTEGER4              OMPI_DATATYPE_MPI_INT64_T
 309 #else
 310 #  define OMPI_DATATYPE_MPI_INTEGER4              OMPI_DATATYPE_MPI_UNAVAILABLE
 311 #endif
 312 
 313 #if OMPI_SIZEOF_FORTRAN_INTEGER8 == OMPI_SIZEOF_FORTRAN_INTEGER
 314 #  define OMPI_DATATYPE_MPI_INTEGER8              OMPI_DATATYPE_MPI_INTEGER
 315 #elif OMPI_SIZEOF_FORTRAN_INTEGER8 == 1
 316 #  define OMPI_DATATYPE_MPI_INTEGER8              OMPI_DATATYPE_MPI_INT8_T
 317 #elif OMPI_SIZEOF_FORTRAN_INTEGER8 == 2
 318 #  define OMPI_DATATYPE_MPI_INTEGER8              OMPI_DATATYPE_MPI_INT16_T
 319 #elif OMPI_SIZEOF_FORTRAN_INTEGER8 == 4
 320 #  define OMPI_DATATYPE_MPI_INTEGER8              OMPI_DATATYPE_MPI_INT32_T
 321 #elif OMPI_SIZEOF_FORTRAN_INTEGER8 == 8
 322 #  define OMPI_DATATYPE_MPI_INTEGER8              OMPI_DATATYPE_MPI_INT64_T
 323 #else
 324 #  define OMPI_DATATYPE_MPI_INTEGER8              OMPI_DATATYPE_MPI_UNAVAILABLE
 325 #endif
 326 
 327 #if OMPI_SIZEOF_FORTRAN_INTEGER16 == OMPI_SIZEOF_FORTRAN_INTEGER
 328 #  define OMPI_DATATYPE_MPI_INTEGER16             OMPI_DATATYPE_MPI_INTEGER
 329 #elif OMPI_SIZEOF_FORTRAN_INTEGER16 == 1
 330 #  define OMPI_DATATYPE_MPI_INTEGER16             OMPI_DATATYPE_MPI_INT8_T
 331 #elif OMPI_SIZEOF_FORTRAN_INTEGER16 == 2
 332 #  define OMPI_DATATYPE_MPI_INTEGER16             OMPI_DATATYPE_MPI_INT16_T
 333 #elif OMPI_SIZEOF_FORTRAN_INTEGER16 == 4
 334 #  define OMPI_DATATYPE_MPI_INTEGER16             OMPI_DATATYPE_MPI_INT32_T
 335 #elif OMPI_SIZEOF_FORTRAN_INTEGER16 == 8
 336 #  define OMPI_DATATYPE_MPI_INTEGER16             OMPI_DATATYPE_MPI_INT64_T
 337 #else
 338 #  define OMPI_DATATYPE_MPI_INTEGER16             OMPI_DATATYPE_MPI_UNAVAILABLE
 339 #endif
 340 
 341 /* REAL */
 342 #if OMPI_SIZEOF_FORTRAN_REAL2 == OMPI_SIZEOF_FORTRAN_REAL
 343 #  define OMPI_DATATYPE_MPI_REAL2                 OMPI_DATATYPE_MPI_REAL
 344 #elif (defined(HAVE_SHORT_FLOAT) && OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_SHORT_FLOAT) || \
 345       (defined(HAVE_OPAL_SHORT_FLOAT_T) && OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_OPAL_SHORT_FLOAT_T)
 346 #  define OMPI_DATATYPE_MPI_REAL2                 OMPI_DATATYPE_MPI_SHORT_FLOAT
 347 #elif OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_FLOAT
 348 #  define OMPI_DATATYPE_MPI_REAL2                 OMPI_DATATYPE_MPI_FLOAT
 349 #elif OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_DOUBLE
 350 #  define OMPI_DATATYPE_MPI_REAL2                 OMPI_DATATYPE_MPI_DOUBLE
 351 #elif OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_LONG_DOUBLE
 352 #  define OMPI_DATATYPE_MPI_REAL2                 OMPI_DATATYPE_MPI_LONG_DOUBLE
 353 #else
 354 #  define OMPI_DATATYPE_MPI_REAL2                 OMPI_DATATYPE_MPI_UNAVAILABLE
 355 #endif
 356 
 357 #if OMPI_SIZEOF_FORTRAN_REAL4 == OMPI_SIZEOF_FORTRAN_REAL
 358 #  define OMPI_DATATYPE_MPI_REAL4                 OMPI_DATATYPE_MPI_REAL
 359 #elif (defined(HAVE_SHORT_FLOAT) && OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_SHORT_FLOAT) || \
 360       (defined(HAVE_OPAL_SHORT_FLOAT_T) && OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_OPAL_SHORT_FLOAT_T)
 361 #  define OMPI_DATATYPE_MPI_REAL4                 OMPI_DATATYPE_MPI_SHORT_FLOAT
 362 #elif OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_FLOAT
 363 #  define OMPI_DATATYPE_MPI_REAL4                 OMPI_DATATYPE_MPI_FLOAT
 364 #elif OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_DOUBLE
 365 #  define OMPI_DATATYPE_MPI_REAL4                 OMPI_DATATYPE_MPI_DOUBLE
 366 #elif OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_LONG_DOUBLE
 367 #  define OMPI_DATATYPE_MPI_REAL4                 OMPI_DATATYPE_MPI_LONG_DOUBLE
 368 #else
 369 #  define OMPI_DATATYPE_MPI_REAL4                 OMPI_DATATYPE_MPI_UNAVAILABLE
 370 #endif
 371 
 372 #if OMPI_SIZEOF_FORTRAN_REAL8 == OMPI_SIZEOF_FORTRAN_REAL
 373 #  define OMPI_DATATYPE_MPI_REAL8                 OMPI_DATATYPE_MPI_REAL
 374 #elif (defined(HAVE_SHORT_FLOAT) && OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_SHORT_FLOAT) || \
 375       (defined(HAVE_OPAL_SHORT_FLOAT_T) && OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_OPAL_SHORT_FLOAT_T)
 376 #  define OMPI_DATATYPE_MPI_REAL8                 OMPI_DATATYPE_MPI_SHORT_FLOAT
 377 #elif OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_FLOAT
 378 #  define OMPI_DATATYPE_MPI_REAL8                 OMPI_DATATYPE_MPI_FLOAT
 379 #elif OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_DOUBLE
 380 #  define OMPI_DATATYPE_MPI_REAL8                 OMPI_DATATYPE_MPI_DOUBLE
 381 #elif OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_LONG_DOUBLE
 382 #  define OMPI_DATATYPE_MPI_REAL8                 OMPI_DATATYPE_MPI_LONG_DOUBLE
 383 #else
 384 #  define OMPI_DATATYPE_MPI_REAL8                 OMPI_DATATYPE_MPI_UNAVAILABLE
 385 #endif
 386 
 387 #if OMPI_SIZEOF_FORTRAN_REAL16 == OMPI_SIZEOF_FORTRAN_REAL
 388 #  define OMPI_DATATYPE_MPI_REAL16                OMPI_DATATYPE_MPI_REAL
 389 #elif (defined(HAVE_SHORT_FLOAT) && OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_SHORT_FLOAT) || \
 390       (defined(HAVE_OPAL_SHORT_FLOAT_T) && OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_OPAL_SHORT_FLOAT_T)
 391 #  define OMPI_DATATYPE_MPI_REAL16                 OMPI_DATATYPE_MPI_SHORT_FLOAT
 392 #elif OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_FLOAT
 393 #  define OMPI_DATATYPE_MPI_REAL16                OMPI_DATATYPE_MPI_FLOAT
 394 #elif OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_DOUBLE
 395 #  define OMPI_DATATYPE_MPI_REAL16                OMPI_DATATYPE_MPI_DOUBLE
 396 #elif OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_LONG_DOUBLE
 397 #  define OMPI_DATATYPE_MPI_REAL16                OMPI_DATATYPE_MPI_LONG_DOUBLE
 398 #else
 399 #  define OMPI_DATATYPE_MPI_REAL16                OMPI_DATATYPE_MPI_UNAVAILABLE
 400 #endif
 401 
 402 /*
 403  * C++ datatypes, these map to C datatypes.
 404  */
 405 #define OMPI_DATATYPE_MPI_CXX_BOOL                OMPI_DATATYPE_MPI_C_BOOL
 406 #define OMPI_DATATYPE_MPI_CXX_SHORT_FLOAT_COMPLEX OMPI_DATATYPE_MPI_C_SHORT_FLOAT_COMPLEX
 407 #define OMPI_DATATYPE_MPI_CXX_FLOAT_COMPLEX       OMPI_DATATYPE_MPI_C_FLOAT_COMPLEX
 408 #define OMPI_DATATYPE_MPI_CXX_DOUBLE_COMPLEX      OMPI_DATATYPE_MPI_C_DOUBLE_COMPLEX
 409 #define OMPI_DATATYPE_MPI_CXX_LONG_DOUBLE_COMPLEX OMPI_DATATYPE_MPI_C_LONG_DOUBLE_COMPLEX
 410 
 411 extern const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX_PREDEFINED];
 412 
 413 /* There 3 types of predefined data types.
 414  * - the basic one composed by just one basic datatype which are
 415  *   definitively contiguous
 416  * - the derived ones where the same basic type is used multiple times.
 417  *   They should be most of the time contiguous.
 418  * - and finally the derived one where multiple basic types are used.
 419  *   Depending on the architecture they can be contiguous or not.
 420  *
 421  * At this level we do not care from which language the datatype came from
 422  * (C, C++ or FORTRAN), we only focus on their internal representation in
 423  * the host memory.
 424  */
 425 
 426 #define OMPI_DATATYPE_EMPTY_DATA(NAME)                                               \
 427     .id = OMPI_DATATYPE_MPI_ ## NAME,                                                \
 428     .d_f_to_c_index = -1,                                                            \
 429     .d_keyhash = NULL,                                                               \
 430     .args = NULL,                                                                    \
 431     .packed_description = 0,                                                         \
 432     .name = "MPI_" # NAME
 433 
 434 #define OMPI_DATATYPE_INITIALIZER_UNAVAILABLE(FLAGS)                                 \
 435     OPAL_DATATYPE_INITIALIZER_UNAVAILABLE(FLAGS)
 436 
 437 #define OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE_X( TYPE, NAME, FLAGS )              \
 438     { /*ompi_predefined_datatype_t*/                                                 \
 439         { /* ompi_datatype_t */                                                      \
 440             OMPI_DATATYPE_INITIALIZER_ ## TYPE (OMPI_DATATYPE_FLAG_PREDEFINED |      \
 441                                                 OMPI_DATATYPE_FLAG_ANALYZED   |      \
 442                                                 OMPI_DATATYPE_FLAG_MONOTONIC  |      \
 443                                                 (FLAGS)) /*super*/,                  \
 444             OMPI_DATATYPE_EMPTY_DATA(NAME) /*id,d_f_to_c_index,d_keyhash,args,packed_description,name*/ \
 445         },                                                                           \
 446         {0, } /* padding */                                                          \
 447     }
 448 
 449 /* Preprocessor hack to make sure TYPE gets expanded properly */
 450 #define OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE(TYPE, NAME, FLAGS) OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE_X(TYPE, NAME, FLAGS)
 451 
 452 /*
 453  * Two macros for convenience
 454  */
 455 #define OMPI_DATATYPE_INIT_PREDEFINED( NAME, FLAGS )                                 \
 456     OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE( NAME, NAME, FLAGS )
 457 #define OMPI_DATATYPE_INIT_UNAVAILABLE( NAME, FLAGS )                                \
 458     OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE( UNAVAILABLE, NAME, FLAGS )
 459 #define OMPI_DATATYPE_INIT_UNAVAILABLE_BASIC_TYPE(TYPE, NAME, FLAGS)                 \
 460     OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE( UNAVAILABLE, NAME, FLAGS )
 461 
 462 /*
 463  * Initialization for these types is deferred until runtime.
 464  *
 465  * Using this macro implies that at this point not all informations needed
 466  * to fill up the datatype are known. We fill them with zeros and then later
 467  * when the datatype engine will be initialized we complete with the
 468  * correct information. This macro should be used for all composed types.
 469  */
 470 #define OMPI_DATATYPE_INIT_DEFER(NAME, FLAGS)                                        \
 471     OMPI_DATATYPE_INIT_UNAVAILABLE(NAME, FLAGS)
 472 
 473 
 474 #if OMPI_BUILD_FORTRAN_BINDINGS
 475 /*
 476  * Fortran types are based on the underlying OPAL types: They share the ID -- however,
 477  * the alignment is overwritten.
 478  */
 479 #define OMPI_DATATYPE_INITIALIZER_FORTRAN( TYPE, NAME, SIZE, ALIGN, FLAGS )          \
 480     {                                                                                \
 481         .super = OPAL_OBJ_STATIC_INIT(opal_datatype_t),                              \
 482         .flags = OPAL_DATATYPE_FLAG_BASIC |                                          \
 483             OMPI_DATATYPE_FLAG_PREDEFINED |                                          \
 484             OMPI_DATATYPE_FLAG_ANALYZED   |                                          \
 485             OMPI_DATATYPE_FLAG_MONOTONIC  |                                          \
 486             OMPI_DATATYPE_FLAG_DATA_FORTRAN | (FLAGS),                               \
 487         .id = OPAL_DATATYPE_ ## TYPE ## SIZE,                                        \
 488         .bdt_used = (((uint32_t)1)<<(OPAL_DATATYPE_ ## TYPE ## SIZE)),               \
 489         .size = SIZE,                                                                \
 490         .true_lb = 0, .true_ub = SIZE, .lb = 0, .ub = SIZE,                          \
 491         .align = (ALIGN),                                                            \
 492         .nbElems = 1,                                                                \
 493         .name = OPAL_DATATYPE_INIT_NAME(TYPE ## SIZE),                               \
 494         .desc = OPAL_DATATYPE_INIT_DESC_PREDEFINED(TYPE ## SIZE),                    \
 495         .opt_desc = OPAL_DATATYPE_INIT_DESC_PREDEFINED(TYPE ## SIZE),                \
 496         .ptypes = OPAL_DATATYPE_INIT_PTYPES_ARRAY(TYPE ## SIZE)                      \
 497     }
 498 
 499 #define OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE_FORTRAN( TYPE, NAME, SIZE, ALIGN, FLAGS ) \
 500     { /*ompi_predefined_datatype_t*/                                                 \
 501         .dt = {                                                                      \
 502             .super = OMPI_DATATYPE_INITIALIZER_FORTRAN( TYPE, NAME, SIZE, ALIGN, FLAGS), \
 503             OMPI_DATATYPE_EMPTY_DATA(NAME) /*id,d_f_to_c_index,d_keyhash,args,packed_description,name*/ \
 504         },                                                                           \
 505         .padding = {0, }                                                             \
 506     }
 507 #else
 508 #define OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE_FORTRAN( TYPE, NAME, SIZE, ALIGN, FLAGS ) \
 509     OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE( UNAVAILABLE, NAME, FLAGS )
 510 #endif
 511 
 512 
 513 /*
 514  * OMPI-Versions of Initializer mapped onto OPAL-Types
 515  */
 516 
 517 #define OMPI_DATATYPE_INITIALIZER_LB                  OPAL_DATATYPE_INITIALIZER_LB
 518 #define OMPI_DATATYPE_INITIALIZER_UB                  OPAL_DATATYPE_INITIALIZER_UB
 519 
 520 #define OMPI_DATATYPE_INITIALIZER_INT8_T              OPAL_DATATYPE_INITIALIZER_INT1
 521 #define OMPI_DATATYPE_INITIALIZER_UINT8_T             OPAL_DATATYPE_INITIALIZER_UINT1
 522 #define OMPI_DATATYPE_INITIALIZER_INT16_T             OPAL_DATATYPE_INITIALIZER_INT2
 523 #define OMPI_DATATYPE_INITIALIZER_UINT16_T            OPAL_DATATYPE_INITIALIZER_UINT2
 524 #define OMPI_DATATYPE_INITIALIZER_INT32_T             OPAL_DATATYPE_INITIALIZER_INT4
 525 #define OMPI_DATATYPE_INITIALIZER_UINT32_T            OPAL_DATATYPE_INITIALIZER_UINT4
 526 #define OMPI_DATATYPE_INITIALIZER_INT64_T             OPAL_DATATYPE_INITIALIZER_INT8
 527 #define OMPI_DATATYPE_INITIALIZER_UINT64_T            OPAL_DATATYPE_INITIALIZER_UINT8
 528 
 529 #if SIZEOF_CHAR == 1
 530 #define OMPI_DATATYPE_INITIALIZER_CHAR                OPAL_DATATYPE_INITIALIZER_INT1
 531 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED_CHAR       OPAL_DATATYPE_INITIALIZER_UINT1
 532 #define OMPI_DATATYPE_INITIALIZER_SIGNED_CHAR         OPAL_DATATYPE_INITIALIZER_INT1
 533 #define OMPI_DATATYPE_INITIALIZER_BYTE                OPAL_DATATYPE_INITIALIZER_UINT1
 534 #elif SIZEOF_CHAR == 2
 535 #define OMPI_DATATYPE_INITIALIZER_CHAR                OPAL_DATATYPE_INITIALIZER_INT2
 536 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED_CHAR       OPAL_DATATYPE_INITIALIZER_UINT2
 537 #define OMPI_DATATYPE_INITIALIZER_SIGNED_CHAR         OPAL_DATATYPE_INITIALIZER_INT2
 538 #define OMPI_DATATYPE_INITIALIZER_BYTE                OPAL_DATATYPE_INITIALIZER_UINT2
 539 #elif SIZEOF_CHAR == 4
 540 #define OMPI_DATATYPE_INITIALIZER_CHAR                OPAL_DATATYPE_INITIALIZER_INT4
 541 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED_CHAR       OPAL_DATATYPE_INITIALIZER_UINT4
 542 #define OMPI_DATATYPE_INITIALIZER_SIGNED_CHAR         OPAL_DATATYPE_INITIALIZER_INT4
 543 #define OMPI_DATATYPE_INITIALIZER_BYTE                OPAL_DATATYPE_INITIALIZER_UINT4
 544 #elif SIZEOF_CHAR == 8
 545 #define OMPI_DATATYPE_INITIALIZER_CHAR                OPAL_DATATYPE_INITIALIZER_INT8
 546 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED_CHAR       OPAL_DATATYPE_INITIALIZER_UINT8
 547 #define OMPI_DATATYPE_INITIALIZER_SIGNED_CHAR         OPAL_DATATYPE_INITIALIZER_INT8
 548 #define OMPI_DATATYPE_INITIALIZER_BYTE                OPAL_DATATYPE_INITIALIZER_UINT8
 549 #endif
 550 
 551 #if SIZEOF_SHORT == 2
 552 #define OMPI_DATATYPE_INITIALIZER_SHORT               OPAL_DATATYPE_INITIALIZER_INT2
 553 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED_SHORT      OPAL_DATATYPE_INITIALIZER_UINT2
 554 #elif SIZEOF_SHORT == 4
 555 #define OMPI_DATATYPE_INITIALIZER_SHORT               OPAL_DATATYPE_INITIALIZER_INT4
 556 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED_SHORT      OPAL_DATATYPE_INITIALIZER_UINT4
 557 #elif SIZEOF_SHORT == 8
 558 #define OMPI_DATATYPE_INITIALIZER_SHORT               OPAL_DATATYPE_INITIALIZER_INT8
 559 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED_SHORT      OPAL_DATATYPE_INITIALIZER_UINT8
 560 #endif
 561 
 562 #if SIZEOF_INT == 2
 563 #define OMPI_DATATYPE_INITIALIZER_INT                 OPAL_DATATYPE_INITIALIZER_INT2
 564 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED            OPAL_DATATYPE_INITIALIZER_UINT2
 565 #elif SIZEOF_INT == 4
 566 #define OMPI_DATATYPE_INITIALIZER_INT                 OPAL_DATATYPE_INITIALIZER_INT4
 567 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED            OPAL_DATATYPE_INITIALIZER_UINT4
 568 #elif SIZEOF_INT == 8
 569 #define OMPI_DATATYPE_INITIALIZER_INT                 OPAL_DATATYPE_INITIALIZER_INT8
 570 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED            OPAL_DATATYPE_INITIALIZER_UINT8
 571 #endif
 572 
 573 #if SIZEOF_LONG == 4
 574 #define OMPI_DATATYPE_INITIALIZER_LONG                OPAL_DATATYPE_INITIALIZER_INT4
 575 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED_LONG       OPAL_DATATYPE_INITIALIZER_UINT4
 576 #elif SIZEOF_LONG == 8
 577 #define OMPI_DATATYPE_INITIALIZER_LONG                OPAL_DATATYPE_INITIALIZER_INT8
 578 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED_LONG       OPAL_DATATYPE_INITIALIZER_UINT8
 579 #elif SIZEOF_LONG == 16
 580 #define OMPI_DATATYPE_INITIALIZER_LONG                OPAL_DATATYPE_INITIALIZER_INT16
 581 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED_LONG       OPAL_DATATYPE_INITIALIZER_UINT16
 582 #endif
 583 
 584 #if SIZEOF_LONG_LONG == 4
 585 #define OMPI_DATATYPE_INITIALIZER_LONG_LONG_INT       OPAL_DATATYPE_INITIALIZER_INT4
 586 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED_LONG_LONG  OPAL_DATATYPE_INITIALIZER_UINT4
 587 #elif SIZEOF_LONG_LONG == 8
 588 #define OMPI_DATATYPE_INITIALIZER_LONG_LONG_INT       OPAL_DATATYPE_INITIALIZER_INT8
 589 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED_LONG_LONG  OPAL_DATATYPE_INITIALIZER_UINT8
 590 #elif SIZEOF_LONG_LONG == 16
 591 #define OMPI_DATATYPE_INITIALIZER_LONG_LONG_INT       OPAL_DATATYPE_INITIALIZER_INT16
 592 #define OMPI_DATATYPE_INITIALIZER_UNSIGNED_LONG_LONG  OPAL_DATATYPE_INITIALIZER_UINT16
 593 #endif
 594 
 595 #if defined(HAVE_SHORT_FLOAT)
 596 #if SIZEOF_SHORT_FLOAT == 2
 597 #define OMPI_DATATYPE_INITIALIZER_SHORT_FLOAT         OPAL_DATATYPE_INITIALIZER_FLOAT2
 598 #elif SIZEOF_SHORT_FLOAT == 4
 599 #define OMPI_DATATYPE_INITIALIZER_SHORT_FLOAT         OPAL_DATATYPE_INITIALIZER_FLOAT4
 600 #elif SIZEOF_SHORT_FLOAT == 8
 601 #define OMPI_DATATYPE_INITIALIZER_SHORT_FLOAT         OPAL_DATATYPE_INITIALIZER_FLOAT8
 602 #endif
 603 #elif defined(HAVE_OPAL_SHORT_FLOAT_T) /* HAVE_SHORT_FLOAT */
 604 #if SIZEOF_OPAL_SHORT_FLOAT_T == 2
 605 #define OMPI_DATATYPE_INITIALIZER_SHORT_FLOAT         OPAL_DATATYPE_INITIALIZER_FLOAT2
 606 #elif SIZEOF_OPAL_SHORT_FLOAT_T == 4
 607 #define OMPI_DATATYPE_INITIALIZER_SHORT_FLOAT         OPAL_DATATYPE_INITIALIZER_FLOAT4
 608 #elif SIZEOF_OPAL_SHORT_FLOAT_T == 8
 609 #define OMPI_DATATYPE_INITIALIZER_SHORT_FLOAT         OPAL_DATATYPE_INITIALIZER_FLOAT8
 610 #endif
 611 #else /* HAVE_SHORT_FLOAT */
 612 #define OMPI_DATATYPE_INITIALIZER_SHORT_FLOAT         OPAL_DATATYPE_INITIALIZER_UNAVAILABLE
 613 #endif /* HAVE_SHORT_FLOAT */
 614 
 615 #if SIZEOF_FLOAT == 2
 616 #define OMPI_DATATYPE_INITIALIZER_FLOAT               OPAL_DATATYPE_INITIALIZER_FLOAT2
 617 #elif SIZEOF_FLOAT == 4
 618 #define OMPI_DATATYPE_INITIALIZER_FLOAT               OPAL_DATATYPE_INITIALIZER_FLOAT4
 619 #elif SIZEOF_FLOAT == 8
 620 #define OMPI_DATATYPE_INITIALIZER_FLOAT               OPAL_DATATYPE_INITIALIZER_FLOAT8
 621 #endif
 622 
 623 #if SIZEOF_DOUBLE == 4
 624 #define OMPI_DATATYPE_INITIALIZER_DOUBLE              OPAL_DATATYPE_INITIALIZER_FLOAT4
 625 #elif SIZEOF_DOUBLE == 8
 626 #define OMPI_DATATYPE_INITIALIZER_DOUBLE              OPAL_DATATYPE_INITIALIZER_FLOAT8
 627 #elif SIZEOF_DOUBLE == 12
 628 #define OMPI_DATATYPE_INITIALIZER_DOUBLE              OPAL_DATATYPE_INITIALIZER_FLOAT12
 629 #elif SIZEOF_DOUBLE == 16
 630 #define OMPI_DATATYPE_INITIALIZER_DOUBLE              OPAL_DATATYPE_INITIALIZER_FLOAT16
 631 #endif
 632 
 633 #if SIZEOF_LONG_DOUBLE == 4
 634 #define OMPI_DATATYPE_INITIALIZER_LONG_DOUBLE         OPAL_DATATYPE_INITIALIZER_FLOAT4
 635 #elif SIZEOF_LONG_DOUBLE == 8
 636 #define OMPI_DATATYPE_INITIALIZER_LONG_DOUBLE         OPAL_DATATYPE_INITIALIZER_FLOAT8
 637 #elif SIZEOF_LONG_DOUBLE == 12
 638 #define OMPI_DATATYPE_INITIALIZER_LONG_DOUBLE         OPAL_DATATYPE_INITIALIZER_FLOAT12
 639 #elif SIZEOF_LONG_DOUBLE == 16
 640 #define OMPI_DATATYPE_INITIALIZER_LONG_DOUBLE         OPAL_DATATYPE_INITIALIZER_FLOAT16
 641 #endif
 642 
 643 #define OMPI_DATATYPE_INITIALIZER_PACKED              OPAL_DATATYPE_INITIALIZER_UINT1
 644 
 645 #define OMPI_DATATYPE_INITIALIZER_BOOL                OPAL_DATATYPE_INITIALIZER_BOOL
 646 
 647 #define OMPI_DATATYPE_INITIALIZER_WCHAR               OPAL_DATATYPE_INITIALIZER_WCHAR
 648 
 649 #define OMPI_DATATYPE_INITIALIZER_C_SHORT_FLOAT_COMPLEX OPAL_DATATYPE_INITIALIZER_SHORT_FLOAT_COMPLEX
 650 #define OMPI_DATATYPE_INITIALIZER_C_FLOAT_COMPLEX       OPAL_DATATYPE_INITIALIZER_FLOAT_COMPLEX
 651 #define OMPI_DATATYPE_INITIALIZER_C_DOUBLE_COMPLEX      OPAL_DATATYPE_INITIALIZER_DOUBLE_COMPLEX
 652 #define OMPI_DATATYPE_INITIALIZER_C_LONG_DOUBLE_COMPLEX OPAL_DATATYPE_INITIALIZER_LONG_DOUBLE_COMPLEX
 653 
 654 /*
 655  * Following are the structured types, that cannot be represented
 656  * by one single OPAL basic type
 657  */
 658 #define OMPI_DATATYPE_FIRST_TYPE                      OPAL_DATATYPE_MAX_PREDEFINED
 659 
 660 /*
 661  * Derived datatypes supposedly contiguous
 662  */
 663 #define OMPI_DATATYPE_2INT                            (OMPI_DATATYPE_FIRST_TYPE+6)
 664 #define OMPI_DATATYPE_2INTEGER                        (OMPI_DATATYPE_FIRST_TYPE+7)
 665 #define OMPI_DATATYPE_2REAL                           (OMPI_DATATYPE_FIRST_TYPE+8)
 666 #define OMPI_DATATYPE_2DBLPREC                        (OMPI_DATATYPE_FIRST_TYPE+9)
 667 #define OMPI_DATATYPE_2COMPLEX                        (OMPI_DATATYPE_FIRST_TYPE+10)
 668 #define OMPI_DATATYPE_2DOUBLE_COMPLEX                 (OMPI_DATATYPE_FIRST_TYPE+11)
 669 /*
 670  * Derived datatypes which will definitively be non contiguous on some architectures.
 671  */
 672 #define OMPI_DATATYPE_FLOAT_INT                       (OMPI_DATATYPE_FIRST_TYPE+12)
 673 #define OMPI_DATATYPE_DOUBLE_INT                      (OMPI_DATATYPE_FIRST_TYPE+13)
 674 #define OMPI_DATATYPE_LONG_DOUBLE_INT                 (OMPI_DATATYPE_FIRST_TYPE+14)
 675 #define OMPI_DATATYPE_SHORT_INT                       (OMPI_DATATYPE_FIRST_TYPE+15)
 676 #define OMPI_DATATYPE_LONG_INT                        (OMPI_DATATYPE_FIRST_TYPE+16)
 677 
 678 /* Used locally as a nice marker */
 679 #define OMPI_DATATYPE_UNAVAILABLE                     (OMPI_DATATYPE_FIRST_TYPE+17)
 680 
 681 /* If the number of basic datatype should change update OMPI_DATATYPE_MAX_PREDEFINED in ompi_datatype.h */
 682 #if OMPI_DATATYPE_MAX_PREDEFINED <= OMPI_DATATYPE_UNAVAILABLE
 683 #error OMPI_DATATYPE_MAX_PREDEFINED should be updated to the next value after the OMPI_DATATYPE_UNAVAILABLE define
 684 #endif  /* safe check for max predefined datatypes. */
 685 
 686 #endif /* OMPI_DATATYPE_INTERNAL_H */

/* [<][>][^][v][top][bottom][index][help] */