KhronosGroup / KhronosGroup/SYCL-Docs
Clarify requirements for the C++ fixed width type aliases
- Dominant language
- JavaScript
- Stars
- 158
- Forks
- 80
- Avg merge
- 7d 6h
- Merged PRs (30d)
- 5
Description
[Section 5.5 (Built-in scalar data types)](https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#subsec:scalartypes) states:
>The standard C++ fixed width types, e.g. `int8_t`, `int16_t`, `int32_t`, `int64_t`, should have the same size as defined by the C++ standard for host and device.
The use of "should" is curious here since the C++ standard already specifies (in [\[cstdint.syn\]p3](http://eel.is/c++draft/support.arith.types#cstdint.syn-3)) a particular fixed size for each of the (optional) types listed. Perhaps the intent is to state that type aliases such as `int_fast8_t`, `int_least8_t`, `intmax_t`, `intptr_t` and their unsigned variants should be defined to types that have the same size (and alignment?) on the host and device? Is it intentional, perhaps for ABI reasons, that the aliases are not required to be defined to matching types on the host and device?
This issue has been filed to update the SYCL specification to more explicitly state the intended requirements for these type aliases.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.