root/ompi/mpi/fortran/mpif-h/group_compare_f.c

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

DEFINITIONS

This source file includes following definitions.
  1. ompi_group_compare_f

   1 /*
   2  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2004-2005 The University of Tennessee and The University
   6  *                         of Tennessee Research Foundation.  All rights
   7  *                         reserved.
   8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
   9  *                         University of Stuttgart.  All rights reserved.
  10  * Copyright (c) 2004-2005 The Regents of the University of California.
  11  *                         All rights reserved.
  12  * Copyright (c) 2011-2012 Cisco Systems, Inc.  All rights reserved.
  13  * Copyright (c) 2015      Research Organization for Information Science
  14  *                         and Technology (RIST). All rights reserved.
  15  * $COPYRIGHT$
  16  *
  17  * Additional copyrights may follow
  18  *
  19  * $HEADER$
  20  */
  21 
  22 #include "ompi_config.h"
  23 
  24 #include "ompi/mpi/fortran/mpif-h/bindings.h"
  25 #include "ompi/group/group.h"
  26 
  27 
  28 #if OMPI_BUILD_MPI_PROFILING
  29 #if OPAL_HAVE_WEAK_SYMBOLS
  30 #pragma weak PMPI_GROUP_COMPARE = ompi_group_compare_f
  31 #pragma weak pmpi_group_compare = ompi_group_compare_f
  32 #pragma weak pmpi_group_compare_ = ompi_group_compare_f
  33 #pragma weak pmpi_group_compare__ = ompi_group_compare_f
  34 
  35 #pragma weak PMPI_Group_compare_f = ompi_group_compare_f
  36 #pragma weak PMPI_Group_compare_f08 = ompi_group_compare_f
  37 #else
  38 OMPI_GENERATE_F77_BINDINGS (PMPI_GROUP_COMPARE,
  39                            pmpi_group_compare,
  40                            pmpi_group_compare_,
  41                            pmpi_group_compare__,
  42                            pompi_group_compare_f,
  43                            (MPI_Fint *group1, MPI_Fint *group2,
  44                             MPI_Fint *result, MPI_Fint *ierror),
  45                            (group1,group2,result,ierror))
  46 #endif
  47 #endif
  48 
  49 #if OPAL_HAVE_WEAK_SYMBOLS
  50 #pragma weak MPI_GROUP_COMPARE = ompi_group_compare_f
  51 #pragma weak mpi_group_compare = ompi_group_compare_f
  52 #pragma weak mpi_group_compare_ = ompi_group_compare_f
  53 #pragma weak mpi_group_compare__ = ompi_group_compare_f
  54 
  55 #pragma weak MPI_Group_compare_f = ompi_group_compare_f
  56 #pragma weak MPI_Group_compare_f08 = ompi_group_compare_f
  57 #endif
  58 
  59 #if ! OMPI_BUILD_MPI_PROFILING && ! OPAL_HAVE_WEAK_SYMBOLS
  60 OMPI_GENERATE_F77_BINDINGS (MPI_GROUP_COMPARE,
  61                            mpi_group_compare,
  62                            mpi_group_compare_,
  63                            mpi_group_compare__,
  64                            ompi_group_compare_f,
  65                            (MPI_Fint *group1, MPI_Fint *group2,
  66                             MPI_Fint *result, MPI_Fint *ierror),
  67                            (group1,group2,result,ierror))
  68 #endif
  69 
  70 
  71 
  72 #if OMPI_BUILD_MPI_PROFILING && ! OPAL_HAVE_WEAK_SYMBOLS
  73 #define ompi_group_compare_f pompi_group_compare_f
  74 #endif
  75 
  76 
  77 void ompi_group_compare_f(MPI_Fint *group1, MPI_Fint *group2,
  78                          MPI_Fint *result, MPI_Fint *ierr)
  79 {
  80     int c_ierr;
  81     ompi_group_t *c_group1, *c_group2;
  82     OMPI_SINGLE_NAME_DECL(result);
  83 
  84     /* make the fortran to c representation conversion */
  85     c_group1 = PMPI_Group_f2c(*group1);
  86     c_group2 = PMPI_Group_f2c(*group2);
  87 
  88     c_ierr = PMPI_Group_compare(c_group1, c_group2,
  89                                OMPI_SINGLE_NAME_CONVERT(result)
  90                                );
  91     if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
  92 
  93     if (MPI_SUCCESS == c_ierr) {
  94         OMPI_SINGLE_INT_2_FINT(result);
  95     }
  96 }

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