This source file includes following definitions.
- ompi_type_create_keyval_f
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 #include "ompi_config.h"
  23 
  24 #include "ompi/mpi/fortran/mpif-h/bindings.h"
  25 #include "ompi/communicator/communicator.h"
  26 
  27 #if OMPI_BUILD_MPI_PROFILING
  28 #if OPAL_HAVE_WEAK_SYMBOLS
  29 #pragma weak PMPI_TYPE_CREATE_KEYVAL = ompi_type_create_keyval_f
  30 #pragma weak pmpi_type_create_keyval = ompi_type_create_keyval_f
  31 #pragma weak pmpi_type_create_keyval_ = ompi_type_create_keyval_f
  32 #pragma weak pmpi_type_create_keyval__ = ompi_type_create_keyval_f
  33 
  34 #pragma weak PMPI_Type_create_keyval_f = ompi_type_create_keyval_f
  35 #pragma weak PMPI_Type_create_keyval_f08 = ompi_type_create_keyval_f
  36 #else
  37 OMPI_GENERATE_F77_BINDINGS (PMPI_TYPE_CREATE_KEYVAL,
  38                            pmpi_type_create_keyval,
  39                            pmpi_type_create_keyval_,
  40                            pmpi_type_create_keyval__,
  41                            pompi_type_create_keyval_f,
  42                            (ompi_aint_copy_attr_function* type_copy_attr_fn, ompi_aint_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Aint *extra_state, MPI_Fint *ierr),
  43                            (type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state, ierr) )
  44 #endif
  45 #endif
  46 
  47 #if OPAL_HAVE_WEAK_SYMBOLS
  48 #pragma weak MPI_TYPE_CREATE_KEYVAL = ompi_type_create_keyval_f
  49 #pragma weak mpi_type_create_keyval = ompi_type_create_keyval_f
  50 #pragma weak mpi_type_create_keyval_ = ompi_type_create_keyval_f
  51 #pragma weak mpi_type_create_keyval__ = ompi_type_create_keyval_f
  52 
  53 #pragma weak MPI_Type_create_keyval_f = ompi_type_create_keyval_f
  54 #pragma weak MPI_Type_create_keyval_f08 = ompi_type_create_keyval_f
  55 #else
  56 #if ! OMPI_BUILD_MPI_PROFILING
  57 OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_CREATE_KEYVAL,
  58                            mpi_type_create_keyval,
  59                            mpi_type_create_keyval_,
  60                            mpi_type_create_keyval__,
  61                            ompi_type_create_keyval_f,
  62                            (ompi_aint_copy_attr_function* type_copy_attr_fn, ompi_aint_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Aint *extra_state, MPI_Fint *ierr),
  63                            (type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state, ierr) )
  64 #else
  65 #define ompi_type_create_keyval_f pompi_type_create_keyval_f
  66 #endif
  67 #endif
  68 
  69 static char FUNC_NAME[] = "MPI_Type_create_keyval_f";
  70 
  71 void ompi_type_create_keyval_f(ompi_aint_copy_attr_function* type_copy_attr_fn,
  72                                ompi_aint_delete_attr_function* type_delete_attr_fn,
  73                                MPI_Fint *type_keyval, MPI_Aint *extra_state, MPI_Fint *ierr)
  74 {
  75     int ret, c_ierr;
  76     OMPI_SINGLE_NAME_DECL(type_keyval);
  77     ompi_attribute_fn_ptr_union_t copy_fn;
  78     ompi_attribute_fn_ptr_union_t del_fn;
  79 
  80     copy_fn.attr_aint_copy_fn = type_copy_attr_fn;
  81     del_fn.attr_aint_delete_fn = type_delete_attr_fn;
  82 
  83     
  84 
  85 
  86 
  87 
  88     ret = ompi_attr_create_keyval_aint(TYPE_ATTR, copy_fn, del_fn,
  89                                        OMPI_SINGLE_NAME_CONVERT(type_keyval), *extra_state, OMPI_KEYVAL_F77,
  90                                        NULL);
  91 
  92     if (MPI_SUCCESS != ret) {
  93         c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
  94                                         MPI_ERR_OTHER,
  95                                         FUNC_NAME);
  96         if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
  97     } else {
  98         if (NULL != ierr) *ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
  99         OMPI_SINGLE_INT_2_FINT(type_keyval);
 100     }
 101 }