Skip to content
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

[SYCL] Fix inline namespaces #1525

Merged
merged 3 commits into from
Apr 15, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 4 additions & 2 deletions sycl/include/CL/sycl/backend_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@

#pragma once

namespace cl {
#include <CL/sycl/detail/defines.hpp>

__SYCL_INLINE_NAMESPACE(cl) {
namespace sycl {

enum class backend { host, opencl, cuda };

template <backend name, typename SYCLObjectT> struct interop;

} // namespace sycl
} // namespace cl
} // __SYCL_INLINE_NAMESPACE(cl)
5 changes: 3 additions & 2 deletions sycl/plugins/cuda/pi_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/// \ingroup sycl_pi_cuda

#include <CL/sycl/detail/cuda_definitions.hpp>
#include <CL/sycl/detail/defines.hpp>
#include <CL/sycl/detail/pi.hpp>
#include <pi_cuda.hpp>

Expand Down Expand Up @@ -229,7 +230,7 @@ int getAttribute(pi_device device, CUdevice_attribute attribute) {
} // anonymous namespace

/// ------ Error handling, matching OpenCL plugin semantics.
namespace cl {
__SYCL_INLINE_NAMESPACE(cl) {
namespace sycl {
namespace detail {
namespace pi {
Expand All @@ -251,7 +252,7 @@ void assertion(bool Condition, const char *Message) {
} // namespace pi
} // namespace detail
} // namespace sycl
} // namespace cl
} // __SYCL_INLINE_NAMESPACE(cl)

//--------------
// PI object implementation
Expand Down
7 changes: 4 additions & 3 deletions sycl/source/detail/cg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
//
//===----------------------------------------------------------------------===//

#include "CL/sycl/detail/cg.hpp"
#include <CL/sycl/detail/cg.hpp>
#include <CL/sycl/detail/defines.hpp>
#include <CL/sycl/detail/memory_manager.hpp>
#include <CL/sycl/detail/pi.hpp>
#include <detail/queue_impl.hpp>
Expand All @@ -18,7 +19,7 @@
#include <type_traits>
#include <vector>

namespace cl {
__SYCL_INLINE_NAMESPACE(cl) {
namespace sycl {

pi_native_handle interop_handler::GetNativeQueue() const {
Expand All @@ -41,4 +42,4 @@ pi_native_handle interop_handler::GetNativeMem(detail::Requirement *Req) const {
}

} // sycl
} // cl
} // __SYCL_INLINE_NAMESPACE(cl)