This source file includes following definitions.
- SHMEM_GENERATE_WEAK_BINDINGS
1
2
3
4
5
6
7
8
9
10 #include "oshmem_config.h"
11 #include "oshmem/shmem/fortran/bindings.h"
12 #include "oshmem/include/shmem.h"
13 #include "oshmem/shmem/shmem_api_logger.h"
14 #include "oshmem/runtime/runtime.h"
15 #include "oshmem/mca/atomic/atomic.h"
16 #include "ompi/datatype/ompi_datatype.h"
17 #include "oshmem/op/op.h"
18 #include "stdio.h"
19
20 #if OSHMEM_PROFILING
21 #include "oshmem/shmem/fortran/profile/pbindings.h"
22 SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_REAL4_FETCH, shmem_real4_fetch)
23 #include "oshmem/shmem/fortran/profile/defines.h"
24 #endif
25
26 SHMEM_GENERATE_FORTRAN_BINDINGS_FUNCTION (ompi_fortran_real4_t,
27 SHMEM_REAL4_FETCH,
28 shmem_real4_fetch_,
29 shmem_real4_fetch__,
30 shmem_real4_fetch_f,
31 (FORTRAN_POINTER_T target, MPI_Fint *pe),
32 (target,pe) )
33
34 ompi_fortran_real4_t shmem_real4_fetch_f(FORTRAN_POINTER_T target, MPI_Fint *pe)
35 {
36 ompi_fortran_real4_t out_value = 0;
37 ompi_fortran_real4_t value = 0;
38
39 MCA_ATOMIC_CALL(fadd(oshmem_ctx_default, FPTR_2_VOID_PTR(target),
40 (void *)&out_value,
41 value,
42 sizeof(out_value),
43 OMPI_FINT_2_INT(*pe)));
44
45 return out_value;
46 }
47