Closed gmegan closed 5 years ago
I noticed the other day that the existing SHMEM reductions use the signed integer type int
for the number of reduction elements nreduce
. This seemed odd to me, given that SHMEM takes size_t
-typed counts for every other comparable argument (e.g., nelems
or nbytes
).
Does anyone know of any historical basis for this choice of type? (@bcernohous, maybe?) Do we want to switch to size_t
for the new team-based reductions?
I noticed the other day that the existing SHMEM reductions use the signed integer type
int
for the number of reduction elementsnreduce
. This seemed odd to me, given that SHMEM takessize_t
-typed counts for every other comparable argument (e.g.,nelems
ornbytes
).
I agree, this does seem odd. Looking back at the original 1.0 spec, it has always been int and nelems has always been size_t. Maybe this has something to do with Fortran type compatibility and/or indexing into the pWrk array? I will ask the list about this to see if there is some reason to leave it as int. Otherwise size_t seems better.
Addressing changes to reductions as per Teams WG 2019-3-14