Skip to content

[SYCL][Doc] Clarify that uniform is immutable #4246

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

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

Pennycook
Copy link
Contributor

We received feedback from the oneAPI TAB that it was not immediately
obvious that the uniform class is immutable. The changes here are an
attempt to clarify this:

  • The implicit conversion operator returns "const T", reflecting that
    the user is not getting a reference to the underlying data.

  • The assignment operator is deleted, preventing the user from
    accidentally assigning one uniform object to another.

  • Other operators that users might accidentally call on a uniform
    of a fundamental type (e.g. += on a uniform) are explicitly
    deleted; the intent here is to give a simplified error message (rather
    than a complex C++ diagnostic) that signals the operator is
    deliberately not supported (rather than accidentally missing or
    unimplemented).

Signed-off-by: John Pennycook [email protected]

We received feedback from the oneAPI TAB that it was not immediately
obvious that the uniform class is immutable. The changes here are an
attempt to clarify this:

- The implicit conversion operator returns "const T", reflecting that
  the user is not getting a reference to the underlying data.

- The assignment operator is deleted, preventing the user from
  accidentally assigning one uniform object to another.

- Other operators that users might accidentally call on a uniform
  of a fundamental type (e.g. += on a uniform<int>) are explicitly
  deleted; the intent here is to give a simplified error message (rather
  than a complex C++ diagnostic) that signals the operator is
  deliberately not supported (rather than accidentally missing or
  unimplemented).

Signed-off-by: John Pennycook <[email protected]>
@Pennycook Pennycook added the spec extension All issues/PRs related to extensions specifications label Aug 3, 2021
@Pennycook Pennycook requested a review from a team as a code owner August 3, 2021 20:44
@Pennycook Pennycook requested a review from rolandschulz August 3, 2021 20:46
@Pennycook
Copy link
Contributor Author

@rolandschulz, @intel/dpcpp-specification-reviewers: Ping

@Pennycook
Copy link
Contributor Author

Thanks, @rolandschulz. @bader, I think this can be merged now.

@bader bader merged commit 0d7a8cf into intel:sycl Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec extension All issues/PRs related to extensions specifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants