Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integral overloads for id and range operators #726

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Pennycook
Copy link
Contributor

The specification previously only listed an overload for size_t. However, all existing SYCL implementations provide overloads for
all integral types to avoid ambiguity in operator overloads.

This change aligns the specification with the behavior of existing SYCL implementations.

Closes #539, closes #711.


Note that I also re-ordered the synopses for id and range based on an observation made during discussion in #711. It might be easier to review the changes from the two commits separately: the first commit adjusts the overloads, and the second commit reorders things.

The specification previously only listed an overload for size_t.
However, all existing SYCL implementations provide overloads for
all integral types to avoid ambiguity in operator overloads.

This change aligns the specification with the behavior of existing SYCL
implementations.
Previously, the synopses for these classes listed operators in this order:

- +(id, T)
- +=(id, T)
- +(T, id)

This made it very easy to miss that + was defined with id as both the lhs and
rhs. To improve readability, this commit changes the order to:

- +(id, T)
- +(T, id)
- +=(id, T)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intended behavior of operator* in id<1> id<1> operators and integer literals
1 participant