Skip to content

[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

Merged
merged 2 commits into from
Mar 13, 2020

Conversation

elizabethandrews
Copy link
Contributor

Constuctors have been marked as explicit.

Signed-off-by: Elizabeth Andrews [email protected]

Constuctors have been marked as explicit.

Signed-off-by: Elizabeth Andrews <[email protected]>
jbrodman
jbrodman previously approved these changes Mar 12, 2020
Copy link
Contributor

@jbrodman jbrodman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jbrodman
Copy link
Contributor

LGTM!

...but clang-format needs to be re-run.

@elizabethandrews
Copy link
Contributor Author

LGTM!

...but clang-format needs to be re-run.

Just saw that :/ I'll push another patch now.

@elizabethandrews
Copy link
Contributor Author

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.

@@ -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 = {});
Copy link
Contributor

@bader bader Mar 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const property_list &PropList = {});
const property_list &PropList = {});

This seems to be enough to fix the code formatting problem.

Copy link
Contributor Author

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.

Copy link
Contributor

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. :)

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@bader bader merged commit 3b6799a into intel:sycl Mar 13, 2020
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Feb 23, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants