root/oshmem/shmem/fortran/shmem_int8_fetch_f.c

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

DEFINITIONS

This source file includes following definitions.
  1. SHMEM_GENERATE_WEAK_BINDINGS

   1 /*
   2  * Copyright (c) 2016      Mellanox Technologies, Inc.
   3  *                         All rights reserved.
   4  * $COPYRIGHT$
   5  *
   6  * Additional copyrights may follow
   7  *
   8  * $HEADER$
   9  */
  10 
  11 #include "oshmem_config.h"
  12 #include "oshmem/shmem/fortran/bindings.h"
  13 #include "oshmem/include/shmem.h"
  14 #include "oshmem/shmem/shmem_api_logger.h"
  15 #include "oshmem/runtime/runtime.h"
  16 #include "oshmem/mca/atomic/atomic.h"
  17 #include "ompi/datatype/ompi_datatype.h"
  18 #include "oshmem/op/op.h"
  19 #include "stdio.h"
  20 
  21 #if OSHMEM_PROFILING
  22 #include "oshmem/shmem/fortran/profile/pbindings.h"
  23 SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_INT8_FETCH, shmem_int8_fetch)
  24 #include "oshmem/shmem/fortran/profile/defines.h"
  25 #endif
  26 
  27 SHMEM_GENERATE_FORTRAN_BINDINGS_FUNCTION (ompi_fortran_integer8_t,
  28         SHMEM_INT8_FETCH,
  29         shmem_int8_fetch_,
  30         shmem_int8_fetch__,
  31         shmem_int8_fetch_f,
  32         (FORTRAN_POINTER_T target, MPI_Fint *pe),
  33         (target,pe) )
  34 
  35 ompi_fortran_integer8_t shmem_int8_fetch_f(FORTRAN_POINTER_T target, MPI_Fint *pe)
  36 {
  37     ompi_fortran_integer8_t out_value = 0;
  38     ompi_fortran_integer8_t value = 0;
  39 
  40     MCA_ATOMIC_CALL(fadd(oshmem_ctx_default, FPTR_2_VOID_PTR(target),
  41         (void *)&out_value,
  42         value,
  43         sizeof(out_value),
  44         OMPI_FINT_2_INT(*pe)));
  45 
  46     return out_value;
  47 }
  48 

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