Skip to content

[SYCL] Add __SYCL_INLINE attribute to cl namespace in library sources #986

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 3 commits into from
Jan 9, 2020

Conversation

bader
Copy link
Contributor

@bader bader commented Dec 30, 2019

This change aligns class/functions definitions with the declarations in the headers.

bader and others added 3 commits December 30, 2019 16:11
This change aligns class/functions definitions with the declarations in
the headers.

Signed-off-by: Alexey Bader <[email protected]>
Signed-off-by: Alexey Bader <[email protected]>
Co-authored-by: Vlad Romoanov <[email protected]>
@bader bader merged commit f51030c into intel:sycl Jan 9, 2020
@bader bader deleted the sycl-namespace-inline branch January 9, 2020 15:29
@rolandschulz
Copy link
Contributor

This doesn't work if the user sets __SYCL_DISABLE_NAMESPACE_INLINE__, does it? Then things aren't aligned anymore because the library is built different than the user code. Should we remove __SYCL_DISABLE_NAMESPACE_INLINE__?

@bader
Copy link
Contributor Author

bader commented Jan 13, 2020

This doesn't work if the user sets __SYCL_DISABLE_NAMESPACE_INLINE__, does it? Then things aren't aligned anymore because the library is built different than the user code. Should we remove __SYCL_DISABLE_NAMESPACE_INLINE__?

According to my understanding it works. We need to align declarations with definitions at library compilation time to avoid compiler warnings, which are treated as errors. When compiled, these symbols use exposed as fully qualified to the linker, which do not have inline namespace concept - it's used only by the compiler front-end for symbol resolution at compile time.
Let me know if you still have concerns wrt this patch.

AlexeySachkov added a commit to AlexeySachkov/llvm that referenced this pull request Jan 13, 2020
One of the missed spots was introduced in intel#835, another one
was missed in intel#986

Signed-off-by: Alexey Sachkov <[email protected]>
@rolandschulz
Copy link
Contributor

rolandschulz commented Jan 14, 2020

Let me know if you still have concerns wrt this patch.

No concerns left. I didn't realize that the mangled name is identical between inline and non-inline namespace. Given that this happens to be the case, it should be fine.

bader pushed a commit that referenced this pull request Jan 14, 2020
One of the missed spots was introduced in #835, another one
was missed in #986

Signed-off-by: Alexey Sachkov <[email protected]>
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