1 родитель
b43ef2b45b
Коммит
7f3dd33144
14 files changed
+52
-50
No files matched your search
@@ -430,11 +430,11 @@ __device__ void *roc_shmem_ptr(const void *dest, int pe) {
|
||||
}
|
||||
|
||||
template <typename T, ROC_SHMEM_OP Op>
|
||||
__device__ void roc_shmem_wg_to_all(roc_shmem_ctx_t ctx, roc_shmem_team_t team,
|
||||
T *dest, const T *source, int nreduce) {
|
||||
GPU_DPRINTF("Function: roc_shmem_to_all\n");
|
||||
__device__ int roc_shmem_wg_reduce(roc_shmem_ctx_t ctx, roc_shmem_team_t team,
|
||||
T *dest, const T *source, int nreduce) {
|
||||
GPU_DPRINTF("Function: roc_shmem_reduce\n");
|
||||
|
||||
get_internal_ctx(ctx)->to_all<T, Op>(team, dest, source, nreduce);
|
||||
return get_internal_ctx(ctx)->reduce<T, Op>(team, dest, source, nreduce);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@@ -864,7 +864,7 @@ __device__ int roc_shmem_team_translate_pe(roc_shmem_team_t src_team,
|
||||
* Template generator for reductions
|
||||
*/
|
||||
#define REDUCTION_GEN(T, Op) \
|
||||
template __device__ void roc_shmem_wg_to_all<T, Op>( \
|
||||
template __device__ int roc_shmem_wg_reduce<T, Op>( \
|
||||
roc_shmem_ctx_t ctx, roc_shmem_team_t team, T * dest, const T *source, \
|
||||
int nreduce);
|
||||
|
||||
@@ -1072,10 +1072,10 @@ __device__ int roc_shmem_team_translate_pe(roc_shmem_team_t src_team,
|
||||
**/
|
||||
|
||||
#define REDUCTION_DEF_GEN(T, TNAME, Op_API, Op) \
|
||||
__device__ void roc_shmem_ctx_##TNAME##_##Op_API##_wg_to_all( \
|
||||
__device__ int roc_shmem_ctx_##TNAME##_##Op_API##_wg_reduce( \
|
||||
roc_shmem_ctx_t ctx, roc_shmem_team_t team, T *dest, const T *source, \
|
||||
int nreduce) { \
|
||||
roc_shmem_wg_to_all<T, Op>(ctx, team, dest, source, nreduce); \
|
||||
return roc_shmem_wg_reduce<T, Op>(ctx, team, dest, source, nreduce); \
|
||||
}
|
||||
|
||||
#define ARITH_REDUCTION_DEF_GEN(T, TNAME) \
|
||||
|
||||
Reference in new issue
Block a user