void shmem_char_put(char *dest, const char *source, size_t nelems, int pe) { long completion = 0; SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_put_nb(dest, source, sizeof(char)*nelems, pe, &completion); shmem_internal_put_wait(&completion); }
void shmemx_putmem_ct(shmemx_ct_t ct, void *target, const void *source, size_t len, int pe) { long completion = 0; SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_put_ct_nb(ct, target, source, len, pe, &completion); shmem_internal_put_wait(&completion); }
void shmem_long_put(long *target, const long *source, size_t len, int pe) { long completion = 0; SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_put_nb(target, source, sizeof(long) * len, pe, &completion); shmem_internal_put_wait(&completion); }
void shmem_complexf_sum_to_all(float complex *target, float complex *source, int nreduce, int PE_start, int logPE_stride, int PE_size, float complex *pWrk, long *pSync) { SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_op_to_all(target, source, nreduce, sizeof(float complex), PE_start, logPE_stride, PE_size, pWrk, pSync, SHM_INTERNAL_SUM, SHM_INTERNAL_FLOAT_COMPLEX); }
void shmem_free(void *ptr) { SHMEM_ERR_CHECK_INITIALIZED(); SHMEM_MUTEX_LOCK(shmem_internal_mutex_alloc); dlfree(ptr); SHMEM_MUTEX_UNLOCK(shmem_internal_mutex_alloc); shmem_internal_barrier_all(); }
int shmem_int_g(const int *addr, int pe) { int tmp = 0; SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_get(&tmp, addr, sizeof(tmp), pe); shmem_internal_get_wait(); return tmp; }
long long shmem_longlong_g(const long long *addr, int pe) { long long tmp = 0; SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_get(&tmp, addr, sizeof(tmp), pe); shmem_internal_get_wait(); return tmp; }
char shmem_char_g(const char *addr, int pe) { char tmp = 0; SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_get(&tmp, addr, sizeof(tmp), pe); shmem_internal_get_wait(); return tmp; }
void shmem_float_prod_to_all(float *target, float *source, int nreduce, int PE_start, int logPE_stride, int PE_size, float *pWrk, long *pSync) { SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_op_to_all(target, source, nreduce, sizeof(float), PE_start, logPE_stride, PE_size, pWrk, pSync, SHM_INTERNAL_PROD, SHM_INTERNAL_FLOAT); }
void FC_SHMEM_INT8_WAIT_UNTIL(volatile int64_t *var, fortran_integer_t *cond, int64_t *value) { SHMEM_ERR_CHECK_INITIALIZED(); SHMEM_ERR_CHECK_SYMMETRIC(var, 8); SHMEM_ERR_CHECK_CMP_OP(*cond); SHMEM_WAIT_UNTIL(var, *cond, *value); }
double shmem_double_g(const double *addr, int pe) { double tmp = 0.0; SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_get(&tmp, addr, sizeof(tmp), pe); shmem_internal_get_wait(); return tmp; }
void shmem_complexd_prod_to_all(double complex *target, double complex *source, int nreduce, int PE_start, int logPE_stride, int PE_size, double complex *pWrk, long *pSync) { SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_op_to_all(target, source, nreduce, sizeof(double complex), PE_start, logPE_stride, PE_size, pWrk, pSync, SHM_INTERNAL_PROD, SHM_INTERNAL_DOUBLE_COMPLEX); }
void FC_SHMEM_WAIT_UNTIL(volatile fortran_integer_t *var, fortran_integer_t *cond, fortran_integer_t *value) { SHMEM_ERR_CHECK_INITIALIZED(); SHMEM_ERR_CHECK_SYMMETRIC(var, SIZEOF_FORTRAN_INTEGER); SHMEM_ERR_CHECK_CMP_OP(*cond); SHMEM_WAIT_UNTIL(var, *cond, *value); }
void shmem_int_sum_to_all(int *target, int *source, int nreduce, int PE_start, int logPE_stride, int PE_size, int *pWrk, long *pSync) { SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_op_to_all(target, source, nreduce, sizeof(int), PE_start, logPE_stride, PE_size, pWrk, pSync, SHM_INTERNAL_SUM, DTYPE_INT); }
void shmem_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) { SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_op_to_all(target, source, nreduce, sizeof(long double), PE_start, logPE_stride, PE_size, pWrk, pSync, SHM_INTERNAL_SUM, SHM_INTERNAL_LONG_DOUBLE); }
void shmem_double_max_to_all(double *target, double *source, int nreduce, int PE_start, int logPE_stride, int PE_size, double *pWrk, long *pSync) { SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_op_to_all(target, source, nreduce, sizeof(double), PE_start, logPE_stride, PE_size, pWrk, pSync, SHM_INTERNAL_MAX, SHM_INTERNAL_DOUBLE); }
void FC_SHMEM_LOGICAL_PUT(void *target, void *source, fortran_integer_t *len, fortran_integer_t *pe) { long completion = 0; SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_put_nb(target, source, SIZEOF_FORTRAN_LOGICAL * *len, *pe, &completion); shmem_internal_put_wait(&completion); }
void FC_SHMEM_INT8_INC(int64_t *target, fortran_integer_t *pe) { int64_t tmp = 1; SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_atomic_small(target, &tmp, 8, *pe, SHM_INTERNAL_SUM, SHM_INTERNAL_INT64); }
void shmem_short_prod_to_all(short *target, short *source, int nreduce, int PE_start, int logPE_stride, int PE_size, short *pWrk, long *pSync) { SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_op_to_all(target, source, nreduce, sizeof(short), PE_start, logPE_stride, PE_size, pWrk, pSync, SHM_INTERNAL_PROD, DTYPE_SHORT); }
void shmem_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) { SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_op_to_all(target, source, nreduce, sizeof(long long), PE_start, logPE_stride, PE_size, pWrk, pSync, SHM_INTERNAL_PROD, DTYPE_LONG); }
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) { SHMEM_ERR_CHECK_INITIALIZED(); shmem_internal_bcast(target, source, nlong * 8, PE_root, PE_start, logPE_stride, PE_size, pSync, 1); }
void shmem_int_prod_to_all(int *target, const int *source, int nreduce, int PE_start, int logPE_stride, int PE_size, int *pWrk, long *pSync) { SHMEM_ERR_CHECK_INITIALIZED(); SHMEM_ERR_CHECK_ACTIVE_SET(PE_start, logPE_stride, PE_size); shmem_internal_op_to_all(target, source, nreduce, sizeof(int), PE_start, logPE_stride, PE_size, pWrk, pSync, SHM_INTERNAL_PROD, SHM_INTERNAL_INT); }
void shmem_longlong_sum_to_all(long long *target, const long long *source, int nreduce, int PE_start, int logPE_stride, int PE_size, long long *pWrk, long *pSync) { SHMEM_ERR_CHECK_INITIALIZED(); SHMEM_ERR_CHECK_ACTIVE_SET(PE_start, logPE_stride, PE_size); shmem_internal_op_to_all(target, source, nreduce, sizeof(long long), PE_start, logPE_stride, PE_size, pWrk, pSync, SHM_INTERNAL_SUM, SHM_INTERNAL_LONG); }
void shmem_short_sum_to_all(short *target, const short *source, int nreduce, int PE_start, int logPE_stride, int PE_size, short *pWrk, long *pSync) { SHMEM_ERR_CHECK_INITIALIZED(); SHMEM_ERR_CHECK_ACTIVE_SET(PE_start, logPE_stride, PE_size); shmem_internal_op_to_all(target, source, nreduce, sizeof(short), PE_start, logPE_stride, PE_size, pWrk, pSync, SHM_INTERNAL_SUM, SHM_INTERNAL_SHORT); }
void shmem_double_sum_to_all(double *target, const double *source, int nreduce, int PE_start, int logPE_stride, int PE_size, double *pWrk, long *pSync) { SHMEM_ERR_CHECK_INITIALIZED(); SHMEM_ERR_CHECK_ACTIVE_SET(PE_start, logPE_stride, PE_size); shmem_internal_op_to_all(target, source, nreduce, sizeof(double), PE_start, logPE_stride, PE_size, pWrk, pSync, SHM_INTERNAL_SUM, SHM_INTERNAL_DOUBLE); }
void shmem_float_max_to_all(float *target, const float *source, int nreduce, int PE_start, int logPE_stride, int PE_size, float *pWrk, long *pSync) { SHMEM_ERR_CHECK_INITIALIZED(); SHMEM_ERR_CHECK_ACTIVE_SET(PE_start, logPE_stride, PE_size); shmem_internal_op_to_all(target, source, nreduce, sizeof(float), PE_start, logPE_stride, PE_size, pWrk, pSync, SHM_INTERNAL_MAX, SHM_INTERNAL_FLOAT); }
void FC_SHMEM_INFO_GET_NAME(char *name, int32_t name_len) { size_t len = sizeof(SHMEM_VENDOR_STRING) - 1; /* Length without NULL terminator */ SHMEM_ERR_CHECK_INITIALIZED(); strncpy(name, SHMEM_VENDOR_STRING, SHMEM_MAX_NAME_LEN); /* Drop NULL terminator and fill with whitespace */ memset(&name[len], ' ', SHMEM_MAX_NAME_LEN - len); }
void shmem_iput32(void *target, const void *source, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { SHMEM_ERR_CHECK_INITIALIZED(); for ( ; len > 0 ; --len) { shmem_internal_put_small(target, source, sizeof(uint32_t), pe); target = (uint32_t*)target + tst; source = (uint32_t*)source + sst; } }
void shmem_iget64(void *target, const void *source, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { SHMEM_ERR_CHECK_INITIALIZED(); for ( ; len > 0 ; --len ) { shmem_internal_get(target, source, sizeof(uint64_t), pe); target = (uint64_t*)target + tst; source = (uint64_t*)source + sst; } shmem_internal_get_wait(); }
void shmem_longlong_iget(long long *target, const long long *source, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe) { SHMEM_ERR_CHECK_INITIALIZED(); for ( ; len > 0 ; --len ) { shmem_internal_get(target, source, sizeof(long long), pe); target += tst; source += sst; } shmem_internal_get_wait(); }