-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add sycl = ::cl::sycl namespace alias #108
Conversation
SYCL 2020 introduces a new canonical namespace, ::sycl, which is defined within the new <sycl/sycl.hpp> header. To ease the transition of the CTS to the new namespace, this creates an alias `sycl = cl::sycl`, while keeping the SYCL 1.2.1 header path <CL/sycl.hpp> for the time being.
To clarify: I've added "Agenda" tag to discuss this description section:
|
This would work with triSYCL. |
@keryell, can we interpret this comment as "Approved" from your side? :) |
Not really. |
I have the feeling that a CTS should test exactly what is in the spec and not define some aliases or new indirect namespaces because it might have some side effect, like noticed by @psalz. |
Do we need to validate in the CTS that |
That is of course also an option, I just thought that a more gradual change would reduce noise in the repo history. But it's all the same to me, really. |
By looking at it again:
is the right hack to use for now, before changing globally |
SYCL 2020 introduces a new canonical namespace,
::sycl
, which is defined within the new<sycl/sycl.hpp>
header. To ease the transition of the CTS to the new namespace, this creates an aliassycl = cl::sycl
, while keeping the SYCL 1.2.1 header path<CL/sycl.hpp>
for the time being.For the record, I also tried going the reverse route, i.e., including
<sycl/sycl.hpp>
, and definingnamespace cl { namespace sycl = ::sycl; }
. However that didn't work, as DPC++ already exports that alias (while e.g. hipSYCL doesn't - the spec isn't super clear on this), and ComputeCpp 2.4 doesn't seem to support the new header at all.