-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] fix a behavior mismatch in ann_ptr operator #11904
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
Conversation
sycl/doc/extensions/experimental/sycl_ext_oneapi_annotated_ptr.asciidoc
Outdated
Show resolved
Hide resolved
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.
The version in the table is still missing the const (e.g. line 606). Also we should be more explicit about how the incr/decr works (the same operator is used on a temporary).
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.
RT changes LGTM.
done |
sycl/doc/extensions/experimental/sycl_ext_oneapi_annotated_ptr.asciidoc
Outdated
Show resolved
Hide resolved
sycl/include/sycl/ext/oneapi/experimental/annotated_ptr/annotated_ptr.hpp
Show resolved
Hide resolved
How was this caught? Are there any tests we can add for this and other such operator usage? |
Found this during testing. Yes I will add it to the test code |
Fixed two issues:
tmp = tmp Op rhs
statement is wrong since Op is defined as+=
and for+=
it will betmp = tmp += rhs
. Correct the formati.e. If T is a customer type with only
+=
operator being defined, when applying+=
onannotated_ref<T>
, the previous implementation errors out since there is no+
defined in T.const
to inc/dec operators