root/ompi/mpi/c/attr_fn.c

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

DEFINITIONS

This source file includes following definitions.
  1. OMPI_C_MPI_TYPE_NULL_DELETE_FN
  2. OMPI_C_MPI_TYPE_NULL_COPY_FN
  3. OMPI_C_MPI_TYPE_DUP_FN
  4. OMPI_C_MPI_WIN_NULL_DELETE_FN
  5. OMPI_C_MPI_WIN_NULL_COPY_FN
  6. OMPI_C_MPI_WIN_DUP_FN
  7. OMPI_C_MPI_COMM_NULL_DELETE_FN
  8. OMPI_C_MPI_COMM_NULL_COPY_FN
  9. OMPI_C_MPI_COMM_DUP_FN
  10. OMPI_C_MPI_NULL_DELETE_FN
  11. OMPI_C_MPI_NULL_COPY_FN
  12. OMPI_C_MPI_DUP_FN

   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) 2018      Research Organization for Information Science
  13  *                         and Technology (RIST).  All rights reserved.
  14  * $COPYRIGHT$
  15  *
  16  * Additional copyrights may follow
  17  *
  18  * $HEADER$
  19  */
  20 
  21 #include "ompi_config.h"
  22 
  23 #include "ompi/mpi/c/bindings.h"
  24 #include "ompi/communicator/communicator.h"
  25 #include "ompi/datatype/ompi_datatype.h"
  26 #include "ompi/win/win.h"
  27 
  28 /*
  29  * Comment to circumvent error-msg of weak-check:
  30  *   We do not need #pragma weak in here, as these functions
  31  *   do not have a function for the profiling interface.
  32  */
  33 
  34 /*
  35  * Note that these are the back-end functions for MPI_DUP_FN (and
  36  * friends).  They have an OMPI_C_* prefix because of weird reasons
  37  * listed in a lengthy comment in mpi.h.
  38  *
  39  * Specifically:
  40  *
  41  *   MPI_NULL_DELETE_FN -> OMPI_C_MPI_NULL_DELETE_FN
  42  *   MPI_NULL_COPY_FN -> OMPI_C_MPI_NULL_COPY_FN
  43  *   MPI_DUP_FN -> OMPI_C_MPI_DUP_FN
  44  *
  45  *   MPI_TYPE_NULL_DELETE_FN -> OMPI_C_MPI_TYPE_NULL_DELETE_FN
  46  *   MPI_TYPE_NULL_COPY_FN -> OMPI_C_MPI_TYPE_NULL_COPY_FN
  47  *   MPI_TYPE_DUP_FN -> OMPI_C_MPI_TYPE_DUP_FN
  48  *
  49  *   MPI_COMM_NULL_DELETE_FN -> OMPI_C_MPI_COMM_NULL_DELETE_FN
  50  *   MPI_COMM_NULL_COPY_FN -> OMPI_C_MPI_COMM_NULL_COPY_FN
  51  *   MPI_COMM_DUP_FN -> OMPI_C_MPI_COMM_DUP_FN
  52  *
  53  *   MPI_WIN_NULL_DELETE_FN -> OMPI_C_MPI_WIN_NULL_DELETE_FN
  54  *   MPI_WIN_NULL_COPY_FN -> OMPI_C_MPI_WIN_NULL_COPY_FN
  55  *   MPI_WIN_DUP_FN -> OMPI_C_MPI_WIN_DUP_FN
  56  */
  57 
  58 int OMPI_C_MPI_TYPE_NULL_DELETE_FN( MPI_Datatype datatype, int type_keyval,
  59                                     void* attribute_val_out,
  60                                     void* extra_state )
  61 {
  62    /* Why not all MPI functions are like this ?? */
  63    return MPI_SUCCESS;
  64 }
  65 
  66 int OMPI_C_MPI_TYPE_NULL_COPY_FN( MPI_Datatype datatype, int type_keyval,
  67                                   void* extra_state,
  68                                   void* attribute_val_in,
  69                                   void* attribute_val_out,
  70                                   int* flag )
  71 {
  72    *flag = 0;
  73    return MPI_SUCCESS;
  74 }
  75 
  76 int OMPI_C_MPI_TYPE_DUP_FN( MPI_Datatype datatype, int type_keyval,
  77                             void* extra_state,
  78                             void* attribute_val_in, void* attribute_val_out,
  79                             int* flag )
  80 {
  81    *flag = 1;
  82    *(void**)attribute_val_out = attribute_val_in;
  83    return MPI_SUCCESS;
  84 }
  85 
  86 int OMPI_C_MPI_WIN_NULL_DELETE_FN( MPI_Win window, int win_keyval,
  87                                    void* attribute_val_out,
  88                                    void* extra_state )
  89 {
  90    return MPI_SUCCESS;
  91 }
  92 
  93 int OMPI_C_MPI_WIN_NULL_COPY_FN( MPI_Win window, int win_keyval,
  94                                  void* extra_state,
  95                                  void* attribute_val_in,
  96                                  void* attribute_val_out, int* flag )
  97 {
  98    *flag= 0;
  99    return MPI_SUCCESS;
 100 }
 101 
 102 int OMPI_C_MPI_WIN_DUP_FN( MPI_Win window, int win_keyval, void* extra_state,
 103                            void* attribute_val_in, void* attribute_val_out,
 104                            int* flag )
 105 {
 106    *flag = 1;
 107    *(void**)attribute_val_out = attribute_val_in;
 108    return MPI_SUCCESS;
 109 }
 110 
 111 int OMPI_C_MPI_COMM_NULL_DELETE_FN( MPI_Comm comm, int comm_keyval,
 112                                     void* attribute_val_out,
 113                                     void* extra_state )
 114 {
 115    return MPI_SUCCESS;
 116 }
 117 
 118 int OMPI_C_MPI_COMM_NULL_COPY_FN( MPI_Comm comm, int comm_keyval,
 119                                   void* extra_state,
 120                                   void* attribute_val_in,
 121                                   void* attribute_val_out, int* flag )
 122 {
 123    *flag= 0;
 124    return MPI_SUCCESS;
 125 }
 126 
 127 int OMPI_C_MPI_COMM_DUP_FN( MPI_Comm comm, int comm_keyval, void* extra_state,
 128                      void* attribute_val_in, void* attribute_val_out,
 129                      int* flag )
 130 {
 131    *flag = 1;
 132    *(void**)attribute_val_out = attribute_val_in;
 133    return MPI_SUCCESS;
 134 }
 135 
 136 int OMPI_C_MPI_NULL_DELETE_FN( MPI_Comm comm, int comm_keyval,
 137                                void* attribute_val_out,
 138                                void* extra_state )
 139 {
 140    return MPI_SUCCESS;
 141 }
 142 
 143 int OMPI_C_MPI_NULL_COPY_FN( MPI_Comm comm, int comm_keyval, void* extra_state,
 144                              void* attribute_val_in, void* attribute_val_out,
 145                              int* flag )
 146 {
 147    *flag= 0;
 148    return MPI_SUCCESS;
 149 }
 150 
 151 int OMPI_C_MPI_DUP_FN( MPI_Comm comm, int comm_keyval, void* extra_state,
 152                        void* attribute_val_in, void* attribute_val_out,
 153                        int* flag )
 154 {
 155    *flag = 1;
 156    *(void**)attribute_val_out = attribute_val_in;
 157    return MPI_SUCCESS;
 158 }

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