gmegan / specification

OpenSHMEM Application Programming Interface
http://www.openshmem.org
1 stars 0 forks source link

Reductions updates to fix naming and arg ordering, add unsigned types #92

Closed gmegan closed 5 years ago

gmegan commented 5 years ago

Addressing changes to reductions as per Teams WG 2019-3-14

nspark commented 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?

gmegan commented 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).

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.