From db44e23f72da1b8f332f549bd0af68f1eed9280a Mon Sep 17 00:00:00 2001 From: Mike Dubman Date: Tue, 8 Apr 2014 10:48:10 +0000 Subject: [PATCH] OSHMEM: fix profiling API compilation Refs trac:4495 This commit was SVN r31334. The following Trac tickets were found above: Ticket 4495 --> https://svn.open-mpi.org/trac/ompi/ticket/4495 --- oshmem/include/shmem.h.in | 339 ++++++++++++++++++++++++++++++---- oshmem/shmem/c/shmem_reduce.c | 12 +- 2 files changed, 305 insertions(+), 46 deletions(-) diff --git a/oshmem/include/shmem.h.in b/oshmem/include/shmem.h.in index 7897d3b33a..20bad6182c 100644 --- a/oshmem/include/shmem.h.in +++ b/oshmem/include/shmem.h.in @@ -20,7 +20,7 @@ # define OSHMEM_COMPLEX_TYPE(type) std::complex #else # include -# define OSHMEM_COMPLEX_TYPE(type) type complex +# define OSHMEM_COMPLEX_TYPE(type) type complex #endif @@ -57,12 +57,12 @@ extern "C" { * OpenSHMEM API (www.openshmem.org) */ -/* - * Environment variables +/* + * Environment variables */ -/* size of symmetric heap in bytes. - * Can be qualified with the letter 'K', 'M', 'G' or 'T' +/* size of symmetric heap in bytes. + * Can be qualified with the letter 'K', 'M', 'G' or 'T' */ #define SHMEM_HEAP_SIZE "SHMEM_SYMMETRIC_HEAP_SIZE" @@ -73,7 +73,7 @@ extern "C" { */ #define SHMEM_HEAP_TYPE "SHMEM_SYMMETRIC_HEAP_ALLOCATOR" -/* +/* * Constants and definitions */ enum shmem_wait_ops { @@ -100,40 +100,40 @@ enum shmem_wait_ops { #define SHMEM_SYNC_VALUE _SHMEM_SYNC_VALUE -/* - * Initialization routines +/* + * Initialization routines */ OSHMEM_DECLSPEC void start_pes(int npes); -/* - * Query routines +/* + * Query routines */ OSHMEM_DECLSPEC int _num_pes(void); OSHMEM_DECLSPEC int _my_pe(void); -/* - * Accessability routines +/* + * Accessability routines */ OSHMEM_DECLSPEC int shmem_pe_accessible(int pe); OSHMEM_DECLSPEC int shmem_addr_accessible(void *addr, int pe); -/* - * Symmetric heap routines +/* + * Symmetric heap routines */ OSHMEM_DECLSPEC void* shmalloc(size_t size); OSHMEM_DECLSPEC void* shmemalign(size_t align, size_t size); OSHMEM_DECLSPEC void* shrealloc(void *ptr, size_t size); OSHMEM_DECLSPEC void shfree(void* ptr); -/* - * Remote pointer operations +/* + * Remote pointer operations */ OSHMEM_DECLSPEC void *shmem_ptr(void *ptr, int pe); -/* - * Elemental put routines +/* + * Elemental put routines */ OSHMEM_DECLSPEC void shmem_short_p(short* addr, short value, int pe); OSHMEM_DECLSPEC void shmem_int_p(int* addr, int value, int pe); @@ -143,8 +143,8 @@ OSHMEM_DECLSPEC void shmem_double_p(double* addr, double value, int pe); OSHMEM_DECLSPEC void shmem_longlong_p(long long* addr, long long value, int pe); OSHMEM_DECLSPEC void shmem_longdouble_p(long double* addr, long double value, int pe); -/* - * Block data put routines +/* + * Block data put routines */ OSHMEM_DECLSPEC void shmem_char_put(char *target, const char *source, size_t len, int pe); OSHMEM_DECLSPEC void shmem_short_put(short *target, const short *source, size_t len, int pe); @@ -159,8 +159,8 @@ OSHMEM_DECLSPEC void shmem_put64(void *target, const void *source, size_t len, OSHMEM_DECLSPEC void shmem_put128(void *target, const void *source, size_t len, int pe); OSHMEM_DECLSPEC void shmem_putmem(void *target, const void *source, size_t len, int pe); -/* - * Strided put routines +/* + * Strided put routines */ OSHMEM_DECLSPEC void shmem_int_iput(int* target, const int* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); OSHMEM_DECLSPEC void shmem_short_iput(short* target, const short* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); @@ -173,8 +173,8 @@ OSHMEM_DECLSPEC void shmem_iput32(void* target, const void* source, ptrdiff_t ts OSHMEM_DECLSPEC void shmem_iput64(void* target, const void* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); OSHMEM_DECLSPEC void shmem_iput128(void* target, const void* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); -/* - * Elemental get routines +/* + * Elemental get routines */ OSHMEM_DECLSPEC short shmem_short_g(short* addr, int pe); OSHMEM_DECLSPEC int shmem_int_g(int* addr, int pe); @@ -184,8 +184,8 @@ OSHMEM_DECLSPEC double shmem_double_g(double* addr, int pe); OSHMEM_DECLSPEC long long shmem_longlong_g(long long* addr, int pe); OSHMEM_DECLSPEC long double shmem_longdouble_g(long double* addr, int pe); -/* - * Block data get routines +/* + * Block data get routines */ OSHMEM_DECLSPEC void shmem_char_get(char *target, const char *source, size_t len, int pe); OSHMEM_DECLSPEC void shmem_short_get(short *target, const short *source, size_t len, int pe); @@ -200,8 +200,8 @@ OSHMEM_DECLSPEC void shmem_get64(void *target, const void *source, size_t len, OSHMEM_DECLSPEC void shmem_get128(void *target, const void *source, size_t len, int pe); OSHMEM_DECLSPEC void shmem_getmem(void *target, const void *source, size_t len, int pe); -/* - * Strided get routines +/* + * Strided get routines */ OSHMEM_DECLSPEC void shmem_int_iget(int* target, const int* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); OSHMEM_DECLSPEC void shmem_short_iget(short* target, const short* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); @@ -214,8 +214,8 @@ OSHMEM_DECLSPEC void shmem_iget32(void* target, const void* source, ptrdiff_t ts OSHMEM_DECLSPEC void shmem_iget64(void* target, const void* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); OSHMEM_DECLSPEC void shmem_iget128(void* target, const void* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); -/* - * Atomic operations +/* + * Atomic operations */ /* Atomic swap */ OSHMEM_DECLSPEC long shmem_swap(long *target, long value, int pe); @@ -250,15 +250,15 @@ OSHMEM_DECLSPEC void shmem_int_inc(int *target, int pe); OSHMEM_DECLSPEC void shmem_long_inc(long *target, int pe); OSHMEM_DECLSPEC void shmem_longlong_inc(long long *target, int pe); -/* - * Lock functions +/* + * Lock functions */ OSHMEM_DECLSPEC void shmem_set_lock(long *lock); OSHMEM_DECLSPEC void shmem_clear_lock(long *lock); OSHMEM_DECLSPEC int shmem_test_lock(long *lock); -/* - * P2P sync routines +/* + * P2P sync routines */ OSHMEM_DECLSPEC void shmem_short_wait(short *addr, short value); OSHMEM_DECLSPEC void shmem_int_wait(int *addr, int value); @@ -272,16 +272,16 @@ OSHMEM_DECLSPEC void shmem_long_wait_until(long *addr, int cmp, long value); OSHMEM_DECLSPEC void shmem_longlong_wait_until(long long *addr, int cmp, long long value); OSHMEM_DECLSPEC void shmem_wait_until(long *addr, int cmp, long value); -/* - * Barrier sync routines +/* + * Barrier sync routines */ OSHMEM_DECLSPEC void shmem_barrier(int PE_start, int logPE_stride, int PE_size, long *pSync); OSHMEM_DECLSPEC void shmem_barrier_all(void); OSHMEM_DECLSPEC void shmem_fence(void); OSHMEM_DECLSPEC void shmem_quiet(void); -/* - * Collective routines +/* + * Collective routines */ OSHMEM_DECLSPEC void shmem_broadcast32(void *target, const void *source, size_t nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long *pSync); OSHMEM_DECLSPEC void shmem_broadcast64(void *target, const void *source, size_t nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long *pSync); @@ -291,8 +291,8 @@ OSHMEM_DECLSPEC void shmem_collect64(void *target, const void *source, size_t nl OSHMEM_DECLSPEC void shmem_fcollect32(void *target, const void *source, size_t nlong, int PE_start, int logPE_stride, int PE_size, long *pSync); OSHMEM_DECLSPEC void shmem_fcollect64(void *target, const void *source, size_t nlong, int PE_start, int logPE_stride, int PE_size, long *pSync); -/* - * Reduction routines +/* + * Reduction routines */ OSHMEM_DECLSPEC void shmem_short_and_to_all(short *target, short *source, int nreduce, int PE_start, int logPE_stride, int PE_size, short *pWrk, long *pSync); OSHMEM_DECLSPEC void shmem_int_and_to_all(int *target, int *source, int nreduce, int PE_start, int logPE_stride, int PE_size, int *pWrk, long *pSync); @@ -355,6 +355,265 @@ OSHMEM_DECLSPEC void shmem_set_cache_line_inv(void* target); OSHMEM_DECLSPEC void shmem_clear_cache_inv(void); OSHMEM_DECLSPEC void shmem_clear_cache_line_inv(void* target); +/* + * Profiling API + */ + +/* + * Initialization routines + */ +OSHMEM_DECLSPEC void pstart_pes(int npes); + + +/* + * Query routines + */ +OSHMEM_DECLSPEC int p_num_pes(void); +OSHMEM_DECLSPEC int p_my_pe(void); + + +/* + * Accessability routines + */ +OSHMEM_DECLSPEC int pshmem_pe_accessible(int pe); +OSHMEM_DECLSPEC int pshmem_addr_accessible(void *addr, int pe); + +/* + * Symmetric heap routines + */ +OSHMEM_DECLSPEC void* pshmalloc(size_t size); +OSHMEM_DECLSPEC void* pshmemalign(size_t align, size_t size); +OSHMEM_DECLSPEC void* pshrealloc(void *ptr, size_t size); +OSHMEM_DECLSPEC void pshfree(void* ptr); + +/* + * Remote pointer operations + */ +OSHMEM_DECLSPEC void *pshmem_ptr(void *ptr, int pe); + +/* + * Elemental put routines + */ +OSHMEM_DECLSPEC void pshmem_short_p(short* addr, short value, int pe); +OSHMEM_DECLSPEC void pshmem_int_p(int* addr, int value, int pe); +OSHMEM_DECLSPEC void pshmem_long_p(long* addr, long value, int pe); +OSHMEM_DECLSPEC void pshmem_float_p(float* addr, float value, int pe); +OSHMEM_DECLSPEC void pshmem_double_p(double* addr, double value, int pe); +OSHMEM_DECLSPEC void pshmem_longlong_p(long long* addr, long long value, int pe); +OSHMEM_DECLSPEC void pshmem_longdouble_p(long double* addr, long double value, int pe); + +/* + * Block data put routines + */ +OSHMEM_DECLSPEC void pshmem_char_put(char *target, const char *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_short_put(short *target, const short *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_int_put(int* target, const int* source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_long_put(long *target, const long *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_float_put(float *target, const float *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_double_put(double *target, const double *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_longlong_put(long long *target, const long long *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_longdouble_put(long double *target, const long double *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_put32(void *target, const void *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_put64(void *target, const void *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_put128(void *target, const void *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_putmem(void *target, const void *source, size_t len, int pe); + +/* + * Strided put routines + */ +OSHMEM_DECLSPEC void pshmem_int_iput(int* target, const int* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_short_iput(short* target, const short* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_float_iput(float* target, const float* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_double_iput(double* target, const double* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_longlong_iput(long long* target, const long long* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_longdouble_iput(long double* target, const long double* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_long_iput(long* target, const long* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_iput32(void* target, const void* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_iput64(void* target, const void* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_iput128(void* target, const void* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); + +/* + * Elemental get routines + */ +OSHMEM_DECLSPEC short pshmem_short_g(short* addr, int pe); +OSHMEM_DECLSPEC int pshmem_int_g(int* addr, int pe); +OSHMEM_DECLSPEC long pshmem_long_g(long* addr, int pe); +OSHMEM_DECLSPEC float pshmem_float_g(float* addr, int pe); +OSHMEM_DECLSPEC double pshmem_double_g(double* addr, int pe); +OSHMEM_DECLSPEC long long pshmem_longlong_g(long long* addr, int pe); +OSHMEM_DECLSPEC long double pshmem_longdouble_g(long double* addr, int pe); + +/* + * Block data get routines + */ +OSHMEM_DECLSPEC void pshmem_char_get(char *target, const char *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_short_get(short *target, const short *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_int_get(int *target, const int *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_long_get(long *target, const long *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_float_get(float *target, const float *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_double_get(double *target, const double *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_longlong_get(long long *target, const long long *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_longdouble_get(long double *target, const long double *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_get32(void *target, const void *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_get64(void *target, const void *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_get128(void *target, const void *source, size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_getmem(void *target, const void *source, size_t len, int pe); + +/* + * Strided get routines + */ +OSHMEM_DECLSPEC void pshmem_int_iget(int* target, const int* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_short_iget(short* target, const short* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_float_iget(float* target, const float* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_double_iget(double* target, const double* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_longlong_iget(long long* target, const long long* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_longdouble_iget(long double* target, const long double* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_long_iget(long* target, const long* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_iget32(void* target, const void* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_iget64(void* target, const void* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); +OSHMEM_DECLSPEC void pshmem_iget128(void* target, const void* source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe); + +/* + * Atomic operations + */ +/* Atomic swap */ +OSHMEM_DECLSPEC long pshmem_swap(long *target, long value, int pe); +OSHMEM_DECLSPEC double pshmem_double_swap(double *target, double value, int pe); +OSHMEM_DECLSPEC float pshmem_float_swap(float *target, float value, int pe); +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 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); +OSHMEM_DECLSPEC long long pshmem_longlong_cswap(long long *target, long long cond, long long value, int pe); + +/* Atomic Fetch&Add */ +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&Inc */ +OSHMEM_DECLSPEC int pshmem_int_finc(int *target, int pe); +OSHMEM_DECLSPEC long pshmem_long_finc(long *target, int pe); +OSHMEM_DECLSPEC long long pshmem_longlong_finc(long long *target, int pe); + +/* Atomic Add*/ +OSHMEM_DECLSPEC void pshmem_int_add(int *target, int value, int pe); +OSHMEM_DECLSPEC void pshmem_long_add(long *target, long value, int pe); +OSHMEM_DECLSPEC void pshmem_longlong_add(long long *target, long long value, int pe); + +/* Atomic Inc */ +OSHMEM_DECLSPEC void pshmem_int_inc(int *target, int pe); +OSHMEM_DECLSPEC void pshmem_long_inc(long *target, int pe); +OSHMEM_DECLSPEC void pshmem_longlong_inc(long long *target, int pe); + +/* + * Lock functions + */ +OSHMEM_DECLSPEC void pshmem_set_lock(long *lock); +OSHMEM_DECLSPEC void pshmem_clear_lock(long *lock); +OSHMEM_DECLSPEC int pshmem_test_lock(long *lock); + +/* + * P2P sync routines + */ +OSHMEM_DECLSPEC void pshmem_short_wait(short *addr, short value); +OSHMEM_DECLSPEC void pshmem_int_wait(int *addr, int value); +OSHMEM_DECLSPEC void pshmem_long_wait(long *addr, long value); +OSHMEM_DECLSPEC void pshmem_longlong_wait(long long *addr, long long value); +OSHMEM_DECLSPEC void pshmem_wait(long *addr, long value); + +OSHMEM_DECLSPEC void pshmem_short_wait_until(short *addr, int cmp, short value); +OSHMEM_DECLSPEC void pshmem_int_wait_until(int *addr, int cmp, int value); +OSHMEM_DECLSPEC void pshmem_long_wait_until(long *addr, int cmp, long value); +OSHMEM_DECLSPEC void pshmem_longlong_wait_until(long long *addr, int cmp, long long value); +OSHMEM_DECLSPEC void pshmem_wait_until(long *addr, int cmp, long value); + +/* + * Barrier sync routines + */ +OSHMEM_DECLSPEC void pshmem_barrier(int PE_start, int logPE_stride, int PE_size, long *pSync); +OSHMEM_DECLSPEC void pshmem_barrier_all(void); +OSHMEM_DECLSPEC void pshmem_fence(void); +OSHMEM_DECLSPEC void pshmem_quiet(void); + +/* + * Collective routines + */ +OSHMEM_DECLSPEC void pshmem_broadcast32(void *target, const void *source, size_t nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long *pSync); +OSHMEM_DECLSPEC void pshmem_broadcast64(void *target, const void *source, size_t nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long *pSync); +OSHMEM_DECLSPEC void pshmem_broadcast(void *target, const void *source, size_t nlong, int PE_root, int PE_start, int logPE_stride, int PE_size, long *pSync); +OSHMEM_DECLSPEC void pshmem_collect32(void *target, const void *source, size_t nlong, int PE_start, int logPE_stride, int PE_size, long *pSync); +OSHMEM_DECLSPEC void pshmem_collect64(void *target, const void *source, size_t nlong, int PE_start, int logPE_stride, int PE_size, long *pSync); +OSHMEM_DECLSPEC void pshmem_fcollect32(void *target, const void *source, size_t nlong, int PE_start, int logPE_stride, int PE_size, long *pSync); +OSHMEM_DECLSPEC void pshmem_fcollect64(void *target, const void *source, size_t nlong, int PE_start, int logPE_stride, int PE_size, long *pSync); + +/* + * Reduction routines + */ +OSHMEM_DECLSPEC void pshmem_short_and_to_all(short *target, short *source, int nreduce, int PE_start, int logPE_stride, int PE_size, short *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_int_and_to_all(int *target, int *source, int nreduce, int PE_start, int logPE_stride, int PE_size, int *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_long_and_to_all(long *target, long *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_longlong_and_to_all(long long *target, long long *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long *pWrk, long *pSync); + +OSHMEM_DECLSPEC void pshmem_short_or_to_all(short *target, short *source, int nreduce, int PE_start, int logPE_stride, int PE_size, short *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_int_or_to_all(int *target, int *source, int nreduce, int PE_start, int logPE_stride, int PE_size, int *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_long_or_to_all(long *target, long *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_longlong_or_to_all(long long *target, long long *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long *pWrk, long *pSync); + +OSHMEM_DECLSPEC void pshmem_short_xor_to_all(short *target, short *source, int nreduce, int PE_start, int logPE_stride, int PE_size, short *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_int_xor_to_all(int *target, int *source, int nreduce, int PE_start, int logPE_stride, int PE_size, int *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_long_xor_to_all(long *target, long *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_longlong_xor_to_all(long long *target, long long *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long *pWrk, long *pSync); + +OSHMEM_DECLSPEC void pshmem_short_max_to_all(short *target, short *source, int nreduce, int PE_start, int logPE_stride, int PE_size, short *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_int_max_to_all(int *target, int *source, int nreduce, int PE_start, int logPE_stride, int PE_size, int *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_long_max_to_all(long *target, long *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_longlong_max_to_all(long long *target, long long *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_float_max_to_all(float *target, float *source, int nreduce, int PE_start, int logPE_stride, int PE_size, float *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_double_max_to_all(double *target, double *source, int nreduce, int PE_start, int logPE_stride, int PE_size, double *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_longdouble_max_to_all(long double *target, long double *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double *pWrk, long *pSync); + +OSHMEM_DECLSPEC void pshmem_short_min_to_all(short *target, short *source, int nreduce, int PE_start, int logPE_stride, int PE_size, short *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_int_min_to_all(int *target, int *source, int nreduce, int PE_start, int logPE_stride, int PE_size, int *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_long_min_to_all(long *target, long *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_longlong_min_to_all(long long *target, long long *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_float_min_to_all(float *target, float *source, int nreduce, int PE_start, int logPE_stride, int PE_size, float *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_double_min_to_all(double *target, double *source, int nreduce, int PE_start, int logPE_stride, int PE_size, double *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_longdouble_min_to_all(long double *target, long double *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double *pWrk, long *pSync); + +OSHMEM_DECLSPEC void pshmem_short_sum_to_all(short *target, short *source, int nreduce, int PE_start, int logPE_stride, int PE_size, short *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_int_sum_to_all(int *target, int *source, int nreduce, int PE_start, int logPE_stride, int PE_size, int *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_long_sum_to_all(long *target, long *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_longlong_sum_to_all(long long *target, long long *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_float_sum_to_all(float *target, float *source, int nreduce, int PE_start, int logPE_stride, int PE_size, float *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_double_sum_to_all(double *target, double *source, int nreduce, int PE_start, int logPE_stride, int PE_size, double *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_longdouble_sum_to_all(long double *target, long double *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_complexf_sum_to_all(OSHMEM_COMPLEX_TYPE(float) *target, OSHMEM_COMPLEX_TYPE(float) *source, int nreduce, int PE_start, int logPE_stride, int PE_size, OSHMEM_COMPLEX_TYPE(float) *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_complexd_sum_to_all(OSHMEM_COMPLEX_TYPE(double) *target, OSHMEM_COMPLEX_TYPE(double) *source, int nreduce, int PE_start, int logPE_stride, int PE_size, OSHMEM_COMPLEX_TYPE(double) *pWrk, long *pSync); + +OSHMEM_DECLSPEC void pshmem_short_prod_to_all(short *target, short *source, int nreduce, int PE_start, int logPE_stride, int PE_size, short *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_int_prod_to_all(int *target, int *source, int nreduce, int PE_start, int logPE_stride, int PE_size, int *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_long_prod_to_all(long *target, long *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_longlong_prod_to_all(long long *target, long long *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_float_prod_to_all(float *target, float *source, int nreduce, int PE_start, int logPE_stride, int PE_size, float *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_double_prod_to_all(double *target, double *source, int nreduce, int PE_start, int logPE_stride, int PE_size, double *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_longdouble_prod_to_all(long double *target, long double *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long double *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_complexf_prod_to_all(OSHMEM_COMPLEX_TYPE(float) *target, OSHMEM_COMPLEX_TYPE(float) *source, int nreduce, int PE_start, int logPE_stride, int PE_size, OSHMEM_COMPLEX_TYPE(float) *pWrk, long *pSync); +OSHMEM_DECLSPEC void pshmem_complexd_prod_to_all(OSHMEM_COMPLEX_TYPE(double) *target, OSHMEM_COMPLEX_TYPE(double) *source, int nreduce, int PE_start, int logPE_stride, int PE_size, OSHMEM_COMPLEX_TYPE(double) *pWrk, long *pSync); + +/* + * Platform specific cache management routines + */ +OSHMEM_DECLSPEC void pshmem_udcflush(void); +OSHMEM_DECLSPEC void pshmem_udcflush_line(void* target); +OSHMEM_DECLSPEC void pshmem_set_cache_inv(void); +OSHMEM_DECLSPEC void pshmem_set_cache_line_inv(void* target); +OSHMEM_DECLSPEC void pshmem_clear_cache_inv(void); +OSHMEM_DECLSPEC void pshmem_clear_cache_line_inv(void* target); + /* * Legacy API */ diff --git a/oshmem/shmem/c/shmem_reduce.c b/oshmem/shmem/c/shmem_reduce.c index 561c012132..2f1bfb57ba 100644 --- a/oshmem/shmem/c/shmem_reduce.c +++ b/oshmem/shmem/c/shmem_reduce.c @@ -100,17 +100,17 @@ static bool __group_cache_enabled = true; #pragma weak shmem_int_and_to_all = pshmem_int_and_to_all #pragma weak shmem_long_and_to_all = pshmem_long_and_to_all #pragma weak shmem_longlong_and_to_all = pshmem_longlong_and_to_all -#pragma weak + #pragma weak shmem_short_or_to_all = pshmem_short_or_to_all #pragma weak shmem_int_or_to_all = pshmem_int_or_to_all #pragma weak shmem_long_or_to_all = pshmem_long_or_to_all #pragma weak shmem_longlong_or_to_all = pshmem_longlong_or_to_all -#pragma weak + #pragma weak shmem_short_xor_to_all = pshmem_short_xor_to_all #pragma weak shmem_int_xor_to_all = pshmem_int_xor_to_all #pragma weak shmem_long_xor_to_all = pshmem_long_xor_to_all #pragma weak shmem_longlong_xor_to_all = pshmem_longlong_xor_to_all -#pragma weak + #pragma weak shmem_short_max_to_all = pshmem_short_max_to_all #pragma weak shmem_int_max_to_all = pshmem_int_max_to_all #pragma weak shmem_long_max_to_all = pshmem_long_max_to_all @@ -118,7 +118,7 @@ static bool __group_cache_enabled = true; #pragma weak shmem_float_max_to_all = pshmem_float_max_to_all #pragma weak shmem_double_max_to_all = pshmem_double_max_to_all #pragma weak shmem_longdouble_max_to_all= pshmem_longdouble_max_to_all -#pragma weak + #pragma weak shmem_short_min_to_all = pshmem_short_min_to_all #pragma weak shmem_int_min_to_all = pshmem_int_min_to_all #pragma weak shmem_long_min_to_all = pshmem_long_min_to_all @@ -126,7 +126,7 @@ static bool __group_cache_enabled = true; #pragma weak shmem_float_min_to_all = pshmem_float_min_to_all #pragma weak shmem_double_min_to_all = pshmem_double_min_to_all #pragma weak shmem_longdouble_min_to_all= pshmem_longdouble_min_to_all -#pragma weak + #pragma weak shmem_short_sum_to_all = pshmem_short_sum_to_all #pragma weak shmem_int_sum_to_all = pshmem_int_sum_to_all #pragma weak shmem_long_sum_to_all = pshmem_long_sum_to_all @@ -136,7 +136,7 @@ static bool __group_cache_enabled = true; #pragma weak shmem_longdouble_sum_to_all= pshmem_longdouble_sum_to_all #pragma weak shmem_complexf_sum_to_all = pshmem_complexf_sum_to_all #pragma weak shmem_complexd_sum_to_all = pshmem_complexd_sum_to_all -#pragma weak + #pragma weak shmem_short_prod_to_all = pshmem_short_prod_to_all #pragma weak shmem_int_prod_to_all = pshmem_int_prod_to_all #pragma weak shmem_long_prod_to_all = pshmem_long_prod_to_all