-
Notifications
You must be signed in to change notification settings - Fork 795
[SYCL] Refactor cl::sycl namespace. Part1 #4397
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
Closed
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c70e525
Start namespace renaming
romanovvlad 813b217
clang formatting
romanovvlad 535e32e
minor Fixes
romanovvlad ffbead5
tiny fixes
romanovvlad 462f4b1
Add comments and test
romanovvlad 358994c
Apply comments and fix tests
romanovvlad 37b945e
Merge remote-tracking branch 'public/sycl' into private2/vromanov/Alias
romanovvlad 1fb1ec8
clang formatting
romanovvlad c2d6b58
more clang formatting
romanovvlad 911d4d1
resolve comments
romanovvlad b24a5c0
resolve comments
romanovvlad 24ee4ec
address comments
romanovvlad 53d3767
Merge remote-tracking branch 'public/sycl' into private2/vromanov/Alias
romanovvlad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Found a problem with this change.
Uh oh!
There was an error while loading. Please reload this page.
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.
What is the 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.
The problem is that the integration header includes
defines_elementary.hpp
which selects either SYCL 1.2.1 of SYCL2020 style of namespaces before we know which one should be used. So, it seems it was a bad idea to use the same macro in the integration header and for headers. Going to introduce a separate macro for integration header.@erichkeane @premanandrao Does it sound OK?
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.
That sounds like that should be alright... we just have to make sure the two stay in sync. Though, I'm not sure how you can get a macro here to work if it depends on a decision that isn't made yet. Should
defines_elementary.hpp
be doing all of the lifting for this set of namespaces?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.
Can we just use
inline namespace cl
w/o any macro defined in DPC++ headers?Uh oh!
There was an error while loading. Please reload this page.
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'm thinking about separating those namespaces. For integration header we could have a macro in the
defines_elementary.hpp
which, for example, defines to__sycl_int_header_ns
(it's not quite suitable for the integration footer though). For headers we could you an additional header(defines_sycl_ns.hpp
) which is not included from the integration header - when we include it we know which namespace version we should use.We can, but we cannot use
inline namespace cl
, because user space will be still poluted. We can use a different namespace -__sycl_int_header_ns
, but with a macro it would be easier to be in sync without FE modifications.