root/ompi/mpiext/pcollreq/mpif-h/neighbor_alltoall_init_f.c

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

DEFINITIONS

This source file includes following definitions.
  1. ompix_neighbor_alltoall_init_f

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
   4  *                         University Research and Technology
   5  *                         Corporation.  All rights reserved.
   6  * Copyright (c) 2004-2005 The University of Tennessee and The University
   7  *                         of Tennessee Research Foundation.  All rights
   8  *                         reserved.
   9  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
  10  *                         University of Stuttgart.  All rights reserved.
  11  * Copyright (c) 2004-2005 The Regents of the University of California.
  12  *                         All rights reserved.
  13  * Copyright (c) 2011-2012 Cisco Systems, Inc.  All rights reserved.
  14  * Copyright (c) 2013      Los Alamos National Security, LLC. All rights
  15  *                         reserved.
  16  * Copyright (c) 2015-2018 Research Organization for Information Science
  17  *                         and Technology (RIST). All rights reserved.
  18  * Copyright (c) 2018      FUJITSU LIMITED.  All rights reserved.
  19  * $COPYRIGHT$
  20  *
  21  * Additional copyrights may follow
  22  *
  23  * $HEADER$
  24  */
  25 
  26 #include "ompi_config.h"
  27 
  28 #include "ompi/mpi/fortran/mpif-h/bindings.h"
  29 #include "ompi/mpi/fortran/base/constants.h"
  30 #include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
  31 
  32 #if OMPI_BUILD_MPI_PROFILING
  33 #if OPAL_HAVE_WEAK_SYMBOLS
  34 #pragma weak PMPIX_NEIGHBOR_ALLTOALL_INIT = ompix_neighbor_alltoall_init_f
  35 #pragma weak pmpix_neighbor_alltoall_init = ompix_neighbor_alltoall_init_f
  36 #pragma weak pmpix_neighbor_alltoall_init_ = ompix_neighbor_alltoall_init_f
  37 #pragma weak pmpix_neighbor_alltoall_init__ = ompix_neighbor_alltoall_init_f
  38 
  39 #pragma weak PMPIX_Neighbor_alltoall_init_f = ompix_neighbor_alltoall_init_f
  40 #pragma weak PMPIX_Neighbor_alltoall_init_f08 = ompix_neighbor_alltoall_init_f
  41 #else
  42 OMPI_GENERATE_F77_BINDINGS (PMPIX_NEIGHBOR_ALLTOALL_INIT,
  43                             pmpix_neighbor_alltoall_init,
  44                             pmpix_neighbor_alltoall_init_,
  45                             pmpix_neighbor_alltoall_init__,
  46                             pompix_neighbor_alltoall_init_f,
  47                             (char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
  48                             (sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierr) )
  49 #endif
  50 #endif
  51 
  52 #if OPAL_HAVE_WEAK_SYMBOLS
  53 #pragma weak MPIX_NEIGHBOR_ALLTOALL_INIT = ompix_neighbor_alltoall_init_f
  54 #pragma weak mpix_neighbor_alltoall_init = ompix_neighbor_alltoall_init_f
  55 #pragma weak mpix_neighbor_alltoall_init_ = ompix_neighbor_alltoall_init_f
  56 #pragma weak mpix_neighbor_alltoall_init__ = ompix_neighbor_alltoall_init_f
  57 
  58 #pragma weak MPIX_Neighbor_alltoall_init_f = ompix_neighbor_alltoall_init_f
  59 #pragma weak MPIX_Neighbor_alltoall_init_f08 = ompix_neighbor_alltoall_init_f
  60 #else
  61 #if ! OMPI_BUILD_MPI_PROFILING
  62 OMPI_GENERATE_F77_BINDINGS (MPIX_NEIGHBOR_ALLTOALL_INIT,
  63                             mpix_neighbor_alltoall_init,
  64                             mpix_neighbor_alltoall_init_,
  65                             mpix_neighbor_alltoall_init__,
  66                             ompix_neighbor_alltoall_init_f,
  67                             (char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
  68                             (sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierr) )
  69 #else
  70 #define ompix_neighbor_alltoall_init_f pompix_neighbor_alltoall_init_f
  71 #endif
  72 #endif
  73 
  74 
  75 void ompix_neighbor_alltoall_init_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
  76                                     char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype,
  77                                     MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
  78 {
  79     int c_ierr;
  80     MPI_Comm c_comm;
  81     MPI_Info c_info;
  82     MPI_Request c_req;
  83     MPI_Datatype c_sendtype, c_recvtype;
  84 
  85     c_comm = PMPI_Comm_f2c(*comm);
  86     c_sendtype = PMPI_Type_f2c(*sendtype);
  87     c_recvtype = PMPI_Type_f2c(*recvtype);
  88     c_info = PMPI_Info_f2c(*info);
  89 
  90     sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
  91     sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
  92     recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
  93 
  94     c_ierr = PMPIX_Neighbor_alltoall_init(sendbuf,
  95                                           OMPI_FINT_2_INT(*sendcount),
  96                                           c_sendtype,
  97                                           recvbuf,
  98                                           OMPI_FINT_2_INT(*recvcount),
  99                                           c_recvtype, c_comm, c_info, &c_req);
 100     if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
 101 
 102     if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_req);
 103 }

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