-
Notifications
You must be signed in to change notification settings - Fork 68
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
Clarification needed on valid types and specializations for atomic_ref
#684
Comments
I think this is the intent. On a 64-bit system, you can always support
I think that not allowing |
I agree that this is the intent. The specification even says in the description of
I think that adding "any pointer type" to the list of |
I agree with this also, but we should consider whether we really mean "any" pointer type. For example, we do want to allow pointer to function, pointer to member, or pointer to member function types? If we intend to exclude function, member, and member function pointers, we should say that
Or maybe:
|
Good point, I hadn't considered that. ISO C++ ([atomics.ref.pointer]) says that the specialization of |
While working with SimSYCL we ran into a somewhat confusing aspect of the spec regarding
atomic_ref
.In the beginning the spec rather clearly and unequivocally states the following:
Notably absent are any pointer types.
However, at the same time, later on several functions available specifically on a partial specialization of
atomic_ref<T*>
are described.This doesn't seem to make much sense to me. One way to read it would be to take it as
T*
for each of theT
s described previously being allowed, but if a pointer to some types is valid then there's no reason that another pointer to a different type should be invalid (that I can think of).An easy way to solve it would be to add something like "any pointer type" to the list of allowed types at the start.
Off topic / only tangentially related: if this is touched, it might also be a good idea to use the opportunity to allow
bool
.(See also celerity/SimSYCL#32)
The text was updated successfully, but these errors were encountered: