diff --git a/sycl/source/context.cpp b/sycl/source/context.cpp index 6540c6fc9246b..e54bd97c7f79f 100644 --- a/sycl/source/context.cpp +++ b/sycl/source/context.cpp @@ -21,7 +21,7 @@ // 4.6.2 Context class -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { context::context(const async_handler &AsyncHandler) : context(default_selector().select_device(), AsyncHandler) {} diff --git a/sycl/source/detail/accessor_impl.cpp b/sycl/source/detail/accessor_impl.cpp index e1d9062fcc005..9df50b1b9c1df 100644 --- a/sycl/source/detail/accessor_impl.cpp +++ b/sycl/source/detail/accessor_impl.cpp @@ -9,7 +9,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/builtins_common.cpp b/sycl/source/detail/builtins_common.cpp index ebd2f00d93a62..b60af85cd4b5a 100644 --- a/sycl/source/detail/builtins_common.cpp +++ b/sycl/source/detail/builtins_common.cpp @@ -22,7 +22,7 @@ namespace s = cl::sycl; namespace d = s::detail; -namespace cl { +__SYCL_INLINE namespace cl { namespace __host_std { namespace { diff --git a/sycl/source/detail/builtins_geometric.cpp b/sycl/source/detail/builtins_geometric.cpp index efe0f3d9aa6ce..fe6466c5609e4 100644 --- a/sycl/source/detail/builtins_geometric.cpp +++ b/sycl/source/detail/builtins_geometric.cpp @@ -16,7 +16,7 @@ namespace s = cl::sycl; namespace d = s::detail; -namespace cl { +__SYCL_INLINE namespace cl { namespace __host_std { s::cl_float Dot(s::cl_float2, s::cl_float2); diff --git a/sycl/source/detail/builtins_integer.cpp b/sycl/source/detail/builtins_integer.cpp index 49f83becfb6dd..73ef8e73bce98 100644 --- a/sycl/source/detail/builtins_integer.cpp +++ b/sycl/source/detail/builtins_integer.cpp @@ -17,7 +17,7 @@ namespace s = cl::sycl; namespace d = s::detail; -namespace cl { +__SYCL_INLINE namespace cl { namespace __host_std { namespace { diff --git a/sycl/source/detail/builtins_math.cpp b/sycl/source/detail/builtins_math.cpp index 2fa0014a7840d..b7cfe5b982db9 100644 --- a/sycl/source/detail/builtins_math.cpp +++ b/sycl/source/detail/builtins_math.cpp @@ -22,7 +22,7 @@ namespace s = cl::sycl; namespace d = s::detail; -namespace cl { +__SYCL_INLINE namespace cl { namespace __host_std { namespace { diff --git a/sycl/source/detail/builtins_relational.cpp b/sycl/source/detail/builtins_relational.cpp index 3660e8291113a..bbcd9fe0c1c9a 100644 --- a/sycl/source/detail/builtins_relational.cpp +++ b/sycl/source/detail/builtins_relational.cpp @@ -16,7 +16,7 @@ namespace s = cl::sycl; namespace d = s::detail; -namespace cl { +__SYCL_INLINE namespace cl { namespace __host_std { namespace { diff --git a/sycl/source/detail/common.cpp b/sycl/source/detail/common.cpp index 6758bcd4925a5..dc6e19b83aac3 100644 --- a/sycl/source/detail/common.cpp +++ b/sycl/source/detail/common.cpp @@ -9,7 +9,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/config.cpp b/sycl/source/detail/config.cpp index 0db83f5540a7b..dc8db099069d7 100644 --- a/sycl/source/detail/config.cpp +++ b/sycl/source/detail/config.cpp @@ -17,7 +17,7 @@ #define STRINGIFY_LINE_HELP(s) #s #define STRINGIFY_LINE(s) STRINGIFY_LINE_HELP(s) -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/config.hpp b/sycl/source/detail/config.hpp index 4319e00c9a989..5c006a8874d46 100644 --- a/sycl/source/detail/config.hpp +++ b/sycl/source/detail/config.hpp @@ -10,7 +10,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/context_impl.cpp b/sycl/source/detail/context_impl.cpp index 0a3c6169ce920..33b5188d42eb6 100644 --- a/sycl/source/detail/context_impl.cpp +++ b/sycl/source/detail/context_impl.cpp @@ -17,7 +17,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/device_impl.cpp b/sycl/source/detail/device_impl.cpp index 06fedcf580371..c49ac7b6d2e45 100644 --- a/sycl/source/detail/device_impl.cpp +++ b/sycl/source/detail/device_impl.cpp @@ -11,7 +11,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/device_info.cpp b/sycl/source/detail/device_info.cpp index ce9fe5dd2c48c..7f743d4dc6e2e 100644 --- a/sycl/source/detail/device_info.cpp +++ b/sycl/source/detail/device_info.cpp @@ -19,7 +19,7 @@ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #endif -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/error_handling/enqueue_kernel.cpp b/sycl/source/detail/error_handling/enqueue_kernel.cpp index 1ab7a11578f16..2d72f516f3a9a 100644 --- a/sycl/source/detail/error_handling/enqueue_kernel.cpp +++ b/sycl/source/detail/error_handling/enqueue_kernel.cpp @@ -14,7 +14,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/error_handling/error_handling.hpp b/sycl/source/detail/error_handling/error_handling.hpp index 5bdf0cb90ffa6..be6edba17f2df 100644 --- a/sycl/source/detail/error_handling/error_handling.hpp +++ b/sycl/source/detail/error_handling/error_handling.hpp @@ -11,7 +11,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/event_impl.cpp b/sycl/source/detail/event_impl.cpp index 7b28e93f04ee1..e9838614e3340 100644 --- a/sycl/source/detail/event_impl.cpp +++ b/sycl/source/detail/event_impl.cpp @@ -13,7 +13,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/force_device.cpp b/sycl/source/detail/force_device.cpp index d7fa4778964fb..95335687ad3ba 100644 --- a/sycl/source/detail/force_device.cpp +++ b/sycl/source/detail/force_device.cpp @@ -11,7 +11,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/helpers.cpp b/sycl/source/detail/helpers.cpp index f6b9cfc830056..e93d425aa8387 100644 --- a/sycl/source/detail/helpers.cpp +++ b/sycl/source/detail/helpers.cpp @@ -14,7 +14,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { using ContextImplPtr = std::shared_ptr; namespace detail { diff --git a/sycl/source/detail/image_accessor_util.cpp b/sycl/source/detail/image_accessor_util.cpp index 11df1306d7503..de6524dea30a8 100644 --- a/sycl/source/detail/image_accessor_util.cpp +++ b/sycl/source/detail/image_accessor_util.cpp @@ -9,7 +9,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/image_impl.cpp b/sycl/source/detail/image_impl.cpp index c32553ab6b635..2fb088e1edd5d 100644 --- a/sycl/source/detail/image_impl.cpp +++ b/sycl/source/detail/image_impl.cpp @@ -8,7 +8,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/kernel_impl.cpp b/sycl/source/detail/kernel_impl.cpp index 63e978c6abd6f..4bb9e56bcb8af 100644 --- a/sycl/source/detail/kernel_impl.cpp +++ b/sycl/source/detail/kernel_impl.cpp @@ -15,7 +15,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/kernel_info.cpp b/sycl/source/detail/kernel_info.cpp index 32dde9e87b7be..aa38ad5056835 100644 --- a/sycl/source/detail/kernel_info.cpp +++ b/sycl/source/detail/kernel_info.cpp @@ -9,7 +9,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { template <> diff --git a/sycl/source/detail/kernel_program_cache.cpp b/sycl/source/detail/kernel_program_cache.cpp index 8a780841f7078..03d780653738c 100644 --- a/sycl/source/detail/kernel_program_cache.cpp +++ b/sycl/source/detail/kernel_program_cache.cpp @@ -8,7 +8,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { KernelProgramCache::~KernelProgramCache() { diff --git a/sycl/source/detail/memory_manager.cpp b/sycl/source/detail/memory_manager.cpp index a8fc739432927..dd90c67ea0ac2 100644 --- a/sycl/source/detail/memory_manager.cpp +++ b/sycl/source/detail/memory_manager.cpp @@ -17,7 +17,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/os_util.cpp b/sycl/source/detail/os_util.cpp index e6d29fda9c85f..9fcc7ccd03949 100644 --- a/sycl/source/detail/os_util.cpp +++ b/sycl/source/detail/os_util.cpp @@ -44,7 +44,7 @@ #endif // SYCL_RT_OS -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/pi.cpp b/sycl/source/detail/pi.cpp index abb177c813474..10df59f5d496d 100644 --- a/sycl/source/detail/pi.cpp +++ b/sycl/source/detail/pi.cpp @@ -15,7 +15,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { namespace pi { diff --git a/sycl/source/detail/platform_impl.cpp b/sycl/source/detail/platform_impl.cpp index d4f3b4da0806f..cc55e98df85ff 100644 --- a/sycl/source/detail/platform_impl.cpp +++ b/sycl/source/detail/platform_impl.cpp @@ -15,7 +15,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/platform_info.cpp b/sycl/source/detail/platform_info.cpp index 27669f36ae352..c06be8d424677 100644 --- a/sycl/source/detail/platform_info.cpp +++ b/sycl/source/detail/platform_info.cpp @@ -8,7 +8,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/platform_util.cpp b/sycl/source/detail/platform_util.cpp index 480579d6c4f39..6027eec91c39c 100644 --- a/sycl/source/detail/platform_util.cpp +++ b/sycl/source/detail/platform_util.cpp @@ -16,7 +16,7 @@ #include #endif -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/posix_pi.cpp b/sycl/source/detail/posix_pi.cpp index dd1a865f53c3a..77080dd40a6f8 100644 --- a/sycl/source/detail/posix_pi.cpp +++ b/sycl/source/detail/posix_pi.cpp @@ -1,7 +1,17 @@ +//==---------------- posix_pi.cpp ------------------------------------------==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include + #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { namespace pi { diff --git a/sycl/source/detail/program_impl.cpp b/sycl/source/detail/program_impl.cpp index d8616d0ea9f93..05e8faf5ad253 100644 --- a/sycl/source/detail/program_impl.cpp +++ b/sycl/source/detail/program_impl.cpp @@ -8,7 +8,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { template <> diff --git a/sycl/source/detail/program_manager/program_manager.cpp b/sycl/source/detail/program_manager/program_manager.cpp index d2ef945232baf..4df570273d4a5 100644 --- a/sycl/source/detail/program_manager/program_manager.cpp +++ b/sycl/source/detail/program_manager/program_manager.cpp @@ -27,7 +27,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/queue_impl.cpp b/sycl/source/detail/queue_impl.cpp index 6a8e64f60520e..20ae0dceaa36e 100644 --- a/sycl/source/detail/queue_impl.cpp +++ b/sycl/source/detail/queue_impl.cpp @@ -16,7 +16,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { template <> cl_uint queue_impl::get_info() const { diff --git a/sycl/source/detail/sampler_impl.cpp b/sycl/source/detail/sampler_impl.cpp index db8a9e6d029f9..808208f6eb547 100644 --- a/sycl/source/detail/sampler_impl.cpp +++ b/sycl/source/detail/sampler_impl.cpp @@ -9,7 +9,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index 16af85e2d2c11..a2bc8cee9fcc9 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -32,7 +32,7 @@ #include #endif -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/scheduler/graph_builder.cpp b/sycl/source/detail/scheduler/graph_builder.cpp index 41ca557d3c492..492cf34a1c5f4 100644 --- a/sycl/source/detail/scheduler/graph_builder.cpp +++ b/sycl/source/detail/scheduler/graph_builder.cpp @@ -22,7 +22,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/scheduler/graph_processor.cpp b/sycl/source/detail/scheduler/graph_processor.cpp index 78f4ec26adf03..b3cb7f80438c6 100644 --- a/sycl/source/detail/scheduler/graph_processor.cpp +++ b/sycl/source/detail/scheduler/graph_processor.cpp @@ -13,7 +13,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/scheduler/scheduler.cpp b/sycl/source/detail/scheduler/scheduler.cpp index 28a77adc77c7d..8e3fe9a4cbcfe 100644 --- a/sycl/source/detail/scheduler/scheduler.cpp +++ b/sycl/source/detail/scheduler/scheduler.cpp @@ -16,7 +16,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/stream_impl.cpp b/sycl/source/detail/stream_impl.cpp index e66cd11ea6cb1..dcb5a75748cb3 100644 --- a/sycl/source/detail/stream_impl.cpp +++ b/sycl/source/detail/stream_impl.cpp @@ -9,7 +9,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/usm/clusm.cpp b/sycl/source/detail/usm/clusm.cpp index cac788320fe9c..87de620a3f05d 100644 --- a/sycl/source/detail/usm/clusm.cpp +++ b/sycl/source/detail/usm/clusm.cpp @@ -19,7 +19,7 @@ cl::sycl::detail::usm::CLUSM *gCLUSM = nullptr; -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { namespace usm { diff --git a/sycl/source/detail/usm/usm_dispatch.cpp b/sycl/source/detail/usm/usm_dispatch.cpp index e995f10629ede..599aeeffa0d88 100644 --- a/sycl/source/detail/usm/usm_dispatch.cpp +++ b/sycl/source/detail/usm/usm_dispatch.cpp @@ -9,7 +9,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { namespace usm { diff --git a/sycl/source/detail/usm/usm_impl.cpp b/sycl/source/detail/usm/usm_impl.cpp index a218b2d2dfb93..1c8c928fb04ca 100644 --- a/sycl/source/detail/usm/usm_impl.cpp +++ b/sycl/source/detail/usm/usm_impl.cpp @@ -15,7 +15,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { using alloc = cl::sycl::usm::alloc; diff --git a/sycl/source/detail/util.cpp b/sycl/source/detail/util.cpp index 3a712009a868d..7b98f1a7dab8e 100644 --- a/sycl/source/detail/util.cpp +++ b/sycl/source/detail/util.cpp @@ -8,7 +8,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/detail/windows_pi.cpp b/sycl/source/detail/windows_pi.cpp index 69817ab23c97b..dee857644da85 100644 --- a/sycl/source/detail/windows_pi.cpp +++ b/sycl/source/detail/windows_pi.cpp @@ -1,8 +1,18 @@ +//==---------------- windows_pi.cpp ----------------------------------------==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include + #include #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { namespace pi { diff --git a/sycl/source/device.cpp b/sycl/source/device.cpp index 907dc0fc7fdbc..52e05d72b059a 100644 --- a/sycl/source/device.cpp +++ b/sycl/source/device.cpp @@ -12,7 +12,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { void force_type(info::device_type &t, const info::device_type &ft) { diff --git a/sycl/source/device_selector.cpp b/sycl/source/device_selector.cpp index 21f4ba8d4c36c..6f3e1c636beed 100644 --- a/sycl/source/device_selector.cpp +++ b/sycl/source/device_selector.cpp @@ -12,7 +12,7 @@ #include // 4.6.1 Device selection class -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { device device_selector::select_device() const { vector_class devices = device::get_devices(); diff --git a/sycl/source/event.cpp b/sycl/source/event.cpp index 0b24dbf62dd2e..569d61340f1fb 100644 --- a/sycl/source/event.cpp +++ b/sycl/source/event.cpp @@ -19,7 +19,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { event::event() : impl(std::make_shared()) {} diff --git a/sycl/source/exception.cpp b/sycl/source/exception.cpp index 7948fedee711d..756571ef65fd6 100644 --- a/sycl/source/exception.cpp +++ b/sycl/source/exception.cpp @@ -10,7 +10,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { const char *exception::what() const noexcept { return MMsg.c_str(); } diff --git a/sycl/source/exception_list.cpp b/sycl/source/exception_list.cpp index 9da0593fb0191..4db32e0c89558 100644 --- a/sycl/source/exception_list.cpp +++ b/sycl/source/exception_list.cpp @@ -11,7 +11,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { exception_list::size_type exception_list::size() const { return MList.size(); } diff --git a/sycl/source/half_type.cpp b/sycl/source/half_type.cpp index 6f14ec47b0721..9a5e8565a809c 100644 --- a/sycl/source/half_type.cpp +++ b/sycl/source/half_type.cpp @@ -11,7 +11,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { namespace detail { diff --git a/sycl/source/kernel.cpp b/sycl/source/kernel.cpp index 87c7370100828..24f28b7fca4c5 100644 --- a/sycl/source/kernel.cpp +++ b/sycl/source/kernel.cpp @@ -10,7 +10,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { kernel::kernel(cl_kernel ClKernel, const context &SyclContext) diff --git a/sycl/source/ordered_queue.cpp b/sycl/source/ordered_queue.cpp index 9cbcf56278106..85dd1763dadcb 100644 --- a/sycl/source/ordered_queue.cpp +++ b/sycl/source/ordered_queue.cpp @@ -11,7 +11,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { ordered_queue::ordered_queue(const context &syclContext, const device_selector &deviceSelector, diff --git a/sycl/source/platform.cpp b/sycl/source/platform.cpp index 5e56a7ed506ef..020637c5551ac 100644 --- a/sycl/source/platform.cpp +++ b/sycl/source/platform.cpp @@ -13,7 +13,7 @@ #include #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { platform::platform() : impl(std::make_shared()) {} diff --git a/sycl/source/queue.cpp b/sycl/source/queue.cpp index cb6582eb95b2a..e45b91740d702 100644 --- a/sycl/source/queue.cpp +++ b/sycl/source/queue.cpp @@ -11,7 +11,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { queue::queue(const context &syclContext, const device_selector &deviceSelector, const async_handler &asyncHandler, const property_list &propList) { diff --git a/sycl/source/sampler.cpp b/sycl/source/sampler.cpp index 13163dce2dd0a..d06222a13cf4e 100644 --- a/sycl/source/sampler.cpp +++ b/sycl/source/sampler.cpp @@ -8,7 +8,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { sampler::sampler(coordinate_normalization_mode normalizationMode, addressing_mode addressingMode, filtering_mode filteringMode) diff --git a/sycl/source/stream.cpp b/sycl/source/stream.cpp index 4a67826b58bb7..84b5ee60a952c 100644 --- a/sycl/source/stream.cpp +++ b/sycl/source/stream.cpp @@ -8,7 +8,7 @@ #include -namespace cl { +__SYCL_INLINE namespace cl { namespace sycl { stream::stream(size_t BufferSize, size_t MaxStatementSize, handler &CGH) diff --git a/sycl/test/basic_tests/sycl-namespace.cpp b/sycl/test/basic_tests/sycl-namespace.cpp new file mode 100644 index 0000000000000..ead6b0dc8248b --- /dev/null +++ b/sycl/test/basic_tests/sycl-namespace.cpp @@ -0,0 +1,20 @@ +// RUN: %clangxx -fsycl %s -o %t.out +// RUN: env SYCL_DEVICE_TYPE=HOST %t.out +// RUN: %CPU_RUN_PLACEHOLDER %t.out +// RUN: %GPU_RUN_PLACEHOLDER %t.out +// RUN: %ACC_RUN_PLACEHOLDER %t.out + +#include + +int main() { + ::sycl::queue q; + int r = 0; + { + sycl::buffer b(&r, 1); + q.submit([&](sycl::handler &h) { + auto a = b.get_access(h); + h.single_task([=]() { a[0] = 42; }); + }); + } + return r - 42; +}