root/oshmem/shmem/fortran/shmem_real_iput_f.c

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

DEFINITIONS

This source file includes following definitions.
  1. SHMEM_GENERATE_WEAK_BINDINGS

   1  /*
   2  * Copyright (c) 2013      Mellanox Technologies, Inc.
   3  *                         All rights reserved.
   4  * Copyright (c) 2013 Cisco Systems, Inc.  All rights reserved.
   5  * $COPYRIGHT$
   6  *
   7  * Additional copyrights may follow
   8  *
   9  * $HEADER$
  10  */
  11 
  12 #include "oshmem_config.h"
  13 #include "oshmem/shmem/fortran/bindings.h"
  14 #include "oshmem/include/shmem.h"
  15 #include "oshmem/shmem/shmem_api_logger.h"
  16 #include "oshmem/runtime/runtime.h"
  17 #include "oshmem/mca/spml/spml.h"
  18 #include "ompi/datatype/ompi_datatype.h"
  19 #include "stdio.h"
  20 
  21 #if OSHMEM_PROFILING
  22 #include "oshmem/shmem/fortran/profile/pbindings.h"
  23 SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_REAL_IPUT, shmem_real_iput)
  24 #include "oshmem/shmem/fortran/profile/defines.h"
  25 #endif
  26 
  27 SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void,
  28         SHMEM_REAL_IPUT,
  29         shmem_real_iput_,
  30         shmem_real_iput__,
  31         shmem_real_iput_f,
  32         (FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe),
  33         (target,source,tst,sst,len,pe) )
  34 
  35 void shmem_real_iput_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T source, MPI_Fint *tst, MPI_Fint *sst, MPI_Fint *len, MPI_Fint *pe)
  36 {
  37     int i;
  38     int length = OMPI_FINT_2_INT(*len);
  39     int tst_c = OMPI_FINT_2_INT(*tst);
  40     int sst_c = OMPI_FINT_2_INT(*sst);
  41 
  42     size_t real_type_size = 0;
  43     ompi_datatype_type_size(&ompi_mpi_real.dt, &real_type_size);
  44 
  45     for (i=0; i<length; i++)
  46     {
  47         MCA_SPML_CALL(put(oshmem_ctx_default, (uint8_t*)FPTR_2_VOID_PTR(target) + i * tst_c * real_type_size,
  48             real_type_size,
  49             (uint8_t*)FPTR_2_VOID_PTR(source) + i * sst_c * real_type_size,
  50             OMPI_FINT_2_INT(*pe)));
  51 
  52     }
  53 }
  54 

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