diff --git a/sycl/include/CL/sycl/backend_types.hpp b/sycl/include/CL/sycl/backend_types.hpp index 3db71b8b47485..5e8e57ea70b2e 100644 --- a/sycl/include/CL/sycl/backend_types.hpp +++ b/sycl/include/CL/sycl/backend_types.hpp @@ -8,7 +8,9 @@ #pragma once -namespace cl { +#include + +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { enum class backend { host, opencl, cuda }; @@ -16,4 +18,4 @@ enum class backend { host, opencl, cuda }; template struct interop; } // namespace sycl -} // namespace cl \ No newline at end of file +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/cg.hpp b/sycl/include/CL/sycl/detail/cg.hpp index 8dbe84d10e209..ebe934468f087 100644 --- a/sycl/include/CL/sycl/detail/cg.hpp +++ b/sycl/include/CL/sycl/detail/cg.hpp @@ -78,8 +78,7 @@ class interop_handler { template - __SYCL_EXPORT auto - getMemImpl(detail::Requirement *Req) const -> typename interop< + auto getMemImpl(detail::Requirement *Req) const -> typename interop< BackendName, accessor>::type { return (typename interop +#include #include #include @@ -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 { @@ -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 diff --git a/sycl/source/detail/cg.cpp b/sycl/source/detail/cg.cpp index 2441d1cb7e919..a9a226dee277f 100644 --- a/sycl/source/detail/cg.cpp +++ b/sycl/source/detail/cg.cpp @@ -6,7 +6,8 @@ // //===----------------------------------------------------------------------===// -#include "CL/sycl/detail/cg.hpp" +#include +#include #include #include #include @@ -18,7 +19,7 @@ #include #include -namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { pi_native_handle interop_handler::GetNativeQueue() const { @@ -41,4 +42,4 @@ pi_native_handle interop_handler::GetNativeMem(detail::Requirement *Req) const { } } // sycl -} // cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/tools/get_device_count_by_type.cpp b/sycl/tools/get_device_count_by_type.cpp index 77ef2a023326a..31d741950730b 100644 --- a/sycl/tools/get_device_count_by_type.cpp +++ b/sycl/tools/get_device_count_by_type.cpp @@ -193,7 +193,7 @@ int main(int argc, char *argv[]) { } else if (backend == "cuda" || backend == "pi_cuda") { querySuccess = queryCUDA(deviceType, deviceCount, msg); } else { - msg + "ERROR: Unknown backend " + backend + "\n" + help + "\n"; + msg = "ERROR: Unknown backend " + backend + "\n" + help + "\n"; } std::cout << deviceCount << ":" << msg << std::endl;