OSHMEM: v1.3: adds shmem_fetch and shmem_set AMOs
The commit adds atomic set and fetch functions as described in oshmem 1.3 spec.
Этот коммит содержится в:
родитель
066370202d
Коммит
3a034352fe
@ -210,6 +210,13 @@ OSHMEM_DECLSPEC int pshmem_int_swap(int *target, int value, int pe);
|
||||
OSHMEM_DECLSPEC long pshmem_long_swap(long *target, long value, int pe);
|
||||
OSHMEM_DECLSPEC long long pshmem_longlong_swap(long long*target, long long value, int pe);
|
||||
|
||||
/* Atomic set */
|
||||
OSHMEM_DECLSPEC void pshmem_int_set(int *target, int value, int pe);
|
||||
OSHMEM_DECLSPEC void pshmem_long_set(long *target, long value, int pe);
|
||||
OSHMEM_DECLSPEC void pshmem_longlong_set(long long*target, long long value, int pe);
|
||||
OSHMEM_DECLSPEC void pshmem_float_set(float *target, float value, int pe);
|
||||
OSHMEM_DECLSPEC void pshmem_double_set(double *target, double value, int pe);
|
||||
|
||||
/* Atomic conditional swap */
|
||||
OSHMEM_DECLSPEC int pshmem_int_cswap(int *target, int cond, int value, int pe);
|
||||
OSHMEM_DECLSPEC long pshmem_long_cswap(long *target, long cond, long value, int pe);
|
||||
@ -220,6 +227,14 @@ OSHMEM_DECLSPEC int pshmem_int_fadd(int *target, int value, int pe);
|
||||
OSHMEM_DECLSPEC long pshmem_long_fadd(long *target, long value, int pe);
|
||||
OSHMEM_DECLSPEC long long pshmem_longlong_fadd(long long *target, long long value, int pe);
|
||||
|
||||
/* Atomic Fetch */
|
||||
OSHMEM_DECLSPEC int pshmem_int_fetch(const int *target, int pe);
|
||||
OSHMEM_DECLSPEC long pshmem_long_fetch(const long *target, int pe);
|
||||
OSHMEM_DECLSPEC long long pshmem_longlong_fetch(const long long *target, int pe);
|
||||
OSHMEM_DECLSPEC float pshmem_float_fetch(const float *target, int pe);
|
||||
OSHMEM_DECLSPEC double pshmem_double_fetch(const double *target, int pe);
|
||||
|
||||
|
||||
/* Atomic Fetch&Inc */
|
||||
OSHMEM_DECLSPEC int pshmem_int_finc(int *target, int pe);
|
||||
OSHMEM_DECLSPEC long pshmem_long_finc(long *target, int pe);
|
||||
|
@ -81,6 +81,10 @@ OSHMEM_DECLSPEC void pshmemx_iget16(void* target, const void* source, ptrdiff_t
|
||||
OSHMEM_DECLSPEC int32_t pshmemx_int32_swap(int32_t *target, int32_t value, int pe);
|
||||
OSHMEM_DECLSPEC int64_t pshmemx_int64_swap(int64_t *target, int64_t value, int pe);
|
||||
|
||||
/*Atomic set */
|
||||
OSHMEM_DECLSPEC void pshmemx_int32_set(int32_t *target, int32_t value, int pe);
|
||||
OSHMEM_DECLSPEC void pshmemx_int64_set(int64_t *target, int64_t value, int pe);
|
||||
|
||||
/* Atomic conditional swap */
|
||||
OSHMEM_DECLSPEC int32_t pshmemx_int32_cswap(int32_t *target, int32_t cond, int32_t value, int pe);
|
||||
OSHMEM_DECLSPEC int64_t pshmemx_int64_cswap(int64_t *target, int64_t cond, int64_t value, int pe);
|
||||
@ -89,6 +93,10 @@ OSHMEM_DECLSPEC int64_t pshmemx_int64_cswap(int64_t *target, int64_t cond, int64
|
||||
OSHMEM_DECLSPEC int32_t pshmemx_int32_fadd(int32_t *target, int32_t value, int pe);
|
||||
OSHMEM_DECLSPEC int64_t pshmemx_int64_fadd(int64_t *target, int64_t value, int pe);
|
||||
|
||||
/* Atomic Fetch */
|
||||
OSHMEM_DECLSPEC int32_t pshmemx_int32_fetch(const int32_t *target, int pe);
|
||||
OSHMEM_DECLSPEC int64_t pshmemx_int64_fetch(const int64_t *target, int pe);
|
||||
|
||||
/* Atomic Fetch&Inc */
|
||||
OSHMEM_DECLSPEC int32_t pshmemx_int32_finc(int32_t *target, int pe);
|
||||
OSHMEM_DECLSPEC int64_t pshmemx_int64_finc(int64_t *target, int pe);
|
||||
@ -160,15 +168,25 @@ OSHMEM_DECLSPEC void pshmemx_int64_prod_to_all(int64_t *target, const int64_t *s
|
||||
|
||||
#define pshmem_int32_swap pshmemx_int32_swap
|
||||
#define pshmem_int64_swap pshmemx_int64_swap
|
||||
|
||||
#define pshmem_int32_set pshmemx_int32_set
|
||||
#define pshmem_int64_set pshmemx_int64_set
|
||||
|
||||
#define pshmem_int32_cswap pshmemx_int32_cswap
|
||||
#define pshmem_int64_cswap pshmemx_int64_cswap
|
||||
|
||||
#define pshmem_int32_fadd pshmemx_int32_fadd
|
||||
#define pshmem_int64_fadd pshmemx_int64_fadd
|
||||
|
||||
#define pshmem_int32_fetch pshmemx_int32_fetch
|
||||
#define pshmem_int64_fetch pshmemx_int64_fetch
|
||||
|
||||
#define pshmem_int32_finc pshmemx_int32_finc
|
||||
#define pshmem_int64_finc pshmemx_int64_finc
|
||||
|
||||
#define pshmem_int32_add pshmemx_int32_add
|
||||
#define pshmem_int64_add pshmemx_int64_add
|
||||
|
||||
#define pshmem_int32_inc pshmemx_int32_inc
|
||||
#define pshmem_int64_inc pshmemx_int64_inc
|
||||
|
||||
|
@ -275,6 +275,13 @@ OSHMEM_DECLSPEC int shmem_int_swap(int *target, int value, int pe);
|
||||
OSHMEM_DECLSPEC long shmem_long_swap(long *target, long value, int pe);
|
||||
OSHMEM_DECLSPEC long long shmem_longlong_swap(long long*target, long long value, int pe);
|
||||
|
||||
/* Atomic set */
|
||||
OSHMEM_DECLSPEC void shmem_int_set(int *target, int value, int pe);
|
||||
OSHMEM_DECLSPEC void shmem_long_set(long *target, long value, int pe);
|
||||
OSHMEM_DECLSPEC void shmem_longlong_set(long long*target, long long value, int pe);
|
||||
OSHMEM_DECLSPEC void shmem_float_set(float *target, float value, int pe);
|
||||
OSHMEM_DECLSPEC void shmem_double_set(double *target, double value, int pe);
|
||||
|
||||
/* Atomic conditional swap */
|
||||
OSHMEM_DECLSPEC int shmem_int_cswap(int *target, int cond, int value, int pe);
|
||||
OSHMEM_DECLSPEC long shmem_long_cswap(long *target, long cond, long value, int pe);
|
||||
@ -285,6 +292,13 @@ OSHMEM_DECLSPEC int shmem_int_fadd(int *target, int value, int pe);
|
||||
OSHMEM_DECLSPEC long shmem_long_fadd(long *target, long value, int pe);
|
||||
OSHMEM_DECLSPEC long long shmem_longlong_fadd(long long *target, long long value, int pe);
|
||||
|
||||
/* Atomic Fetch */
|
||||
OSHMEM_DECLSPEC int shmem_int_fetch(const int *target, int pe);
|
||||
OSHMEM_DECLSPEC long shmem_long_fetch(const long *target, int pe);
|
||||
OSHMEM_DECLSPEC long long shmem_longlong_fetch(const long long *target, int pe);
|
||||
OSHMEM_DECLSPEC float shmem_float_fetch(const float *target, int pe);
|
||||
OSHMEM_DECLSPEC double shmem_double_fetch(const double *target, int pe);
|
||||
|
||||
/* Atomic Fetch&Inc */
|
||||
OSHMEM_DECLSPEC int shmem_int_finc(int *target, int pe);
|
||||
OSHMEM_DECLSPEC long shmem_long_finc(long *target, int pe);
|
||||
|
@ -66,6 +66,10 @@ OSHMEM_DECLSPEC void shmemx_iget16(void* target, const void* source, ptrdiff_t t
|
||||
OSHMEM_DECLSPEC int32_t shmemx_int32_swap(int32_t *target, int32_t value, int pe);
|
||||
OSHMEM_DECLSPEC int64_t shmemx_int64_swap(int64_t *target, int64_t value, int pe);
|
||||
|
||||
/* Atomic set */
|
||||
OSHMEM_DECLSPEC void shmemx_int32_set(int32_t *target, int32_t value, int pe);
|
||||
OSHMEM_DECLSPEC void shmemx_int64_set(int64_t *target, int64_t value, int pe);
|
||||
|
||||
/* Atomic conditional swap */
|
||||
OSHMEM_DECLSPEC int32_t shmemx_int32_cswap(int32_t *target, int32_t cond, int32_t value, int pe);
|
||||
OSHMEM_DECLSPEC int64_t shmemx_int64_cswap(int64_t *target, int64_t cond, int64_t value, int pe);
|
||||
@ -74,6 +78,10 @@ OSHMEM_DECLSPEC int64_t shmemx_int64_cswap(int64_t *target, int64_t cond, int64_
|
||||
OSHMEM_DECLSPEC int32_t shmemx_int32_fadd(int32_t *target, int32_t value, int pe);
|
||||
OSHMEM_DECLSPEC int64_t shmemx_int64_fadd(int64_t *target, int64_t value, int pe);
|
||||
|
||||
/* Atomic Fetch */
|
||||
OSHMEM_DECLSPEC int32_t shmemx_int32_fetch(const int32_t *target, int pe);
|
||||
OSHMEM_DECLSPEC int64_t shmemx_int64_fetch(const int64_t *target, int pe);
|
||||
|
||||
/* Atomic Fetch&Inc */
|
||||
OSHMEM_DECLSPEC int32_t shmemx_int32_finc(int32_t *target, int pe);
|
||||
OSHMEM_DECLSPEC int64_t shmemx_int64_finc(int64_t *target, int pe);
|
||||
@ -145,13 +153,22 @@ OSHMEM_DECLSPEC void shmemx_int64_prod_to_all(int64_t *target, const int64_t *so
|
||||
|
||||
#define shmem_int32_swap shmemx_int32_swap
|
||||
#define shmem_int64_swap shmemx_int64_swap
|
||||
|
||||
#define shmem_int32_set shmemx_int32_set
|
||||
#define shmem_int64_set shmemx_int64_set
|
||||
|
||||
#define shmem_int32_cswap shmemx_int32_cswap
|
||||
#define shmem_int64_cswap shmemx_int64_cswap
|
||||
|
||||
#define shmem_int32_fadd shmemx_int32_fadd
|
||||
#define shmem_int64_fadd shmemx_int64_fadd
|
||||
|
||||
#define shmem_int32_fetch shmemx_int32_fetch
|
||||
#define shmem_int64_fetch shmemx_int64_fetch
|
||||
|
||||
#define shmem_int32_finc shmemx_int32_finc
|
||||
#define shmem_int64_finc shmemx_int64_finc
|
||||
|
||||
#define shmem_int32_add shmemx_int32_add
|
||||
#define shmem_int64_add shmemx_int64_add
|
||||
#define shmem_int32_inc shmemx_int32_inc
|
||||
|
@ -51,8 +51,10 @@ OSHMEM_API_SOURCES = \
|
||||
shmem_clear_cache_line_inv.c \
|
||||
shmem_reduce.c \
|
||||
shmem_swap.c \
|
||||
shmem_set.c \
|
||||
shmem_cswap.c \
|
||||
shmem_fadd.c \
|
||||
shmem_fetch.c \
|
||||
shmem_finc.c \
|
||||
shmem_add.c \
|
||||
shmem_inc.c \
|
||||
|
@ -63,8 +63,10 @@ OSHMEM_API_SOURCES = \
|
||||
pshmem_clear_cache_line_inv.c \
|
||||
pshmem_reduce.c \
|
||||
pshmem_swap.c \
|
||||
pshmem_set.c \
|
||||
pshmem_cswap.c \
|
||||
pshmem_fadd.c \
|
||||
pshmem_fetch.c \
|
||||
pshmem_finc.c \
|
||||
pshmem_add.c \
|
||||
pshmem_inc.c \
|
||||
|
@ -203,6 +203,14 @@
|
||||
#define shmemx_int32_swap pshmemx_int32_swap
|
||||
#define shmemx_int64_swap pshmemx_int64_swap
|
||||
|
||||
/* Atomic set */
|
||||
#define shmem_double_set pshmem_double_set
|
||||
#define shmem_float_set pshmem_float_set
|
||||
#define shmem_int_set pshmem_int_set
|
||||
#define shmem_long_set pshmem_long_set
|
||||
#define shmem_longlong_set pshmem_longlong_set
|
||||
#define shmemx_int32_set pshmemx_int32_set
|
||||
#define shmemx_int64_set pshmemx_int64_set
|
||||
|
||||
/* Atomic conditional swap */
|
||||
#define shmem_int_cswap pshmem_int_cswap
|
||||
@ -219,6 +227,15 @@
|
||||
#define shmemx_int32_fadd pshmemx_int32_fadd
|
||||
#define shmemx_int64_fadd pshmemx_int64_fadd
|
||||
|
||||
/* Atomic Fetch */
|
||||
#define shmem_double_fetch pshmem_double_fetch
|
||||
#define shmem_float_fetch pshmem_float_fetch
|
||||
#define shmem_int_fetch pshmem_int_fetch
|
||||
#define shmem_long_fetch pshmem_long_fetch
|
||||
#define shmem_longlong_fetch pshmem_longlong_fetch
|
||||
#define shmemx_int32_fetch pshmemx_int32_fetch
|
||||
#define shmemx_int64_fetch pshmemx_int64_fetch
|
||||
|
||||
/* Atomic Fetch&Inc */
|
||||
#define shmem_int_finc pshmem_int_finc
|
||||
#define shmem_long_finc pshmem_long_finc
|
||||
|
71
oshmem/shmem/c/shmem_fetch.c
Обычный файл
71
oshmem/shmem/c/shmem_fetch.c
Обычный файл
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
#include "oshmem_config.h"
|
||||
|
||||
#include "oshmem/constants.h"
|
||||
#include "oshmem/include/shmem.h"
|
||||
|
||||
#include "oshmem/runtime/runtime.h"
|
||||
|
||||
#include "oshmem/op/op.h"
|
||||
#include "oshmem/mca/atomic/atomic.h"
|
||||
|
||||
/*
|
||||
* These routines perform an atomic fetch operation.
|
||||
* The fetch routines retrieve the value at address target on PE pe.
|
||||
* The operation must be completed without the possibility of another process
|
||||
* updating target during the fetch.
|
||||
*/
|
||||
#define SHMEM_TYPE_FETCH(type_name, type, prefix) \
|
||||
type prefix##type_name##_fetch(const type *target, int pe) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
size_t size = 0; \
|
||||
type out_value; \
|
||||
type value = 0; \
|
||||
oshmem_op_t* op = oshmem_op_sum##type_name; \
|
||||
\
|
||||
RUNTIME_CHECK_INIT(); \
|
||||
RUNTIME_CHECK_PE(pe); \
|
||||
RUNTIME_CHECK_ADDR(target); \
|
||||
\
|
||||
size = sizeof(out_value); \
|
||||
rc = MCA_ATOMIC_CALL(fadd( \
|
||||
(void*)target, \
|
||||
(void*)&out_value, \
|
||||
(const void*)&value, \
|
||||
size, \
|
||||
pe, \
|
||||
op)); \
|
||||
RUNTIME_CHECK_RC(rc); \
|
||||
\
|
||||
return out_value; \
|
||||
}
|
||||
|
||||
#if OSHMEM_PROFILING
|
||||
#include "oshmem/include/pshmem.h"
|
||||
#pragma weak shmem_int_fetch = pshmem_int_fetch
|
||||
#pragma weak shmem_long_fetch = pshmem_long_fetch
|
||||
#pragma weak shmem_longlong_fetch = pshmem_longlong_fetch
|
||||
#pragma weak shmem_double_fetch = pshmem_double_fetch
|
||||
#pragma weak shmem_float_fetch = pshmem_float_fetch
|
||||
#pragma weak shmemx_int32_fetch = pshmemx_int32_fetch
|
||||
#pragma weak shmemx_int64_fetch = pshmemx_int64_fetch
|
||||
#include "oshmem/shmem/c/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_TYPE_FETCH(_int, int, shmem)
|
||||
SHMEM_TYPE_FETCH(_long, long, shmem)
|
||||
SHMEM_TYPE_FETCH(_longlong, long long, shmem)
|
||||
SHMEM_TYPE_FETCH(_double, double, shmem)
|
||||
SHMEM_TYPE_FETCH(_float, float, shmem)
|
||||
SHMEM_TYPE_FETCH(_int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_FETCH(_int64, int64_t, shmemx)
|
||||
|
66
oshmem/shmem/c/shmem_set.c
Обычный файл
66
oshmem/shmem/c/shmem_set.c
Обычный файл
@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
#include "oshmem_config.h"
|
||||
|
||||
#include "oshmem/constants.h"
|
||||
#include "oshmem/include/shmem.h"
|
||||
|
||||
#include "oshmem/runtime/runtime.h"
|
||||
|
||||
#include "oshmem/mca/atomic/atomic.h"
|
||||
|
||||
/*
|
||||
* shmem_set performs an atomic set operation.
|
||||
* The atomic set routines write value to address target on PE pe.
|
||||
* The operation must be completed without the possibility of another
|
||||
* process updating the target during the set.
|
||||
*/
|
||||
#define SHMEM_TYPE_SET(type_name, type, prefix) \
|
||||
void prefix##type_name##_set(type *target, type value, int pe) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
size_t size = 0; \
|
||||
type out_value; \
|
||||
\
|
||||
RUNTIME_CHECK_INIT(); \
|
||||
RUNTIME_CHECK_PE(pe); \
|
||||
RUNTIME_CHECK_ADDR(target); \
|
||||
\
|
||||
size = sizeof(out_value); \
|
||||
rc = MCA_ATOMIC_CALL(cswap( \
|
||||
(void*)target, \
|
||||
(void*)&out_value, \
|
||||
NULL, \
|
||||
(const void*)&value, \
|
||||
size, \
|
||||
pe)); \
|
||||
RUNTIME_CHECK_RC(rc); \
|
||||
}
|
||||
|
||||
#if OSHMEM_PROFILING
|
||||
#include "oshmem/include/pshmem.h"
|
||||
#pragma weak shmem_int_set = pshmem_int_set
|
||||
#pragma weak shmem_long_set = pshmem_long_set
|
||||
#pragma weak shmem_longlong_set = pshmem_longlong_set
|
||||
#pragma weak shmem_float_set = pshmem_float_set
|
||||
#pragma weak shmem_double_set = pshmem_double_set
|
||||
#pragma weak shmemx_int32_set = pshmemx_int32_set
|
||||
#pragma weak shmemx_int64_set = pshmemx_int64_set
|
||||
#include "oshmem/shmem/c/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_TYPE_SET(_int, int, shmem)
|
||||
SHMEM_TYPE_SET(_long, long, shmem)
|
||||
SHMEM_TYPE_SET(_longlong, long long, shmem)
|
||||
SHMEM_TYPE_SET(_float, float, shmem)
|
||||
SHMEM_TYPE_SET(_double, double, shmem)
|
||||
SHMEM_TYPE_SET(_int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_SET(_int64, int64_t, shmemx)
|
||||
|
@ -98,10 +98,18 @@ liboshmem_fortran_la_SOURCES += \
|
||||
shmem_int8_swap_f.c \
|
||||
shmem_real4_swap_f.c \
|
||||
shmem_real8_swap_f.c \
|
||||
shmem_int4_set_f.c \
|
||||
shmem_int8_set_f.c \
|
||||
shmem_real4_set_f.c \
|
||||
shmem_real8_set_f.c \
|
||||
shmem_int4_cswap_f.c \
|
||||
shmem_int8_cswap_f.c \
|
||||
shmem_int4_fadd_f.c \
|
||||
shmem_int8_fadd_f.c \
|
||||
shmem_int4_fetch_f.c \
|
||||
shmem_int8_fetch_f.c \
|
||||
shmem_real4_fetch_f.c \
|
||||
shmem_real8_fetch_f.c \
|
||||
shmem_int4_finc_f.c \
|
||||
shmem_int8_finc_f.c \
|
||||
shmem_int4_add_f.c \
|
||||
|
@ -90,10 +90,18 @@ nodist_liboshmem_fortran_pshmem_la_SOURCES = \
|
||||
pshmem_int8_swap_f.c \
|
||||
pshmem_real4_swap_f.c \
|
||||
pshmem_real8_swap_f.c \
|
||||
pshmem_int4_set_f.c \
|
||||
pshmem_int8_set_f.c \
|
||||
pshmem_real4_set_f.c \
|
||||
pshmem_real8_set_f.c \
|
||||
pshmem_int4_cswap_f.c \
|
||||
pshmem_int8_cswap_f.c \
|
||||
pshmem_int4_fadd_f.c \
|
||||
pshmem_int8_fadd_f.c \
|
||||
pshmem_int4_fetch_f.c \
|
||||
pshmem_int8_fetch_f.c \
|
||||
pshmem_real4_fetch_f.c \
|
||||
pshmem_real8_fetch_f.c \
|
||||
pshmem_int4_finc_f.c \
|
||||
pshmem_int8_finc_f.c \
|
||||
pshmem_int4_add_f.c \
|
||||
|
@ -366,6 +366,10 @@
|
||||
#define shmem_int4_fadd_ pshmem_int4_fadd_
|
||||
#define shmem_int4_fadd__ pshmem_int4_fadd__
|
||||
|
||||
#define SHMEM_INT4_FETCH PSHMEM_INT4_FETCH
|
||||
#define shmem_int4_fetch_ pshmem_int4_fetch_
|
||||
#define shmem_int4_fetch__ pshmem_int4_fetch__
|
||||
|
||||
#define SHMEM_INT4_FINC PSHMEM_INT4_FINC
|
||||
#define shmem_int4_finc_ pshmem_int4_finc_
|
||||
#define shmem_int4_finc__ pshmem_int4_finc__
|
||||
@ -378,6 +382,10 @@
|
||||
#define shmem_int4_swap_ pshmem_int4_swap_
|
||||
#define shmem_int4_swap__ pshmem_int4_swap__
|
||||
|
||||
#define SHMEM_INT4_SET PSHMEM_INT4_SET
|
||||
#define shmem_int4_set_ pshmem_int4_set_
|
||||
#define shmem_int4_set__ pshmem_int4_set__
|
||||
|
||||
#define SHMEM_INT4_WAIT PSHMEM_INT4_WAIT
|
||||
#define shmem_int4_wait_ pshmem_int4_wait_
|
||||
#define shmem_int4_wait__ pshmem_int4_wait__
|
||||
@ -398,6 +406,10 @@
|
||||
#define shmem_int8_fadd_ pshmem_int8_fadd_
|
||||
#define shmem_int8_fadd__ pshmem_int8_fadd__
|
||||
|
||||
#define SHMEM_INT8_FETCH PSHMEM_INT8_FETCH
|
||||
#define shmem_int8_fetch_ pshmem_int8_fetch_
|
||||
#define shmem_int8_fetch__ pshmem_int8_fetch__
|
||||
|
||||
#define SHMEM_INT8_FINC PSHMEM_INT8_FINC
|
||||
#define shmem_int8_finc_ pshmem_int8_finc_
|
||||
#define shmem_int8_finc__ pshmem_int8_finc__
|
||||
@ -410,6 +422,10 @@
|
||||
#define shmem_int8_swap_ pshmem_int8_swap_
|
||||
#define shmem_int8_swap__ pshmem_int8_swap__
|
||||
|
||||
#define SHMEM_INT8_SET PSHMEM_INT8_SET
|
||||
#define shmem_int8_set_ pshmem_int8_set_
|
||||
#define shmem_int8_set__ pshmem_int8_set__
|
||||
|
||||
#define SHMEM_INT8_WAIT PSHMEM_INT8_WAIT
|
||||
#define shmem_int8_wait_ pshmem_int8_wait_
|
||||
#define shmem_int8_wait__ pshmem_int8_wait__
|
||||
@ -622,6 +638,22 @@
|
||||
#define shmem_real8_swap_ pshmem_real8_swap_
|
||||
#define shmem_real8_swap__ pshmem_real8_swap__
|
||||
|
||||
#define SHMEM_REAL4_SET PSHMEM_REAL4_SET
|
||||
#define shmem_real4_set_ pshmem_real4_set_
|
||||
#define shmem_real4_set__ pshmem_real4_set__
|
||||
|
||||
#define SHMEM_REAL8_SET PSHMEM_REAL8_SET
|
||||
#define shmem_real8_set_ pshmem_real8_set_
|
||||
#define shmem_real8_set__ pshmem_real8_set__
|
||||
|
||||
#define SHMEM_REAL4_FETCH PSHMEM_REAL4_FETCH
|
||||
#define shmem_real4_fetch_ pshmem_real4_fetch_
|
||||
#define shmem_real4_fetch__ pshmem_real4_fetch__
|
||||
|
||||
#define SHMEM_REAL8_FETCH PSHMEM_REAL8_FETCH
|
||||
#define shmem_real8_fetch_ pshmem_real8_fetch_
|
||||
#define shmem_real8_fetch__ pshmem_real8_fetch__
|
||||
|
||||
#define SHMEM_REAL_GET PSHMEM_REAL_GET
|
||||
#define shmem_real_get_ pshmem_real_get_
|
||||
#define shmem_real_get__ pshmem_real_get__
|
||||
|
@ -117,10 +117,24 @@ PN (ompi_fortran_integer4_t, pshmem_int4_swap, PSHMEM_INT4_SWAP, (FORTRAN_POINTE
|
||||
PN (ompi_fortran_integer8_t, pshmem_int8_swap, PSHMEM_INT8_SWAP, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
PN (ompi_fortran_real4_t, pshmem_real4_swap, PSHMEM_REAL4_SWAP, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
PN (ompi_fortran_real8_t, pshmem_real8_swap, PSHMEM_REAL8_SWAP, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
|
||||
PN (void, pshmem_int4_set, PSHMEM_INT4_SET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
PN (void, pshmem_int8_set, PSHMEM_INT8_SET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
PN (void, pshmem_real4_set, PSHMEM_REAL4_SET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
PN (void, pshmem_real8_set, PSHMEM_REAL8_SET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
|
||||
|
||||
PN (ompi_fortran_integer4_t, pshmem_int4_cswap, PSHMEM_INT4_CSWAP, (FORTRAN_POINTER_T target, MPI_Fint *cond, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
PN (ompi_fortran_integer8_t, pshmem_int8_cswap, PSHMEM_INT8_CSWAP, (FORTRAN_POINTER_T target, MPI_Fint *cond, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
|
||||
PN (ompi_fortran_integer4_t, pshmem_int4_fadd, PSHMEM_INT4_FADD, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
PN (ompi_fortran_integer8_t, pshmem_int8_fadd, PSHMEM_INT8_FADD, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
|
||||
PN (ompi_fortran_integer4_t, pshmem_int4_fetch, PSHMEM_INT4_FETCH, (FORTRAN_POINTER_T target, MPI_Fint *pe));
|
||||
PN (ompi_fortran_integer8_t, pshmem_int8_fetch, PSHMEM_INT8_FETCH, (FORTRAN_POINTER_T target, MPI_Fint *pe));
|
||||
PN (ompi_fortran_real4_t, pshmem_real4_fetch, PSHMEM_REAL4_FETCH, (FORTRAN_POINTER_T target, MPI_Fint *pe));
|
||||
PN (ompi_fortran_real8_t, pshmem_real8_fetch, PSHMEM_REAL8_FETCH, (FORTRAN_POINTER_T target, MPI_Fint *pe));
|
||||
|
||||
PN (void, pshmem_int4_inc, PSHMEM_INT4_INC, (FORTRAN_POINTER_T target, MPI_Fint *pe));
|
||||
PN (void, pshmem_int8_inc, PSHMEM_INT8_INC, (FORTRAN_POINTER_T target, MPI_Fint *pe));
|
||||
PN (ompi_fortran_integer4_t, pshmem_int4_finc, PSHMEM_INT4_FINC, (FORTRAN_POINTER_T target, MPI_Fint *pe));
|
||||
|
@ -121,10 +121,23 @@ PN (ompi_fortran_integer4_t, shmem_int4_swap, SHMEM_INT4_SWAP, (FORTRAN_POINTER_
|
||||
PN (ompi_fortran_integer8_t, shmem_int8_swap, SHMEM_INT8_SWAP, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
PN (ompi_fortran_real4_t, shmem_real4_swap, SHMEM_REAL4_SWAP, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
PN (ompi_fortran_real8_t, shmem_real8_swap, SHMEM_REAL8_SWAP, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
|
||||
PN (void, shmem_int4_set, SHMEM_INT4_SET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
PN (void, shmem_int8_set, SHMEM_INT8_SET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
PN (void, shmem_real4_set, SHMEM_REAL4_SET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
PN (void, shmem_real8_set, SHMEM_REAL8_SET, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
|
||||
PN (ompi_fortran_integer4_t, shmem_int4_cswap, SHMEM_INT4_CSWAP, (FORTRAN_POINTER_T target, MPI_Fint *cond, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
PN (ompi_fortran_integer8_t, shmem_int8_cswap, SHMEM_INT8_CSWAP, (FORTRAN_POINTER_T target, MPI_Fint *cond, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
|
||||
PN (ompi_fortran_integer4_t, shmem_int4_fadd, SHMEM_INT4_FADD, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
PN (ompi_fortran_integer8_t, shmem_int8_fadd, SHMEM_INT8_FADD, (FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe));
|
||||
|
||||
PN (ompi_fortran_integer4_t, shmem_int4_fetch, SHMEM_INT4_FETCH, (FORTRAN_POINTER_T target, MPI_Fint *pe));
|
||||
PN (ompi_fortran_integer8_t, shmem_int8_fetch, SHMEM_INT8_FETCH, (FORTRAN_POINTER_T target, MPI_Fint *pe));
|
||||
PN (ompi_fortran_real4_t, shmem_real4_fetch, SHMEM_REAL4_FETCH, (FORTRAN_POINTER_T target, MPI_Fint *pe));
|
||||
PN (ompi_fortran_real8_t, shmem_real8_fetch, SHMEM_REAL8_FETCH, (FORTRAN_POINTER_T target, MPI_Fint *pe));
|
||||
|
||||
PN (void, shmem_int4_inc, SHMEM_INT4_INC, (FORTRAN_POINTER_T target, MPI_Fint *pe));
|
||||
PN (void, shmem_int8_inc, SHMEM_INT8_INC, (FORTRAN_POINTER_T target, MPI_Fint *pe));
|
||||
PN (ompi_fortran_integer4_t, shmem_int4_finc, SHMEM_INT4_FINC, (FORTRAN_POINTER_T target, MPI_Fint *pe));
|
||||
|
51
oshmem/shmem/fortran/shmem_int4_fetch_f.c
Обычный файл
51
oshmem/shmem/fortran/shmem_int4_fetch_f.c
Обычный файл
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "oshmem_config.h"
|
||||
#include "oshmem/shmem/fortran/bindings.h"
|
||||
#include "oshmem/include/shmem.h"
|
||||
#include "oshmem/shmem/shmem_api_logger.h"
|
||||
#include "oshmem/runtime/runtime.h"
|
||||
#include "oshmem/mca/atomic/atomic.h"
|
||||
#include "ompi/datatype/ompi_datatype.h"
|
||||
#include "oshmem/op/op.h"
|
||||
#include "stdio.h"
|
||||
|
||||
#if OSHMEM_PROFILING
|
||||
#include "oshmem/shmem/fortran/profile/pbindings.h"
|
||||
SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_INT4_FETCH, shmem_int4_fetch)
|
||||
#include "oshmem/shmem/fortran/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_GENERATE_FORTRAN_BINDINGS_FUNCTION (ompi_fortran_integer4_t,
|
||||
SHMEM_INT4_FETCH,
|
||||
shmem_int4_fetch_,
|
||||
shmem_int4_fetch__,
|
||||
shmem_int4_fetch_f,
|
||||
(FORTRAN_POINTER_T target, MPI_Fint *pe),
|
||||
(target,pe) )
|
||||
|
||||
ompi_fortran_integer4_t shmem_int4_fetch_f(FORTRAN_POINTER_T target, MPI_Fint *pe)
|
||||
{
|
||||
ompi_fortran_integer4_t out_value = 0;
|
||||
oshmem_op_t* op = oshmem_op_sum_fint4;
|
||||
int value = 0;
|
||||
|
||||
MCA_ATOMIC_CALL(fadd(FPTR_2_VOID_PTR(target),
|
||||
(void *)&out_value,
|
||||
(const void *)&value,
|
||||
sizeof(out_value),
|
||||
OMPI_FINT_2_INT(*pe),
|
||||
op));
|
||||
|
||||
return out_value;
|
||||
}
|
||||
|
46
oshmem/shmem/fortran/shmem_int4_set_f.c
Обычный файл
46
oshmem/shmem/fortran/shmem_int4_set_f.c
Обычный файл
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "oshmem_config.h"
|
||||
#include "oshmem/shmem/fortran/bindings.h"
|
||||
#include "oshmem/include/shmem.h"
|
||||
#include "oshmem/shmem/shmem_api_logger.h"
|
||||
#include "oshmem/runtime/runtime.h"
|
||||
#include "oshmem/mca/atomic/atomic.h"
|
||||
#include "ompi/datatype/ompi_datatype.h"
|
||||
#include "stdio.h"
|
||||
|
||||
#if OSHMEM_PROFILING
|
||||
#include "oshmem/shmem/fortran/profile/pbindings.h"
|
||||
SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_INT4_SET, shmem_int4_set)
|
||||
#include "oshmem/shmem/fortran/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void,
|
||||
SHMEM_INT4_SET,
|
||||
shmem_int4_set_,
|
||||
shmem_int4_set__,
|
||||
shmem_int4_set_f,
|
||||
(FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe),
|
||||
(target,value,pe) )
|
||||
|
||||
void shmem_int4_set_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe)
|
||||
{
|
||||
ompi_fortran_integer4_t out_value = 0;
|
||||
|
||||
MCA_ATOMIC_CALL(cswap(FPTR_2_VOID_PTR(target),
|
||||
(void *)&out_value,
|
||||
NULL,
|
||||
FPTR_2_VOID_PTR(value),
|
||||
sizeof(out_value),
|
||||
OMPI_FINT_2_INT(*pe)));
|
||||
}
|
||||
|
51
oshmem/shmem/fortran/shmem_int8_fetch_f.c
Обычный файл
51
oshmem/shmem/fortran/shmem_int8_fetch_f.c
Обычный файл
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "oshmem_config.h"
|
||||
#include "oshmem/shmem/fortran/bindings.h"
|
||||
#include "oshmem/include/shmem.h"
|
||||
#include "oshmem/shmem/shmem_api_logger.h"
|
||||
#include "oshmem/runtime/runtime.h"
|
||||
#include "oshmem/mca/atomic/atomic.h"
|
||||
#include "ompi/datatype/ompi_datatype.h"
|
||||
#include "oshmem/op/op.h"
|
||||
#include "stdio.h"
|
||||
|
||||
#if OSHMEM_PROFILING
|
||||
#include "oshmem/shmem/fortran/profile/pbindings.h"
|
||||
SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_INT8_FETCH, shmem_int8_fetch)
|
||||
#include "oshmem/shmem/fortran/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_GENERATE_FORTRAN_BINDINGS_FUNCTION (ompi_fortran_integer8_t,
|
||||
SHMEM_INT8_FETCH,
|
||||
shmem_int8_fetch_,
|
||||
shmem_int8_fetch__,
|
||||
shmem_int8_fetch_f,
|
||||
(FORTRAN_POINTER_T target, MPI_Fint *pe),
|
||||
(target,pe) )
|
||||
|
||||
ompi_fortran_integer8_t shmem_int8_fetch_f(FORTRAN_POINTER_T target, MPI_Fint *pe)
|
||||
{
|
||||
ompi_fortran_integer8_t out_value = 0;
|
||||
oshmem_op_t* op = oshmem_op_sum_fint8;
|
||||
int value = 0;
|
||||
|
||||
MCA_ATOMIC_CALL(fadd(FPTR_2_VOID_PTR(target),
|
||||
(void *)&out_value,
|
||||
(const void *)&value,
|
||||
sizeof(out_value),
|
||||
OMPI_FINT_2_INT(*pe),
|
||||
op));
|
||||
|
||||
return out_value;
|
||||
}
|
||||
|
46
oshmem/shmem/fortran/shmem_int8_set_f.c
Обычный файл
46
oshmem/shmem/fortran/shmem_int8_set_f.c
Обычный файл
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "oshmem_config.h"
|
||||
#include "oshmem/shmem/fortran/bindings.h"
|
||||
#include "oshmem/include/shmem.h"
|
||||
#include "oshmem/shmem/shmem_api_logger.h"
|
||||
#include "oshmem/runtime/runtime.h"
|
||||
#include "oshmem/mca/atomic/atomic.h"
|
||||
#include "ompi/datatype/ompi_datatype.h"
|
||||
#include "stdio.h"
|
||||
|
||||
#if OSHMEM_PROFILING
|
||||
#include "oshmem/shmem/fortran/profile/pbindings.h"
|
||||
SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_INT8_SET, shmem_int8_set)
|
||||
#include "oshmem/shmem/fortran/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void,
|
||||
SHMEM_INT8_SET,
|
||||
shmem_int8_set_,
|
||||
shmem_int8_set__,
|
||||
shmem_int8_set_f,
|
||||
(FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe),
|
||||
(target,value,pe) )
|
||||
|
||||
void shmem_int8_set_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe)
|
||||
{
|
||||
ompi_fortran_integer8_t out_value = 0;
|
||||
|
||||
MCA_ATOMIC_CALL(cswap(FPTR_2_VOID_PTR(target),
|
||||
(void *)&out_value,
|
||||
NULL,
|
||||
FPTR_2_VOID_PTR(value),
|
||||
sizeof(out_value),
|
||||
OMPI_FINT_2_INT(*pe)));
|
||||
}
|
||||
|
51
oshmem/shmem/fortran/shmem_real4_fetch_f.c
Обычный файл
51
oshmem/shmem/fortran/shmem_real4_fetch_f.c
Обычный файл
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "oshmem_config.h"
|
||||
#include "oshmem/shmem/fortran/bindings.h"
|
||||
#include "oshmem/include/shmem.h"
|
||||
#include "oshmem/shmem/shmem_api_logger.h"
|
||||
#include "oshmem/runtime/runtime.h"
|
||||
#include "oshmem/mca/atomic/atomic.h"
|
||||
#include "ompi/datatype/ompi_datatype.h"
|
||||
#include "oshmem/op/op.h"
|
||||
#include "stdio.h"
|
||||
|
||||
#if OSHMEM_PROFILING
|
||||
#include "oshmem/shmem/fortran/profile/pbindings.h"
|
||||
SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_REAL4_FETCH, shmem_real4_fetch)
|
||||
#include "oshmem/shmem/fortran/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_GENERATE_FORTRAN_BINDINGS_FUNCTION (ompi_fortran_real4_t,
|
||||
SHMEM_REAL4_FETCH,
|
||||
shmem_real4_fetch_,
|
||||
shmem_real4_fetch__,
|
||||
shmem_real4_fetch_f,
|
||||
(FORTRAN_POINTER_T target, MPI_Fint *pe),
|
||||
(target,pe) )
|
||||
|
||||
ompi_fortran_real4_t shmem_real4_fetch_f(FORTRAN_POINTER_T target, MPI_Fint *pe)
|
||||
{
|
||||
ompi_fortran_real4_t out_value = 0;
|
||||
oshmem_op_t* op = oshmem_op_sum_freal4;
|
||||
int value = 0;
|
||||
|
||||
MCA_ATOMIC_CALL(fadd(FPTR_2_VOID_PTR(target),
|
||||
(void *)&out_value,
|
||||
(const void *)&value,
|
||||
sizeof(out_value),
|
||||
OMPI_FINT_2_INT(*pe),
|
||||
op));
|
||||
|
||||
return out_value;
|
||||
}
|
||||
|
47
oshmem/shmem/fortran/shmem_real4_set_f.c
Обычный файл
47
oshmem/shmem/fortran/shmem_real4_set_f.c
Обычный файл
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "oshmem_config.h"
|
||||
#include "oshmem/shmem/fortran/bindings.h"
|
||||
#include "oshmem/include/shmem.h"
|
||||
#include "oshmem/shmem/shmem_api_logger.h"
|
||||
#include "oshmem/runtime/runtime.h"
|
||||
#include "oshmem/mca/atomic/atomic.h"
|
||||
#include "ompi/datatype/ompi_datatype.h"
|
||||
#include "stdio.h"
|
||||
|
||||
#if OSHMEM_PROFILING
|
||||
#include "oshmem/shmem/fortran/profile/pbindings.h"
|
||||
SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_REAL4_SET, shmem_real4_set)
|
||||
#include "oshmem/shmem/fortran/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void,
|
||||
SHMEM_REAL4_SET,
|
||||
shmem_real4_set_,
|
||||
shmem_real4_set__,
|
||||
shmem_real4_set_f,
|
||||
(FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe),
|
||||
(target,value,pe) )
|
||||
|
||||
void shmem_real4_set_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe)
|
||||
{
|
||||
ompi_fortran_real4_t out_value = 0;
|
||||
|
||||
MCA_ATOMIC_CALL(cswap(FPTR_2_VOID_PTR(target),
|
||||
(void *)&out_value,
|
||||
NULL,
|
||||
FPTR_2_VOID_PTR(value),
|
||||
sizeof(out_value),
|
||||
OMPI_FINT_2_INT(*pe)));
|
||||
|
||||
}
|
||||
|
51
oshmem/shmem/fortran/shmem_real8_fetch_f.c
Обычный файл
51
oshmem/shmem/fortran/shmem_real8_fetch_f.c
Обычный файл
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "oshmem_config.h"
|
||||
#include "oshmem/shmem/fortran/bindings.h"
|
||||
#include "oshmem/include/shmem.h"
|
||||
#include "oshmem/shmem/shmem_api_logger.h"
|
||||
#include "oshmem/runtime/runtime.h"
|
||||
#include "oshmem/mca/atomic/atomic.h"
|
||||
#include "ompi/datatype/ompi_datatype.h"
|
||||
#include "oshmem/op/op.h"
|
||||
#include "stdio.h"
|
||||
|
||||
#if OSHMEM_PROFILING
|
||||
#include "oshmem/shmem/fortran/profile/pbindings.h"
|
||||
SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_REAL8_FETCH, shmem_real8_fetch)
|
||||
#include "oshmem/shmem/fortran/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_GENERATE_FORTRAN_BINDINGS_FUNCTION (ompi_fortran_real8_t,
|
||||
SHMEM_REAL8_FETCH,
|
||||
shmem_real8_fetch_,
|
||||
shmem_real8_fetch__,
|
||||
shmem_real8_fetch_f,
|
||||
(FORTRAN_POINTER_T target, MPI_Fint *pe),
|
||||
(target,pe) )
|
||||
|
||||
ompi_fortran_real8_t shmem_real8_fetch_f(FORTRAN_POINTER_T target, MPI_Fint *pe)
|
||||
{
|
||||
ompi_fortran_real8_t out_value = 0;
|
||||
oshmem_op_t* op = oshmem_op_sum_freal8;
|
||||
int value = 0;
|
||||
|
||||
MCA_ATOMIC_CALL(fadd(FPTR_2_VOID_PTR(target),
|
||||
(void *)&out_value,
|
||||
(const void *)&value,
|
||||
sizeof(out_value),
|
||||
OMPI_FINT_2_INT(*pe),
|
||||
op));
|
||||
|
||||
return out_value;
|
||||
}
|
||||
|
46
oshmem/shmem/fortran/shmem_real8_set_f.c
Обычный файл
46
oshmem/shmem/fortran/shmem_real8_set_f.c
Обычный файл
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Mellanox Technologies, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "oshmem_config.h"
|
||||
#include "oshmem/shmem/fortran/bindings.h"
|
||||
#include "oshmem/include/shmem.h"
|
||||
#include "oshmem/shmem/shmem_api_logger.h"
|
||||
#include "oshmem/runtime/runtime.h"
|
||||
#include "oshmem/mca/atomic/atomic.h"
|
||||
#include "ompi/datatype/ompi_datatype.h"
|
||||
#include "stdio.h"
|
||||
|
||||
#if OSHMEM_PROFILING
|
||||
#include "oshmem/shmem/fortran/profile/pbindings.h"
|
||||
SHMEM_GENERATE_WEAK_BINDINGS(SHMEM_REAL8_SET, shmem_real8_set)
|
||||
#include "oshmem/shmem/fortran/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_GENERATE_FORTRAN_BINDINGS_SUB (void,
|
||||
SHMEM_REAL8_SET,
|
||||
shmem_real8_set_,
|
||||
shmem_real8_set__,
|
||||
shmem_real8_set_f,
|
||||
(FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe),
|
||||
(target,value,pe) )
|
||||
|
||||
void shmem_real8_set_f(FORTRAN_POINTER_T target, FORTRAN_POINTER_T value, MPI_Fint *pe)
|
||||
{
|
||||
ompi_fortran_real8_t out_value = 0;
|
||||
|
||||
MCA_ATOMIC_CALL(cswap(FPTR_2_VOID_PTR(target),
|
||||
(void *)&out_value,
|
||||
NULL,
|
||||
FPTR_2_VOID_PTR(value),
|
||||
sizeof(out_value),
|
||||
OMPI_FINT_2_INT(*pe)));
|
||||
}
|
||||
|
@ -98,12 +98,26 @@ shmem_api_man_pages = \
|
||||
shmem/man/man3/shmem_longlong_swap.3 \
|
||||
shmem/man/man3/shmem_float_swap.3 \
|
||||
shmem/man/man3/shmem_double_swap.3 \
|
||||
\
|
||||
shmem/man/man3/shmem_double_set.3 \
|
||||
shmem/man/man3/shmem_float_set.3 \
|
||||
shmem/man/man3/shmem_int_set.3 \
|
||||
shmem/man/man3/shmem_longlong_set.3 \
|
||||
shmem/man/man3/shmem_long_set.3 \
|
||||
\
|
||||
shmem/man/man3/shmem_int_cswap.3 \
|
||||
shmem/man/man3/shmem_long_cswap.3 \
|
||||
shmem/man/man3/shmem_longlong_cswap.3 \
|
||||
shmem/man/man3/shmem_int_fadd.3 \
|
||||
shmem/man/man3/shmem_long_fadd.3 \
|
||||
shmem/man/man3/shmem_longlong_fadd.3 \
|
||||
\
|
||||
shmem/man/man3/shmem_double_fetch.3 \
|
||||
shmem/man/man3/shmem_float_fetch.3 \
|
||||
shmem/man/man3/shmem_int_fetch.3 \
|
||||
shmem/man/man3/shmem_long_fetch.3 \
|
||||
shmem/man/man3/shmem_longlong_fetch.3 \
|
||||
\
|
||||
shmem/man/man3/shmem_int_finc.3 \
|
||||
shmem/man/man3/shmem_long_finc.3 \
|
||||
shmem/man/man3/shmem_longlong_finc.3 \
|
||||
|
1
oshmem/shmem/man/man3/shmem_double_fetch.3in
Обычный файл
1
oshmem/shmem/man/man3/shmem_double_fetch.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/shmem_int_fetch.3
|
1
oshmem/shmem/man/man3/shmem_double_set.3in
Обычный файл
1
oshmem/shmem/man/man3/shmem_double_set.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/shmem_int_set.3
|
1
oshmem/shmem/man/man3/shmem_float_fetch.3in
Обычный файл
1
oshmem/shmem/man/man3/shmem_float_fetch.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/shmem_int_fetch.3
|
1
oshmem/shmem/man/man3/shmem_float_set.3in
Обычный файл
1
oshmem/shmem/man/man3/shmem_float_set.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/shmem_int_set.3
|
83
oshmem/shmem/man/man3/shmem_int_fetch.3in
Обычный файл
83
oshmem/shmem/man/man3/shmem_int_fetch.3in
Обычный файл
@ -0,0 +1,83 @@
|
||||
.\" -*- nroff -*-
|
||||
.\" Copyright (c) 2016 Mellanox Technologies, Inc.
|
||||
.\" $COPYRIGHT$
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "SHMEM\\_FETCH" "3" "Unreleased developer copy" "gitclone" "Open MPI"
|
||||
.SH NAME
|
||||
|
||||
\fIshmem_int4_fetch\fP(3),
|
||||
\fIshmem_int8_fetch\fP(3),
|
||||
\fIshmem_int_fetch\fP(3),
|
||||
\fIshmem_long_fetch\fP(3),
|
||||
\fIshmem_longlong_fetch\fP(3)
|
||||
\fIshmem_double_fetch\fP(3)
|
||||
\fIshmem_float_fetch\fP(3)
|
||||
\- Atomically fetches the value of a remote data object
|
||||
.SH SYNOPSIS
|
||||
|
||||
C or C++:
|
||||
.Vb
|
||||
#include <mpp/shmem.h>
|
||||
|
||||
int shmem_int_fetch(int *target, int pe);
|
||||
|
||||
long shmem_long_fetch(long *target, int pe);
|
||||
|
||||
long long shmem_longlong_fetch(long long *target, int pe);
|
||||
|
||||
double shmem_double_fetch(long long *target, int pe);
|
||||
|
||||
float shmem_float_fetch(float *target, int pe);
|
||||
.Ve
|
||||
Fortran:
|
||||
.Vb
|
||||
INCLUDE "mpp/shmem.fh"
|
||||
|
||||
INTEGER pe
|
||||
|
||||
INTEGER(KIND=4) SHMEM_INT4_FETCH, ires, target
|
||||
ires = SHMEM_INT4_FETCH(target, pe)
|
||||
|
||||
INTEGER(KIND=8) SHMEM_INT8_FETCH, ires, target
|
||||
ires = SHMEM_INT8_FETCH(target, pe)
|
||||
|
||||
|
||||
REAL(KIND=4) SHMEM_INT4_FETCH, ires, target
|
||||
ires = SHMEM_REAL4_FETCH(target, pe)
|
||||
|
||||
REAL(KIND=8) SHMEM_INT8_FETCH, ires, target
|
||||
ires = SHMEM_REAL8_FETCH(target, pe)
|
||||
|
||||
.Ve
|
||||
.SH DESCRIPTION
|
||||
|
||||
The shmem_fetch functions perform an atomic fetch operation. They return the contents of the
|
||||
\fBtarget\fP as an atomic operation.
|
||||
|
||||
.PP
|
||||
The arguments are as follows:
|
||||
.TP
|
||||
target
|
||||
The remotely accessible data object to be fetched from the remote PE.
|
||||
.TP
|
||||
pe
|
||||
An integer that indicates the PE number from which \fItarget\fP is to be fetched. If you are
|
||||
using Fortran, it must be a default integer value.
|
||||
.PP
|
||||
|
||||
.SH RETURN VALUES
|
||||
The contents at the \fItarget\fP address on the remote PE.
|
||||
The data type of the return value is the same as the the
|
||||
type of the remote data object.
|
||||
|
||||
.SH SEE ALSO
|
||||
|
||||
\fIintro_shmem\fP(3)
|
77
oshmem/shmem/man/man3/shmem_int_set.3in
Обычный файл
77
oshmem/shmem/man/man3/shmem_int_set.3in
Обычный файл
@ -0,0 +1,77 @@
|
||||
.\" -*- nroff -*-
|
||||
.\" Copyright (c) 2016 Mellanox Technologies, Inc.
|
||||
.\" $COPYRIGHT$
|
||||
.de Vb
|
||||
.ft CW
|
||||
.nf
|
||||
..
|
||||
.de Ve
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.TH "SHMEM\\_SET" "3" "Unreleased developer copy" "gitclone" "Open MPI"
|
||||
.SH NAME
|
||||
|
||||
\fIshmem_double_set\fP(3),
|
||||
\fIshmem_float_set\fP(3),
|
||||
\fIshmem_int_set\fP(3),
|
||||
\fIshmem_long_set\fP(3),
|
||||
\fIshmem_longlong_set\fP(3)
|
||||
\fIshmem_int4_set\fP(3),
|
||||
\fIshmem_int8_set\fP(3),
|
||||
\fIshmem_real4_set\fP(3),
|
||||
\fIshmem_real8_set\fP(3),
|
||||
\- Atomically sets the value of a remote data object
|
||||
|
||||
.SH SYNOPSIS
|
||||
|
||||
C or C++:
|
||||
.Vb
|
||||
#include <mpp/shmem.h>
|
||||
|
||||
void shmem_double_set(double *target, double value, int pe);
|
||||
|
||||
void shmem_float_set(float *target, float value, int pe);
|
||||
|
||||
void shmem_int_set(int *target, int value, int pe);
|
||||
|
||||
void shmem_long_set(long *target, long value, int pe);
|
||||
|
||||
void shmem_longlong_set(long long *target, long long value, int pe);
|
||||
.Ve
|
||||
Fortran:
|
||||
.Vb
|
||||
INCLUDE "mpp/shmem.fh"
|
||||
|
||||
INTEGER pe
|
||||
|
||||
CALL SHMEM_INT4_SET(target, value, pe)
|
||||
CALL SHMEM_INT8_SET(target, value, pe)
|
||||
CALL SHMEM_REAL4_SET(target, value, pe)
|
||||
CALL SHMEM_REAL8_SET(target, value, pe)
|
||||
|
||||
.Ve
|
||||
.SH DESCRIPTION
|
||||
|
||||
The set routines write the \fBvalue\fP into the address \fBtarget\fP on \fBpe\fP as an atomic operation.
|
||||
.PP
|
||||
The arguments are as follows:
|
||||
.TP
|
||||
target
|
||||
The remotely accessible data object to be set on the remote PE.
|
||||
.TP
|
||||
value
|
||||
The value to be atomically written to the remote PE.
|
||||
.TP
|
||||
pe
|
||||
An integer that indicates the PE number upon which target is to be updated. If you
|
||||
are using Fortran, it must be a default integer value.
|
||||
.PP
|
||||
.SH RETURN VALUES
|
||||
NONE
|
||||
|
||||
.SH SEE ALSO
|
||||
|
||||
\fIintro_shmem\fP(3)
|
||||
|
1
oshmem/shmem/man/man3/shmem_long_fetch.3in
Обычный файл
1
oshmem/shmem/man/man3/shmem_long_fetch.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/shmem_int_fetch.3
|
1
oshmem/shmem/man/man3/shmem_long_set.3in
Обычный файл
1
oshmem/shmem/man/man3/shmem_long_set.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/shmem_int_set.3
|
1
oshmem/shmem/man/man3/shmem_longlong_fetch.3in
Обычный файл
1
oshmem/shmem/man/man3/shmem_longlong_fetch.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/shmem_int_fetch.3
|
1
oshmem/shmem/man/man3/shmem_longlong_set.3in
Обычный файл
1
oshmem/shmem/man/man3/shmem_longlong_set.3in
Обычный файл
@ -0,0 +1 @@
|
||||
.so man3/shmem_int_set.3
|
Загрузка…
Ссылка в новой задаче
Block a user