This source file includes following definitions.
- SHMEM_GENERATE_WEAK_BINDINGS
1
2
3
4
5
6
7
8
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_INT4_FETCH, shmem_int4_fetch)
24 #include "oshmem/shmem/fortran/profile/defines.h"
25 #endif
26
27 SHMEM_GENERATE_FORTRAN_BINDINGS_FUNCTION (ompi_fortran_integer4_t,
28 SHMEM_INT4_FETCH,
29 shmem_int4_fetch_,
30 shmem_int4_fetch__,
31 shmem_int4_fetch_f,
32 (FORTRAN_POINTER_T target, MPI_Fint *pe),
33 (target,pe) )
34
35 ompi_fortran_integer4_t shmem_int4_fetch_f(FORTRAN_POINTER_T target, MPI_Fint *pe)
36 {
37 ompi_fortran_integer4_t out_value = 0;
38 int 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