Skip to content

[SYCL] Add namespace alias for cl::sycl namespace #969

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
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sycl/include/CL/sycl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@
#include <CL/sycl/types.hpp>
#include <CL/sycl/usm.hpp>
#include <CL/sycl/version.hpp>

#ifndef __SYCL_DISABLE_NAMESPACE_ALIAS__
namespace sycl = cl::sycl;
#endif
4 changes: 0 additions & 4 deletions sycl/test/basic_tests/accessor/accessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
#include <CL/sycl.hpp>
#include <cassert>

namespace sycl {
using namespace cl::sycl;
}

struct IdxID1 {
int x;

Expand Down
4 changes: 0 additions & 4 deletions sycl/test/basic_tests/sampler/sampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
#include <CL/sycl/context.hpp>
#include <cassert>

namespace sycl {
using namespace cl::sycl;
}

int main() {
// Check constructor from enums
sycl::sampler A(sycl::coordinate_normalization_mode::unnormalized,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clangxx -fsycl %s -o %t.out
// RUN: %clangxx -fsycl -D__SYCL_DISABLE_NAMESPACE_ALIAS__ %s -o %t.out
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
Expand Down