root/ompi/mpi/fortran/base/f90_accessors.c

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

DEFINITIONS

This source file includes following definitions.
  1. MPI_WTIME_F90
  2. mpi_wtime_f90
  3. mpi_wtime_f90_
  4. mpi_wtime_f90__
  5. MPI_WTICK_F90
  6. mpi_wtick_f90
  7. mpi_wtick_f90_
  8. mpi_wtick_f90__
  9. MPI_AINT_ADD_F90
  10. mpi_aint_add_f90
  11. mpi_aint_add_f90_
  12. mpi_aint_add_f90__
  13. MPI_AINT_DIFF_F90
  14. mpi_aint_diff_f90
  15. mpi_aint_diff_f90_
  16. mpi_aint_diff_f90__

   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) 2006-2012 Cisco Systems, Inc.  All rights reserved.
  14  * Copyright (c) 2015      Los Alamos National Security, LLC. All rights
  15  *                         reserved.
  16  * $COPYRIGHT$
  17  *
  18  * Additional copyrights may follow
  19  *
  20  * $HEADER$
  21  */
  22 
  23 #include "ompi_config.h"
  24 
  25 #include "ompi/mpi/fortran/mpif-h/bindings.h"
  26 
  27 /* These functions solely exist so that the F90 bindings can call a C
  28    function from Fortran, so we provide all 4 variants.  Specifically,
  29    the F90 bindings for MPI_WTICK and MPI_WTIME need to call the
  30    back-end C functions to effect the functionality -- they cannot
  31    call the back-end F77 functions because there is an overload of
  32    names and types.  So we create these new functions with different
  33    names (MPI_WTICK_F90 and MPI_WTIME_F90 vs. MPI_WTICK and MPI_WTIME)
  34    so that the F90 bindings can call these functions directly.
  35 
  36    Rather than try to be clever with weak symbols, especially since
  37    the function implementations are 1 line long, it just seemed
  38    simpler to provide 4 copies of each [1 line] function. */
  39 
  40 OMPI_DECLSPEC void MPI_WTIME_F90(double *w);
  41 OMPI_DECLSPEC void mpi_wtime_f90(double *w);
  42 OMPI_DECLSPEC void mpi_wtime_f90_(double *w);
  43 OMPI_DECLSPEC void mpi_wtime_f90__(double *w);
  44 
  45 OMPI_DECLSPEC void MPI_WTICK_F90(double *w);
  46 OMPI_DECLSPEC void mpi_wtick_f90(double *w);
  47 OMPI_DECLSPEC void mpi_wtick_f90_(double *w);
  48 OMPI_DECLSPEC void mpi_wtick_f90__(double *w);
  49 
  50 OMPI_DECLSPEC void MPI_AINT_ADD_F90(MPI_Aint *base, MPI_Aint *diff, MPI_Aint *w);
  51 OMPI_DECLSPEC void mpi_aint_add_f90(MPI_Aint *base, MPI_Aint *diff, MPI_Aint *w);
  52 OMPI_DECLSPEC void mpi_aint_add_f90_(MPI_Aint *base, MPI_Aint *diff, MPI_Aint *w);
  53 OMPI_DECLSPEC void mpi_aint_add_f90__(MPI_Aint *base, MPI_Aint *diff, MPI_Aint *w);
  54 
  55 OMPI_DECLSPEC void MPI_AINT_DIFF_F90(MPI_Aint *addr1, MPI_Aint *addr2, MPI_Aint *w);
  56 OMPI_DECLSPEC void mpi_aint_diff_f90(MPI_Aint *addr1, MPI_Aint *addr2, MPI_Aint *w);
  57 OMPI_DECLSPEC void mpi_aint_diff_f90_(MPI_Aint *addr1, MPI_Aint *addr2, MPI_Aint *w);
  58 OMPI_DECLSPEC void mpi_aint_diff_f90__(MPI_Aint *addr1, MPI_Aint *addr2, MPI_Aint *w);
  59 
  60 /**********************************************************************/
  61 
  62 void MPI_WTIME_F90(double *w)
  63 {
  64     *w = MPI_Wtime();
  65 }
  66 
  67 void mpi_wtime_f90(double *w)
  68 {
  69     *w = MPI_Wtime();
  70 }
  71 
  72 void mpi_wtime_f90_(double *w)
  73 {
  74     *w = MPI_Wtime();
  75 }
  76 
  77 void mpi_wtime_f90__(double *w)
  78 {
  79     *w = MPI_Wtime();
  80 }
  81 
  82 /**********************************************************************/
  83 
  84 void MPI_WTICK_F90(double *w)
  85 {
  86     *w = MPI_Wtick();
  87 }
  88 
  89 void mpi_wtick_f90(double *w)
  90 {
  91     *w = MPI_Wtick();
  92 }
  93 
  94 void mpi_wtick_f90_(double *w)
  95 {
  96     *w = MPI_Wtick();
  97 }
  98 
  99 void mpi_wtick_f90__(double *w)
 100 {
 101     *w = MPI_Wtick();
 102 }
 103 
 104 /**********************************************************************/
 105 
 106 void MPI_AINT_ADD_F90(MPI_Aint *base, MPI_Aint *diff, MPI_Aint *w)
 107 {
 108     *w = MPI_Aint_add (*base, *diff);
 109 }
 110 
 111 void mpi_aint_add_f90(MPI_Aint *base, MPI_Aint *diff, MPI_Aint *w)
 112 {
 113     *w = MPI_Aint_add (*base, *diff);
 114 }
 115 
 116 void mpi_aint_add_f90_(MPI_Aint *base, MPI_Aint *diff, MPI_Aint *w)
 117 {
 118     *w = MPI_Aint_add (*base, *diff);
 119 }
 120 
 121 void mpi_aint_add_f90__(MPI_Aint *base, MPI_Aint *diff, MPI_Aint *w)
 122 {
 123     *w = MPI_Aint_add (*base, *diff);
 124 }
 125 
 126 
 127 /**********************************************************************/
 128 
 129 void MPI_AINT_DIFF_F90(MPI_Aint *addr1, MPI_Aint *addr2, MPI_Aint *w)
 130 {
 131     *w = MPI_Aint_diff (*addr1, *addr2);
 132 }
 133 
 134 void mpi_aint_diff_f90(MPI_Aint *addr1, MPI_Aint *addr2, MPI_Aint *w)
 135 {
 136     *w = MPI_Aint_diff (*addr1, *addr2);
 137 }
 138 
 139 void mpi_aint_diff_f90_(MPI_Aint *addr1, MPI_Aint *addr2, MPI_Aint *w)
 140 {
 141     *w = MPI_Aint_diff (*addr1, *addr2);
 142 }
 143 
 144 void mpi_aint_diff_f90__(MPI_Aint *addr1, MPI_Aint *addr2, MPI_Aint *w)
 145 {
 146     *w = MPI_Aint_diff (*addr1, *addr2);
 147 }

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