-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Prevent implicit conversion from device to queue. #1292
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
Constuctors have been marked as explicit. Signed-off-by: Elizabeth Andrews <[email protected]>
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!
...but clang-format needs to be re-run. |
Just saw that :/ I'll push another patch now. |
Sorry. ClangFormat clang-format-diff.py script was erroring out when I tried running it on this patch and so I just corrected the issues manually. I see now there are more issues. I'll figure out what's wrong with the script and run the actual tool now. |
sycl/include/CL/sycl/queue.hpp
Outdated
@@ -79,7 +79,7 @@ class queue { | |||
/// \param SyclDevice is an instance of SYCL device. | |||
/// \param AsyncHandler is a SYCL asynchronous exception handler. | |||
/// \param PropList is a list of properties for queue construction. | |||
queue(const device &SyclDevice, const async_handler &AsyncHandler, | |||
explicit queue(const device &SyclDevice, const async_handler &AsyncHandler, | |||
const property_list &PropList = {}); |
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.
const property_list &PropList = {}); | |
const property_list &PropList = {}); |
This seems to be enough to fix the code formatting problem.
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.
Oh. Thanks. I'm surprised that causes an issue since I technically did not touch that line in this patch. The script I use clang-format-diff.py only formats patch diff without surrounding context IIRC.
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.
I always just build the clang-format target too. There's also a nice emacs plugin that can be hot-keyed. :)
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.
Sorry. ClangFormat clang-format-diff.py script was erroring out when I tried running it on this patch and so I just corrected the issues manually. I see now there are more issues. I'll figure out what's wrong with the script and run the actual tool now.
If you also build clang-format along with sycl-toolchain, you'll generate the clang-format binary.
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.
Yes thank you. The script was throwing an error because I had missed building clang-format. I ran it now and it caught this issue. I'm pushing the amended patch now.
Signed-off-by: Elizabeth Andrews <[email protected]>
84f9e5b
to
34f7faf
Compare
By default, a new API that has an extra "use" argument will be used. So for the other tests that use the old API, the macro will have to be explicitly set
Constuctors have been marked as explicit.
Signed-off-by: Elizabeth Andrews [email protected]