root/oshmem/shmem/fortran/shmem_int4_finc_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/atomic/atomic.h"
  18 #include "ompi/datatype/ompi_datatype.h"
  19 #include "oshmem/op/op.h"
  20 #include "stdio.h"
  21 
  22 #if OSHMEM_PROFILING
  23 #include "oshmem/shmem/fortran/profile/pbindings.h"
  24 SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_INT4_FINC, shmem_int4_finc)
  25 #include "oshmem/shmem/fortran/profile/defines.h"
  26 #endif
  27 
  28 SHMEM_GENERATE_FORTRAN_BINDINGS_FUNCTION (ompi_fortran_integer4_t,
  29         SHMEM_INT4_FINC,
  30         shmem_int4_finc_,
  31         shmem_int4_finc__,
  32         shmem_int4_finc_f,
  33         (FORTRAN_POINTER_T target, MPI_Fint *pe),
  34         (target,pe) )
  35 
  36 ompi_fortran_integer4_t shmem_int4_finc_f(FORTRAN_POINTER_T target, MPI_Fint *pe)
  37 {
  38     ompi_fortran_integer4_t out_value = 0;
  39     ompi_fortran_integer4_t value = 1;
  40 
  41     MCA_ATOMIC_CALL(fadd(oshmem_ctx_default, FPTR_2_VOID_PTR(target),
  42         (void *)&out_value,
  43         value,
  44         sizeof(out_value),
  45         OMPI_FINT_2_INT(*pe)));
  46 
  47     return out_value;
  48 }
  49 

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