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

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

DEFINITIONS

This source file includes following definitions.
  1. ompi_dist_graph_neighbors_count_f

   1 /*
   2  * Copyright (c) 2011-2013 The University of Tennessee and The University
   3  *                         of Tennessee Research Foundation.  All rights
   4  *                         reserved.
   5  * Copyright (c) 2011-2013 Inria.  All rights reserved.
   6  * Copyright (c) 2011-2013 Université Bordeaux 1
   7  * Copyright (c) 2015      Research Organization for Information Science
   8  *                         and Technology (RIST). All rights reserved.
   9  * $COPYRIGHT$
  10  *
  11  * Additional copyrights may follow
  12  *
  13  * $HEADER$
  14  */
  15 
  16 #include "ompi_config.h"
  17 
  18 #include "ompi/mpi/fortran/mpif-h/bindings.h"
  19 #include "ompi/mpi/fortran/base/constants.h"
  20 
  21 #if OMPI_BUILD_MPI_PROFILING
  22 #if OPAL_HAVE_WEAK_SYMBOLS
  23 #pragma weak PMPI_DIST_GRAPH_NEIGHBORS_COUNT = ompi_dist_graph_neighbors_count_f
  24 #pragma weak pmpi_dist_graph_neighbors_count = ompi_dist_graph_neighbors_count_f
  25 #pragma weak pmpi_dist_graph_neighbors_count_ = ompi_dist_graph_neighbors_count_f
  26 #pragma weak pmpi_dist_graph_neighbors_count__ = ompi_dist_graph_neighbors_count_f
  27 
  28 #pragma weak PMPI_Dist_graph_neighbors_count_f = ompi_dist_graph_neighbors_count_f
  29 #pragma weak PMPI_Dist_graph_neighbors_count_f08 = ompi_dist_graph_neighbors_count_f
  30 #else
  31 OMPI_GENERATE_F77_BINDINGS (PMPI_DIST_GRAPH_NEIGHBORS_COUNT,
  32                             pmpi_dist_graph_neighbors_count,
  33                             pmpi_dist_graph_neighbors_count_,
  34                             pmpi_dist_graph_neighbors_count__,
  35                             pompi_dist_graph_neighbors_count_f,
  36                             (MPI_Fint *comm, MPI_Fint *inneighbors, MPI_Fint *outneighbors, ompi_fortran_logical_t *weighted, MPI_Fint *ierr),
  37                             (comm, inneighbors, outneighbors, weighted, ierr) )
  38 #endif
  39 #endif
  40 
  41 #if OPAL_HAVE_WEAK_SYMBOLS
  42 #pragma weak MPI_DIST_GRAPH_NEIGHBORS_COUNT = ompi_dist_graph_neighbors_count_f
  43 #pragma weak mpi_dist_graph_neighbors_count = ompi_dist_graph_neighbors_count_f
  44 #pragma weak mpi_dist_graph_neighbors_count_ = ompi_dist_graph_neighbors_count_f
  45 #pragma weak mpi_dist_graph_neighbors_count__ = ompi_dist_graph_neighbors_count_f
  46 
  47 #pragma weak MPI_Dist_graph_neighbors_count_f = ompi_dist_graph_neighbors_count_f
  48 #pragma weak MPI_Dist_graph_neighbors_count_f08 = ompi_dist_graph_neighbors_count_f
  49 #else
  50 #if ! OMPI_BUILD_MPI_PROFILING
  51 OMPI_GENERATE_F77_BINDINGS (MPI_DIST_GRAPH_NEIGHBORS_COUNT,
  52                             mpi_dist_graph_neighbors_count,
  53                             mpi_dist_graph_neighbors_count_,
  54                             mpi_dist_graph_neighbors_count__,
  55                             ompi_dist_graph_neighbors_count_f,
  56                             (MPI_Fint *comm, MPI_Fint *inneighbors, MPI_Fint *outneighbors, ompi_fortran_logical_t *weighted, MPI_Fint *ierr),
  57                             (comm, inneighbors, outneighbors, weighted, ierr) )
  58 #else
  59 #define ompi_dist_graph_neighbors_count_f pompi_dist_graph_neighbors_count_f
  60 #endif
  61 #endif
  62 
  63 
  64 void ompi_dist_graph_neighbors_count_f(MPI_Fint *comm, MPI_Fint *inneighbors,
  65                                        MPI_Fint *outneighbors, ompi_fortran_logical_t *weighted,
  66                                        MPI_Fint *ierr)
  67 {
  68     MPI_Comm c_comm;
  69     OMPI_SINGLE_NAME_DECL(inneighbors);
  70     OMPI_SINGLE_NAME_DECL(outneighbors);
  71     OMPI_LOGICAL_NAME_DECL(weighted);
  72 
  73     c_comm = PMPI_Comm_f2c(*comm);
  74 
  75     *ierr = OMPI_INT_2_FINT(PMPI_Dist_graph_neighbors_count(c_comm,
  76                                                             OMPI_SINGLE_NAME_CONVERT(inneighbors),
  77                                                             OMPI_SINGLE_NAME_CONVERT(outneighbors),
  78                                                             OMPI_LOGICAL_SINGLE_NAME_CONVERT(weighted)));
  79     OMPI_SINGLE_INT_2_LOGICAL(weighted);
  80     if (OMPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
  81           OMPI_SINGLE_INT_2_FINT(inneighbors);
  82           OMPI_SINGLE_INT_2_FINT(outneighbors);
  83     }
  84 }
  85 

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