-
Notifications
You must be signed in to change notification settings - Fork 91
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
[SYCLomatic] return device_pointer from data() #1861
[SYCLomatic] return device_pointer from data() #1861
Conversation
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.
A small change is needed. The rest looks good to me.
8c8042d
to
20a27a6
Compare
Signed-off-by: Dan Hoeflinger <[email protected]>
Signed-off-by: Dan Hoeflinger <[email protected]>
Signed-off-by: Dan Hoeflinger <[email protected]>
Signed-off-by: Dan Hoeflinger <[email protected]>
20a27a6
to
b58429b
Compare
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.
LGTM. Thank you.
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.
LGTM
using pointer = T *; | ||
using const_pointer = const T *; | ||
using pointer = device_pointer<T>; | ||
using const_pointer = const device_pointer<T>; |
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.
Should const_pointer
be defined as device_pointer<const T>
?
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.
Good catch. Fixed, thanks!
Signed-off-by: Dan Hoeflinger <[email protected]>
Fix for data() function return and
pointer
typedef fordevice_vector
to usedevice_pointer
I don't know the motivation for originally using
T*
rather thandevice_pointer<T>
. This passes the tests for vector. It seems that this should be a reasonable change.