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

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

DEFINITIONS

This source file includes following definitions.
  1. ompi_get_accumulate_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) 2014      Los Alamos National Security, LLC. All rights
  15  *                         reserved.
  16  * Copyright (c) 2015      Research Organization for Information Science
  17  *                         and Technology (RIST). All rights reserved.
  18  * $COPYRIGHT$
  19  *
  20  * Additional copyrights may follow
  21  *
  22  * $HEADER$
  23  */
  24 
  25 #include "ompi_config.h"
  26 
  27 #include "ompi/mpi/fortran/mpif-h/bindings.h"
  28 #include "ompi/mpi/fortran/base/constants.h"
  29 
  30 
  31 #if OMPI_BUILD_MPI_PROFILING
  32 #if OPAL_HAVE_WEAK_SYMBOLS
  33 #pragma weak PMPI_GET_ACCUMULATE = ompi_get_accumulate_f
  34 #pragma weak pmpi_get_accumulate = ompi_get_accumulate_f
  35 #pragma weak pmpi_get_accumulate_ = ompi_get_accumulate_f
  36 #pragma weak pmpi_get_accumulate__ = ompi_get_accumulate_f
  37 
  38 #pragma weak PMPI_Get_accumulate_f = ompi_get_accumulate_f
  39 #pragma weak PMPI_Get_accumulate_f08 = ompi_get_accumulate_f
  40 #else
  41 OMPI_GENERATE_F77_BINDINGS (PMPI_GET_ACCUMULATE,
  42                             pmpi_get_accumulate,
  43                             pmpi_get_accumulate_,
  44                             pmpi_get_accumulate__,
  45                             pompi_get_accumulate_f,
  46                             (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, char *result_addr, MPI_Fint *result_count, MPI_Fint *result_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *op, MPI_Fint *win, MPI_Fint *ierr),
  47                             (origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win, ierr) )
  48 #endif
  49 #endif
  50 
  51 #if OPAL_HAVE_WEAK_SYMBOLS
  52 #pragma weak MPI_GET_ACCUMULATE = ompi_get_accumulate_f
  53 #pragma weak mpi_get_accumulate = ompi_get_accumulate_f
  54 #pragma weak mpi_get_accumulate_ = ompi_get_accumulate_f
  55 #pragma weak mpi_get_accumulate__ = ompi_get_accumulate_f
  56 
  57 #pragma weak MPI_Get_accumulate_f = ompi_get_accumulate_f
  58 #pragma weak MPI_Get_accumulate_f08 = ompi_get_accumulate_f
  59 #else
  60 #if ! OMPI_BUILD_MPI_PROFILING
  61 OMPI_GENERATE_F77_BINDINGS (MPI_GET_ACCUMULATE,
  62                             mpi_get_accumulate,
  63                             mpi_get_accumulate_,
  64                             mpi_get_accumulate__,
  65                             ompi_get_accumulate_f,
  66                             (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, char *result_addr, MPI_Fint *result_count, MPI_Fint *result_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *op, MPI_Fint *win, MPI_Fint *ierr),
  67                             (origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win, ierr) )
  68 #else
  69 #define ompi_get_accumulate_f pompi_get_accumulate_f
  70 #endif
  71 #endif
  72 
  73 
  74 void ompi_get_accumulate_f(char *origin_addr, MPI_Fint *origin_count,
  75                            MPI_Fint *origin_datatype, char *result_addr,
  76                            MPI_Fint *result_count, MPI_Fint *result_datatype,
  77                            MPI_Fint *target_rank, MPI_Aint *target_disp,
  78                            MPI_Fint *target_count, MPI_Fint *target_datatype,
  79                            MPI_Fint *op, MPI_Fint *win, MPI_Fint *ierr)
  80 {
  81     int c_ierr;
  82     MPI_Datatype c_origin_datatype = PMPI_Type_f2c(*origin_datatype);
  83     MPI_Datatype c_result_datatype = PMPI_Type_f2c(*result_datatype);
  84     MPI_Datatype c_target_datatype = PMPI_Type_f2c(*target_datatype);
  85     MPI_Win c_win = PMPI_Win_f2c(*win);
  86     MPI_Op c_op = PMPI_Op_f2c(*op);
  87 
  88     c_ierr = PMPI_Get_accumulate(OMPI_F2C_BOTTOM(origin_addr),
  89                                 OMPI_FINT_2_INT(*origin_count),
  90                                 c_origin_datatype,
  91                                 OMPI_F2C_BOTTOM(result_addr),
  92                                 OMPI_FINT_2_INT(*result_count),
  93                                 c_result_datatype,
  94                                 OMPI_FINT_2_INT(*target_rank),
  95                                 *target_disp,
  96                                 OMPI_FINT_2_INT(*target_count),
  97                                 c_target_datatype, c_op, c_win);
  98     if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
  99 }

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