-:    0:Source:/home/MPI/testing/mpich2/mpich2/src/mpi/coll/opmax.c
        -:    0:Graph:opmax.gcno
        -:    0:Data:opmax.gcda
        -:    0:Runs:4382
        -:    0:Programs:1376
        -:    1:/* -*- Mode: C; c-basic-offset:4 ; -*- */
        -:    2:/*
        -:    3: *
        -:    4: *  (C) 2001 by Argonne National Laboratory.
        -:    5: *      See COPYRIGHT in top-level directory.
        -:    6: */
        -:    7:
        -:    8:#include "mpiimpl.h"
        -:    9:#include "oputil.h"
        -:   10:
        -:   11:/*
        -:   12: * In MPI-2.1, this operation is valid only for C integer, Fortran integer,
        -:   13: * and floating point types (5.9.2 Predefined reduce operations)
        -:   14: */
        -:   15:
        -:   16:#undef FUNCNAME
        -:   17:#define FUNCNAME MPIR_MAXF
        -:   18:#undef FCNAME
        -:   19:#define FCNAME MPIU_QUOTE(FUNCNAME)
        -:   20:void MPIR_MAXF(
        -:   21:    void *invec,
        -:   22:    void *inoutvec,
        -:   23:    int *Len,
        -:   24:    MPI_Datatype *type )
    13792:   25:{
    13792:   26:    int i, len = *Len;
        -:   27:
    13792:   28:    switch (*type) {
        -:   29:#undef MPIR_OP_TYPE_MACRO
        -:   30:#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_, c_type_, MPIR_MAX)
        -:   31:        /* no semicolons by necessity */
     8904:   32:        MPIR_OP_TYPE_GROUP(C_INTEGER)
    #####:   33:        MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
      440:   34:        MPIR_OP_TYPE_GROUP(FLOATING_POINT)
        -:   35:        /* extra types that are not required to be supported by the MPI Standard */
        4:   36:        MPIR_OP_TYPE_GROUP(C_INTEGER_EXTRA)
    #####:   37:        MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER_EXTRA)
    #####:   38:        MPIR_OP_TYPE_GROUP(FLOATING_POINT_EXTRA)
        -:   39:#undef MPIR_OP_TYPE_MACRO
        -:   40:        /* --BEGIN ERROR HANDLING-- */
        -:   41:        default: {
    #####:   42:            MPIU_THREADPRIV_DECL;
    #####:   43:            MPIU_THREADPRIV_GET;
    #####:   44:            MPIU_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_MAX" );
        -:   45:            break;
        -:   46:        }
        -:   47:        /* --END ERROR HANDLING-- */
        -:   48:    }
    13792:   49:}
        -:   50:
        -:   51:
        -:   52:#undef FUNCNAME
        -:   53:#define FUNCNAME MPIR_MAXF_check_dtype
        -:   54:#undef FCNAME
        -:   55:#define FCNAME MPIU_QUOTE(FUNCNAME)
        -:   56:int MPIR_MAXF_check_dtype( MPI_Datatype type )
    25414:   57:{
    25414:   58:    switch (type) {
        -:   59:#undef MPIR_OP_TYPE_MACRO
        -:   60:#define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_) case (mpi_type_):
        -:   61:        MPIR_OP_TYPE_GROUP(C_INTEGER)
        -:   62:        MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER)
        -:   63:        MPIR_OP_TYPE_GROUP(FLOATING_POINT)
        -:   64:        /* extra types that are not required to be supported by the MPI Standard */
        -:   65:        MPIR_OP_TYPE_GROUP(C_INTEGER_EXTRA)
        -:   66:        MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER_EXTRA)
        -:   67:        MPIR_OP_TYPE_GROUP(FLOATING_POINT_EXTRA)
        -:   68:#undef MPIR_OP_TYPE_MACRO
    25404:   69:            return MPI_SUCCESS;
        -:   70:        /* --BEGIN ERROR HANDLING-- */
        -:   71:        default:
       10:   72:            return MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_MAX" );
        -:   73:        /* --END ERROR HANDLING-- */
        -:   74:    }
        -:   75:}