Merge pull request #1154 from igor-ivanov/pr/warn-iso-c99-variadic-macro
Align OSHMEM API with spec v1.2 (fix ISO C99 warning for variadic macro)
Этот коммит содержится в:
Коммит
a7962bf996
@ -22,8 +22,8 @@
|
||||
* must be completed without the possibility of another process updating target between the
|
||||
* time of the fetch and the update.
|
||||
*/
|
||||
#define SHMEM_TYPE_ADD(type_name, type, ...) \
|
||||
void shmem##__VA_ARGS__##type_name##_add(type *target, type value, int pe) \
|
||||
#define SHMEM_TYPE_ADD(type_name, type, prefix) \
|
||||
void prefix##type_name##_add(type *target, type value, int pe) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
size_t size = 0; \
|
||||
@ -57,8 +57,8 @@
|
||||
#include "oshmem/shmem/c/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_TYPE_ADD(_int, int)
|
||||
SHMEM_TYPE_ADD(_long, long)
|
||||
SHMEM_TYPE_ADD(_longlong, long long)
|
||||
SHMEM_TYPE_ADD(_int32, int32_t, x)
|
||||
SHMEM_TYPE_ADD(_int64, int64_t, x)
|
||||
SHMEM_TYPE_ADD(_int, int, shmem)
|
||||
SHMEM_TYPE_ADD(_long, long, shmem)
|
||||
SHMEM_TYPE_ADD(_longlong, long long, shmem)
|
||||
SHMEM_TYPE_ADD(_int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_ADD(_int64, int64_t, shmemx)
|
||||
|
@ -24,8 +24,8 @@
|
||||
* of target. The operation must be completed without the possibility of another process updating
|
||||
* target between the time of the fetch and the update.
|
||||
*/
|
||||
#define SHMEM_TYPE_CSWAP(type_name, type, ...) \
|
||||
type shmem##__VA_ARGS__##type_name##_cswap(type *target, type cond, type value, int pe) \
|
||||
#define SHMEM_TYPE_CSWAP(type_name, type, prefix) \
|
||||
type prefix##type_name##_cswap(type *target, type cond, type value, int pe) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
size_t size = 0; \
|
||||
@ -58,9 +58,9 @@
|
||||
#include "oshmem/shmem/c/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_TYPE_CSWAP(_int, int)
|
||||
SHMEM_TYPE_CSWAP(_long, long)
|
||||
SHMEM_TYPE_CSWAP(_longlong, long long)
|
||||
SHMEM_TYPE_CSWAP(_int32, int32_t, x)
|
||||
SHMEM_TYPE_CSWAP(_int64, int64_t, x)
|
||||
SHMEM_TYPE_CSWAP(_int, int, shmem)
|
||||
SHMEM_TYPE_CSWAP(_long, long, shmem)
|
||||
SHMEM_TYPE_CSWAP(_longlong, long long, shmem)
|
||||
SHMEM_TYPE_CSWAP(_int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_CSWAP(_int64, int64_t, shmemx)
|
||||
|
||||
|
@ -24,8 +24,8 @@
|
||||
* without the possibility of another process updating target between the time of the
|
||||
* fetch and the update.
|
||||
*/
|
||||
#define SHMEM_TYPE_FADD(type_name, type, ...) \
|
||||
type shmem##__VA_ARGS__##type_name##_fadd(type *target, type value, int pe) \
|
||||
#define SHMEM_TYPE_FADD(type_name, type, prefix) \
|
||||
type prefix##type_name##_fadd(type *target, type value, int pe) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
size_t size = 0; \
|
||||
@ -59,8 +59,8 @@
|
||||
#include "oshmem/shmem/c/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_TYPE_FADD(_int, int)
|
||||
SHMEM_TYPE_FADD(_long, long)
|
||||
SHMEM_TYPE_FADD(_longlong, long long)
|
||||
SHMEM_TYPE_FADD(_int32, int32_t, x)
|
||||
SHMEM_TYPE_FADD(_int64, int64_t, x)
|
||||
SHMEM_TYPE_FADD(_int, int, shmem)
|
||||
SHMEM_TYPE_FADD(_long, long, shmem)
|
||||
SHMEM_TYPE_FADD(_longlong, long long, shmem)
|
||||
SHMEM_TYPE_FADD(_int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_FADD(_int64, int64_t, shmemx)
|
||||
|
@ -24,8 +24,8 @@
|
||||
* completed without the possibility of another process updating target between the time of
|
||||
* the fetch and the update.
|
||||
*/
|
||||
#define SHMEM_TYPE_FINC(type_name, type, ...) \
|
||||
type shmem##__VA_ARGS__##type_name##_finc(type *target, int pe) \
|
||||
#define SHMEM_TYPE_FINC(type_name, type, prefix) \
|
||||
type prefix##type_name##_finc(type *target, int pe) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
size_t size; \
|
||||
@ -60,8 +60,8 @@
|
||||
#include "oshmem/shmem/c/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_TYPE_FINC(_int, int)
|
||||
SHMEM_TYPE_FINC(_long, long)
|
||||
SHMEM_TYPE_FINC(_longlong, long long)
|
||||
SHMEM_TYPE_FINC(_int32, int32_t, x)
|
||||
SHMEM_TYPE_FINC(_int64, int64_t, x)
|
||||
SHMEM_TYPE_FINC(_int, int, shmem)
|
||||
SHMEM_TYPE_FINC(_long, long, shmem)
|
||||
SHMEM_TYPE_FINC(_longlong, long long, shmem)
|
||||
SHMEM_TYPE_FINC(_int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_FINC(_int64, int64_t, shmemx)
|
||||
|
@ -21,8 +21,8 @@
|
||||
* double, long) from symmetric data objects on remote PEs.
|
||||
* Retrieves the value at the symmetric address addr of the remote PE pe.
|
||||
*/
|
||||
#define SHMEM_TYPE_G(type_name, type, ...) \
|
||||
type shmem##__VA_ARGS__##type_name##_g(type *addr, int pe) \
|
||||
#define SHMEM_TYPE_G(type_name, type, prefix) \
|
||||
type prefix##type_name##_g(type *addr, int pe) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
size_t size = 0; \
|
||||
@ -59,14 +59,14 @@
|
||||
#include "oshmem/shmem/c/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_TYPE_G(_char, char)
|
||||
SHMEM_TYPE_G(_short, short)
|
||||
SHMEM_TYPE_G(_int, int)
|
||||
SHMEM_TYPE_G(_long, long)
|
||||
SHMEM_TYPE_G(_longlong, long long)
|
||||
SHMEM_TYPE_G(_float, float)
|
||||
SHMEM_TYPE_G(_double, double)
|
||||
SHMEM_TYPE_G(_longdouble, long double)
|
||||
SHMEM_TYPE_G(_int16, int16_t, x)
|
||||
SHMEM_TYPE_G(_int32, int32_t, x)
|
||||
SHMEM_TYPE_G(_int64, int64_t, x)
|
||||
SHMEM_TYPE_G(_char, char, shmem)
|
||||
SHMEM_TYPE_G(_short, short, shmem)
|
||||
SHMEM_TYPE_G(_int, int, shmem)
|
||||
SHMEM_TYPE_G(_long, long, shmem)
|
||||
SHMEM_TYPE_G(_longlong, long long, shmem)
|
||||
SHMEM_TYPE_G(_float, float, shmem)
|
||||
SHMEM_TYPE_G(_double, double, shmem)
|
||||
SHMEM_TYPE_G(_longdouble, long double, shmem)
|
||||
SHMEM_TYPE_G(_int16, int16_t, shmemx)
|
||||
SHMEM_TYPE_G(_int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_G(_int64, int64_t, shmemx)
|
||||
|
@ -70,8 +70,8 @@ SHMEM_TYPE_GET(_float, float)
|
||||
SHMEM_TYPE_GET(_double, double)
|
||||
SHMEM_TYPE_GET(_longdouble, long double)
|
||||
|
||||
#define SHMEM_TYPE_GETMEM(name, element_size, ...) \
|
||||
void shmem##__VA_ARGS__##name(void *target, const void *source, size_t nelems, int pe) \
|
||||
#define SHMEM_TYPE_GETMEM(name, element_size, prefix) \
|
||||
void prefix##name(void *target, const void *source, size_t nelems, int pe) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
size_t size = 0; \
|
||||
@ -91,10 +91,10 @@ SHMEM_TYPE_GET(_longdouble, long double)
|
||||
return ; \
|
||||
}
|
||||
|
||||
SHMEM_TYPE_GETMEM(_getmem, 1)
|
||||
SHMEM_TYPE_GETMEM(_get16, 2, x)
|
||||
SHMEM_TYPE_GETMEM(_get32, 4)
|
||||
SHMEM_TYPE_GETMEM(_get64, 8)
|
||||
SHMEM_TYPE_GETMEM(_get128, 16)
|
||||
SHMEM_TYPE_GETMEM(_getmem, 1, shmem)
|
||||
SHMEM_TYPE_GETMEM(_get16, 2, shmemx)
|
||||
SHMEM_TYPE_GETMEM(_get32, 4, shmem)
|
||||
SHMEM_TYPE_GETMEM(_get64, 8, shmem)
|
||||
SHMEM_TYPE_GETMEM(_get128, 16, shmem)
|
||||
|
||||
SHMEM_TYPE_GETMEM(_get, sizeof(long))
|
||||
SHMEM_TYPE_GETMEM(_get, sizeof(long), shmem)
|
||||
|
@ -72,8 +72,8 @@ SHMEM_TYPE_IGET(_float, float)
|
||||
SHMEM_TYPE_IGET(_double, double)
|
||||
SHMEM_TYPE_IGET(_longdouble, long double)
|
||||
|
||||
#define SHMEM_TYPE_IGETMEM(name, element_size, ...) \
|
||||
void shmem##__VA_ARGS__##name(void *target, const void *source, ptrdiff_t tst, ptrdiff_t sst, size_t nelems, int pe) \
|
||||
#define SHMEM_TYPE_IGETMEM(name, element_size, prefix) \
|
||||
void prefix##name(void *target, const void *source, ptrdiff_t tst, ptrdiff_t sst, size_t nelems, int pe) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
size_t i = 0; \
|
||||
@ -95,7 +95,7 @@ SHMEM_TYPE_IGET(_longdouble, long double)
|
||||
return ; \
|
||||
}
|
||||
|
||||
SHMEM_TYPE_IGETMEM(_iget16, 2, x)
|
||||
SHMEM_TYPE_IGETMEM(_iget32, 4)
|
||||
SHMEM_TYPE_IGETMEM(_iget64, 8)
|
||||
SHMEM_TYPE_IGETMEM(_iget128, 16)
|
||||
SHMEM_TYPE_IGETMEM(_iget16, 2, shmemx)
|
||||
SHMEM_TYPE_IGETMEM(_iget32, 4, shmem)
|
||||
SHMEM_TYPE_IGETMEM(_iget64, 8, shmem)
|
||||
SHMEM_TYPE_IGETMEM(_iget128, 16, shmem)
|
||||
|
@ -23,8 +23,8 @@
|
||||
* one. The operation must be completed without the possibility of another process updating
|
||||
* target between the time of the fetch and the update.
|
||||
*/
|
||||
#define SHMEM_TYPE_INC(type_name, type, ...) \
|
||||
void shmem##__VA_ARGS__##type_name##_inc(type *target, int pe) \
|
||||
#define SHMEM_TYPE_INC(type_name, type, prefix) \
|
||||
void prefix##type_name##_inc(type *target, int pe) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
size_t size = 0; \
|
||||
@ -59,8 +59,8 @@
|
||||
#include "oshmem/shmem/c/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_TYPE_INC(_int, int)
|
||||
SHMEM_TYPE_INC(_long, long)
|
||||
SHMEM_TYPE_INC(_longlong, long long)
|
||||
SHMEM_TYPE_INC(_int32, int32_t, x)
|
||||
SHMEM_TYPE_INC(_int64, int64_t, x)
|
||||
SHMEM_TYPE_INC(_int, int, shmem)
|
||||
SHMEM_TYPE_INC(_long, long, shmem)
|
||||
SHMEM_TYPE_INC(_longlong, long long, shmem)
|
||||
SHMEM_TYPE_INC(_int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_INC(_int64, int64_t, shmemx)
|
||||
|
@ -72,8 +72,8 @@ SHMEM_TYPE_IPUT(_float, float)
|
||||
SHMEM_TYPE_IPUT(_double, double)
|
||||
SHMEM_TYPE_IPUT(_longdouble, long double)
|
||||
|
||||
#define SHMEM_TYPE_IPUTMEM(name, element_size, ...) \
|
||||
void shmem##__VA_ARGS__##name(void *target, const void *source, ptrdiff_t tst, ptrdiff_t sst, size_t nelems, int pe) \
|
||||
#define SHMEM_TYPE_IPUTMEM(name, element_size, prefix) \
|
||||
void prefix##name(void *target, const void *source, ptrdiff_t tst, ptrdiff_t sst, size_t nelems, int pe) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
size_t i = 0; \
|
||||
@ -95,7 +95,7 @@ SHMEM_TYPE_IPUT(_longdouble, long double)
|
||||
return ; \
|
||||
}
|
||||
|
||||
SHMEM_TYPE_IPUTMEM(_iput16, 2, x)
|
||||
SHMEM_TYPE_IPUTMEM(_iput32, 4)
|
||||
SHMEM_TYPE_IPUTMEM(_iput64, 8)
|
||||
SHMEM_TYPE_IPUTMEM(_iput128, 16)
|
||||
SHMEM_TYPE_IPUTMEM(_iput16, 2, shmemx)
|
||||
SHMEM_TYPE_IPUTMEM(_iput32, 4, shmem)
|
||||
SHMEM_TYPE_IPUTMEM(_iput64, 8, shmem)
|
||||
SHMEM_TYPE_IPUTMEM(_iput128, 16, shmem)
|
||||
|
@ -23,8 +23,8 @@
|
||||
* data object of the remote PE indicated by the parameter pe. These routines start the remote
|
||||
* transfer and may return before the data is delivered to the remote PE.
|
||||
*/
|
||||
#define SHMEM_TYPE_P(type_name, type, ...) \
|
||||
void shmem##__VA_ARGS__##type_name##_p(type *addr, type value, int pe) \
|
||||
#define SHMEM_TYPE_P(type_name, type, prefix) \
|
||||
void prefix##type_name##_p(type *addr, type value, int pe) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
size_t size = 0; \
|
||||
@ -60,14 +60,14 @@
|
||||
#include "oshmem/shmem/c/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_TYPE_P(_char, char)
|
||||
SHMEM_TYPE_P(_short, short)
|
||||
SHMEM_TYPE_P(_int, int)
|
||||
SHMEM_TYPE_P(_long, long)
|
||||
SHMEM_TYPE_P(_longlong, long long)
|
||||
SHMEM_TYPE_P(_float, float)
|
||||
SHMEM_TYPE_P(_double, double)
|
||||
SHMEM_TYPE_P(_longdouble, long double)
|
||||
SHMEM_TYPE_P(_int16, int16_t, x)
|
||||
SHMEM_TYPE_P(_int32, int32_t, x)
|
||||
SHMEM_TYPE_P(_int64, int64_t, x)
|
||||
SHMEM_TYPE_P(_char, char, shmem)
|
||||
SHMEM_TYPE_P(_short, short, shmem)
|
||||
SHMEM_TYPE_P(_int, int, shmem)
|
||||
SHMEM_TYPE_P(_long, long, shmem)
|
||||
SHMEM_TYPE_P(_longlong, long long, shmem)
|
||||
SHMEM_TYPE_P(_float, float, shmem)
|
||||
SHMEM_TYPE_P(_double, double, shmem)
|
||||
SHMEM_TYPE_P(_longdouble, long double, shmem)
|
||||
SHMEM_TYPE_P(_int16, int16_t, shmemx)
|
||||
SHMEM_TYPE_P(_int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_P(_int64, int64_t, shmemx)
|
||||
|
@ -73,8 +73,8 @@ SHMEM_TYPE_PUT(_float, float)
|
||||
SHMEM_TYPE_PUT(_double, double)
|
||||
SHMEM_TYPE_PUT(_longdouble, long double)
|
||||
|
||||
#define SHMEM_TYPE_PUTMEM(name, element_size, ...) \
|
||||
void shmem##__VA_ARGS__##name(void *target, const void *source, size_t nelems, int pe) \
|
||||
#define SHMEM_TYPE_PUTMEM(name, element_size, prefix) \
|
||||
void prefix##name(void *target, const void *source, size_t nelems, int pe) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
size_t size = 0; \
|
||||
@ -94,10 +94,10 @@ SHMEM_TYPE_PUT(_longdouble, long double)
|
||||
return ; \
|
||||
}
|
||||
|
||||
SHMEM_TYPE_PUTMEM(_putmem, 1)
|
||||
SHMEM_TYPE_PUTMEM(_put16, 2, x)
|
||||
SHMEM_TYPE_PUTMEM(_put32, 4)
|
||||
SHMEM_TYPE_PUTMEM(_put64, 8)
|
||||
SHMEM_TYPE_PUTMEM(_put128, 16)
|
||||
SHMEM_TYPE_PUTMEM(_putmem, 1, shmem)
|
||||
SHMEM_TYPE_PUTMEM(_put16, 2, shmemx)
|
||||
SHMEM_TYPE_PUTMEM(_put32, 4, shmem)
|
||||
SHMEM_TYPE_PUTMEM(_put64, 8, shmem)
|
||||
SHMEM_TYPE_PUTMEM(_put128, 16, shmem)
|
||||
|
||||
SHMEM_TYPE_PUTMEM(_put, sizeof(long))
|
||||
SHMEM_TYPE_PUTMEM(_put, sizeof(long), shmem)
|
||||
|
@ -32,8 +32,8 @@ static bool __group_cache_enabled = true;
|
||||
* object of every PE in the active set. The active set of PEs is defined by the triple PE_start,
|
||||
* logPE_stride and PE_size.
|
||||
*/
|
||||
#define SHMEM_TYPE_REDUCE_OP(name, type_name, type, ...) \
|
||||
void shmem##__VA_ARGS__##type_name##_##name##_to_all( type *target, \
|
||||
#define SHMEM_TYPE_REDUCE_OP(name, type_name, type, prefix) \
|
||||
void prefix##type_name##_##name##_to_all( type *target, \
|
||||
type *source, \
|
||||
int nreduce, \
|
||||
int PE_start, \
|
||||
@ -171,74 +171,74 @@ static bool __group_cache_enabled = true;
|
||||
#include "oshmem/shmem/c/profile/defines.h"
|
||||
#endif /* OSHMEM_PROFILING */
|
||||
|
||||
SHMEM_TYPE_REDUCE_OP(and, _short, short)
|
||||
SHMEM_TYPE_REDUCE_OP(and, _int, int)
|
||||
SHMEM_TYPE_REDUCE_OP(and, _long, long)
|
||||
SHMEM_TYPE_REDUCE_OP(and, _longlong, long long)
|
||||
SHMEM_TYPE_REDUCE_OP(and, _int16, int16_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(and, _int32, int32_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(and, _int64, int64_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(and, _short, short, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(and, _int, int, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(and, _long, long, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(and, _longlong, long long, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(and, _int16, int16_t, shmemx)
|
||||
SHMEM_TYPE_REDUCE_OP(and, _int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_REDUCE_OP(and, _int64, int64_t, shmemx)
|
||||
|
||||
SHMEM_TYPE_REDUCE_OP(or, _short, short)
|
||||
SHMEM_TYPE_REDUCE_OP(or, _int, int)
|
||||
SHMEM_TYPE_REDUCE_OP(or, _long, long)
|
||||
SHMEM_TYPE_REDUCE_OP(or, _longlong, long long)
|
||||
SHMEM_TYPE_REDUCE_OP(or, _int16, int16_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(or, _int32, int32_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(or, _int64, int64_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(or, _short, short, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(or, _int, int, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(or, _long, long, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(or, _longlong, long long, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(or, _int16, int16_t, shmemx)
|
||||
SHMEM_TYPE_REDUCE_OP(or, _int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_REDUCE_OP(or, _int64, int64_t, shmemx)
|
||||
|
||||
SHMEM_TYPE_REDUCE_OP(xor, _short, short)
|
||||
SHMEM_TYPE_REDUCE_OP(xor, _int, int)
|
||||
SHMEM_TYPE_REDUCE_OP(xor, _long, long)
|
||||
SHMEM_TYPE_REDUCE_OP(xor, _longlong, long long)
|
||||
SHMEM_TYPE_REDUCE_OP(xor, _int16, int16_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(xor, _int32, int32_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(xor, _int64, int64_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(xor, _short, short, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(xor, _int, int, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(xor, _long, long, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(xor, _longlong, long long, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(xor, _int16, int16_t, shmemx)
|
||||
SHMEM_TYPE_REDUCE_OP(xor, _int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_REDUCE_OP(xor, _int64, int64_t, shmemx)
|
||||
|
||||
SHMEM_TYPE_REDUCE_OP(max, _short, short)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _int, int)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _long, long)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _longlong, long long)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _float, float)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _double, double)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _longdouble, long double)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _int16, int16_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _int32, int32_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _int64, int64_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _short, short, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _int, int, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _long, long, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _longlong, long long, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _float, float, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _double, double, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _longdouble, long double, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _int16, int16_t, shmemx)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_REDUCE_OP(max, _int64, int64_t, shmemx)
|
||||
|
||||
SHMEM_TYPE_REDUCE_OP(min, _short, short)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _int, int)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _long, long)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _longlong, long long)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _float, float)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _double, double)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _longdouble, long double)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _int16, int16_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _int32, int32_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _int64, int64_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _short, short, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _int, int, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _long, long, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _longlong, long long, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _float, float, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _double, double, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _longdouble, long double, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _int16, int16_t, shmemx)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_REDUCE_OP(min, _int64, int64_t, shmemx)
|
||||
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _short, short)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _int, int)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _long, long)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _longlong, long long)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _float, float)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _double, double)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _longdouble, long double)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _complexf, float complex)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _complexd, double complex)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _int16, int16_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _int32, int32_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _int64, int64_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _short, short, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _int, int, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _long, long, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _longlong, long long, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _float, float, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _double, double, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _longdouble, long double, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _complexf, float complex, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _complexd, double complex, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _int16, int16_t, shmemx)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_REDUCE_OP(sum, _int64, int64_t, shmemx)
|
||||
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _short, short)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _int, int)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _long, long)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _longlong, long long)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _float, float)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _double, double)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _longdouble, long double)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _complexf, float complex)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _complexd, double complex)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _int16, int16_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _int32, int32_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _int64, int64_t, x)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _short, short, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _int, int, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _long, long, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _longlong, long long, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _float, float, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _double, double, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _longdouble, long double, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _complexf, float complex, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _complexd, double complex, shmem)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _int16, int16_t, shmemx)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_REDUCE_OP(prod, _int64, int64_t, shmemx)
|
||||
|
@ -22,8 +22,8 @@
|
||||
* contents of target. The operation must be completed without the possibility of another
|
||||
* process updating target between the time of the fetch and the update.
|
||||
*/
|
||||
#define SHMEM_TYPE_SWAP(type_name, type, ...) \
|
||||
type shmem##__VA_ARGS__##type_name##_swap(type *target, type value, int pe) \
|
||||
#define SHMEM_TYPE_SWAP(type_name, type, prefix) \
|
||||
type prefix##type_name##_swap(type *target, type value, int pe) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
size_t size = 0; \
|
||||
@ -59,11 +59,11 @@
|
||||
#include "oshmem/shmem/c/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_TYPE_SWAP(, long)
|
||||
SHMEM_TYPE_SWAP(_int, int)
|
||||
SHMEM_TYPE_SWAP(_long, long)
|
||||
SHMEM_TYPE_SWAP(_longlong, long long)
|
||||
SHMEM_TYPE_SWAP(_float, float)
|
||||
SHMEM_TYPE_SWAP(_double, double)
|
||||
SHMEM_TYPE_SWAP(_int32, int32_t, x)
|
||||
SHMEM_TYPE_SWAP(_int64, int64_t, x)
|
||||
SHMEM_TYPE_SWAP(, long, shmem)
|
||||
SHMEM_TYPE_SWAP(_int, int, shmem)
|
||||
SHMEM_TYPE_SWAP(_long, long, shmem)
|
||||
SHMEM_TYPE_SWAP(_longlong, long long, shmem)
|
||||
SHMEM_TYPE_SWAP(_float, float, shmem)
|
||||
SHMEM_TYPE_SWAP(_double, double, shmem)
|
||||
SHMEM_TYPE_SWAP(_int32, int32_t, shmemx)
|
||||
SHMEM_TYPE_SWAP(_int64, int64_t, shmemx)
|
||||
|
@ -21,8 +21,8 @@
|
||||
* A call to any shmem_wait() routine does not return until some other processor makes the
|
||||
* value at address var not equal to value.
|
||||
*/
|
||||
#define SHMEM_TYPE_WAIT(type_name, type, code, ...) \
|
||||
void shmem##__VA_ARGS__##type_name##_wait(type *addr, type value) \
|
||||
#define SHMEM_TYPE_WAIT(type_name, type, code, prefix) \
|
||||
void prefix##type_name##_wait(type *addr, type value) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
\
|
||||
@ -57,16 +57,16 @@
|
||||
#include "oshmem/shmem/c/profile/defines.h"
|
||||
#endif
|
||||
|
||||
SHMEM_TYPE_WAIT(, long, SHMEM_LONG)
|
||||
SHMEM_TYPE_WAIT(_short, short, SHMEM_SHORT)
|
||||
SHMEM_TYPE_WAIT(_int, int, SHMEM_INT)
|
||||
SHMEM_TYPE_WAIT(_long, long, SHMEM_LONG)
|
||||
SHMEM_TYPE_WAIT(_longlong, long long, SHMEM_LLONG)
|
||||
SHMEM_TYPE_WAIT(_int32, int32_t, SHMEM_INT32_T, x)
|
||||
SHMEM_TYPE_WAIT(_int64, int64_t, SHMEM_INT64_T, x)
|
||||
SHMEM_TYPE_WAIT(, long, SHMEM_LONG, shmem)
|
||||
SHMEM_TYPE_WAIT(_short, short, SHMEM_SHORT, shmem)
|
||||
SHMEM_TYPE_WAIT(_int, int, SHMEM_INT, shmem)
|
||||
SHMEM_TYPE_WAIT(_long, long, SHMEM_LONG, shmem)
|
||||
SHMEM_TYPE_WAIT(_longlong, long long, SHMEM_LLONG, shmem)
|
||||
SHMEM_TYPE_WAIT(_int32, int32_t, SHMEM_INT32_T, shmemx)
|
||||
SHMEM_TYPE_WAIT(_int64, int64_t, SHMEM_INT64_T, shmemx)
|
||||
|
||||
#define SHMEM_TYPE_WAIT_UNTIL(type_name, type, code, ...) \
|
||||
void shmem##__VA_ARGS__##type_name##_wait_until(type *addr, int cmp, type value) \
|
||||
#define SHMEM_TYPE_WAIT_UNTIL(type_name, type, code, prefix) \
|
||||
void prefix##type_name##_wait_until(type *addr, int cmp, type value) \
|
||||
{ \
|
||||
int rc = OSHMEM_SUCCESS; \
|
||||
\
|
||||
@ -82,10 +82,10 @@ SHMEM_TYPE_WAIT(_int64, int64_t, SHMEM_INT64_T, x)
|
||||
return ; \
|
||||
}
|
||||
|
||||
SHMEM_TYPE_WAIT_UNTIL(, long, SHMEM_LONG)
|
||||
SHMEM_TYPE_WAIT_UNTIL(_short, short, SHMEM_SHORT)
|
||||
SHMEM_TYPE_WAIT_UNTIL(_int, int, SHMEM_INT)
|
||||
SHMEM_TYPE_WAIT_UNTIL(_long, long, SHMEM_LONG)
|
||||
SHMEM_TYPE_WAIT_UNTIL(_longlong, long long, SHMEM_LLONG)
|
||||
SHMEM_TYPE_WAIT_UNTIL(_int32, int32_t, SHMEM_INT32_T, x)
|
||||
SHMEM_TYPE_WAIT_UNTIL(_int64, int64_t, SHMEM_INT64_T, x)
|
||||
SHMEM_TYPE_WAIT_UNTIL(, long, SHMEM_LONG, shmem)
|
||||
SHMEM_TYPE_WAIT_UNTIL(_short, short, SHMEM_SHORT, shmem)
|
||||
SHMEM_TYPE_WAIT_UNTIL(_int, int, SHMEM_INT, shmem)
|
||||
SHMEM_TYPE_WAIT_UNTIL(_long, long, SHMEM_LONG, shmem)
|
||||
SHMEM_TYPE_WAIT_UNTIL(_longlong, long long, SHMEM_LLONG, shmem)
|
||||
SHMEM_TYPE_WAIT_UNTIL(_int32, int32_t, SHMEM_INT32_T, shmemx)
|
||||
SHMEM_TYPE_WAIT_UNTIL(_int64, int64_t, SHMEM_INT64_T, shmemx)
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user