-
Notifications
You must be signed in to change notification settings - Fork 73
Clarify that certain types are trivially copyable #765
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
base: main
Are you sure you want to change the base?
Conversation
id, range, nd_range, vec and marray are permitted as kernel arguments, but the specification does not say that they are trivially copyable nor that they are device copyable.
I did a quick ctrl+f and found nothing. Can you share the section where we said that? I found #210, So should "4.5.3. Common by-value semantics" include "trivially copyable"? |
I don't know where it exists; @gmlueck opened the internal issue quite a while ago, and whatever text he was referencing might have been changed. But several people weighed in at the time with the opinion that this was the intent.
No, I don't think so. |
|
I'm always afraid to duplicate so much the But yeah, |
I agree with this. The view I tend to take, though, is that it's most important that the specification says the right thing before we worry about where we say it. So, in this case, I'd like to get the correct text in and the CTS tests done, and then we can always refactor things later. |
|
Awaiting CTS |
keryell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
Just to follow-up on today's discussion about
I think this means that you can have a "numeric type" that isn't a "trivially copyable" type. So you can create an |
|
I think this change is good, but we can now clean up the specification in "Rules for parameter passing to kernels". These bullet items can now be removed:
This is because this PR guarantees that these types are trivially copyable, and we already say that any trivially copyable type is a valid kernel parameter. |
id, range, marray and vec are now guaranteed to be trivially copyable, so do not need to be listed explicitly as SYCL types that can be passed to kernels.
I always like it when we make the specification simpler. 😄 I've applied this suggestion in ae34962. |
|
Please resolve the merge conflicts. |
I think it was just the |
Looks good, thanks! |
|
Still waiting CTS. |
|
For my own benefit, the Intel tracker for the CTS is CMPLRTST-26896 |
id,range,nd_range,vecandmarrayare permitted as kernel arguments, but the specification does not say that they are trivially copyable nor that they are device copyable.Closes internal issue 564.