You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have character reductions in OpenSHMEM. However, the C language specification only guarantees well-defined behavior when the values correspond to characters in the basic execution character set.
C99 Section 6.2.5, Paragraph 3:
An object declared as type char is large enough to store any member of the basic execution character set. If a member of the basic execution character set is stored in a char object, its value is guaranteed to be positive. If any other character is stored in a char object, the resulting value is implementation-defined but shall be within the range of values that can be represented in that type.
Question
Should an OpenSHMEM reduction on character data provide be required to provide the implementation-defined result? For context, this was encountered recently because Power 9 treats character as unsigned whereas x86/Linux treats it as a signed type. ASCII is a 7-bit character set, so it is implementation defined what to do with the eighth bit.
Possible Solutions
Specify whether OpenSHMEM libraries need to provide the C language's implementation defined behavior or can provide their own.
Remove char reductions since we have uint8_t, signed char, and unsigned char.
??
The text was updated successfully, but these errors were encountered:
Problem Statement
We have character reductions in OpenSHMEM. However, the C language specification only guarantees well-defined behavior when the values correspond to characters in the basic execution character set.
C99 Section 6.2.5, Paragraph 3:
Question
Should an OpenSHMEM reduction on character data provide be required to provide the implementation-defined result? For context, this was encountered recently because Power 9 treats character as unsigned whereas x86/Linux treats it as a signed type. ASCII is a 7-bit character set, so it is implementation defined what to do with the eighth bit.
Possible Solutions
char
reductions since we haveuint8_t
,signed char
, andunsigned char
.The text was updated successfully, but these errors were encountered: