diff --git a/clang/lib/Sema/SemaSYCL.cpp b/clang/lib/Sema/SemaSYCL.cpp index e7d909e32f372..6d93d5bcb1189 100644 --- a/clang/lib/Sema/SemaSYCL.cpp +++ b/clang/lib/Sema/SemaSYCL.cpp @@ -1672,7 +1672,7 @@ void SYCLIntegrationHeader::emit(raw_ostream &O) { } O << "\n"; - O << "__SYCL_INLINE namespace cl {\n"; + O << "__SYCL_INLINE_NAMESPACE(cl) {\n"; O << "namespace sycl {\n"; O << "namespace detail {\n"; @@ -1765,7 +1765,7 @@ void SYCLIntegrationHeader::emit(raw_ostream &O) { O << "\n"; O << "} // namespace detail\n"; O << "} // namespace sycl\n"; - O << "} // namespace cl\n"; + O << "} // __SYCL_INLINE_NAMESPACE(cl)\n"; O << "\n"; } diff --git a/clang/test/CodeGenSYCL/wrapped-accessor.cpp b/clang/test/CodeGenSYCL/wrapped-accessor.cpp index 95a399a5c2988..0cd651efc58f5 100644 --- a/clang/test/CodeGenSYCL/wrapped-accessor.cpp +++ b/clang/test/CodeGenSYCL/wrapped-accessor.cpp @@ -5,7 +5,7 @@ // CHECK: class wrapped_access; -// CHECK: namespace cl { +// CHECK: __SYCL_INLINE_NAMESPACE(cl) { // CHECK-NEXT: namespace sycl { // CHECK-NEXT: namespace detail { diff --git a/sycl/.clang-format b/sycl/.clang-format index 0b8fc6ba0d580..ae30b40de4a75 100644 --- a/sycl/.clang-format +++ b/sycl/.clang-format @@ -1,2 +1,3 @@ BasedOnStyle: LLVM TypenameMacros: ['PI_CALL' ,'PI_CALL_THROW', 'PI_CALL_NOCHECK'] +NamespaceMacros: ['__SYCL_INLINE_NAMESPACE'] diff --git a/sycl/include/CL/sycl/access/access.hpp b/sycl/include/CL/sycl/access/access.hpp index 415104a5b5343..ce6dea8bd3615 100644 --- a/sycl/include/CL/sycl/access/access.hpp +++ b/sycl/include/CL/sycl/access/access.hpp @@ -9,7 +9,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace access { @@ -180,4 +180,4 @@ struct remove_AS<__OPENCL_CONSTANT_AS__ T> { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/accessor.hpp b/sycl/include/CL/sycl/accessor.hpp index 26f72b73ead8e..ae211384f7778 100644 --- a/sycl/include/CL/sycl/accessor.hpp +++ b/sycl/include/CL/sycl/accessor.hpp @@ -143,7 +143,7 @@ // accessor_common contains several helpers common for both accessor(1) and // accessor(3) -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { template #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { template class vec; namespace detail { @@ -22,7 +22,7 @@ class half; } // namespace half_impl } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) // FIXME: line below exports 'half' into global namespace, which seems incorrect // However, SYCL 1.2.1 spec considers 'half' to be a fundamental C++ data type @@ -69,7 +69,7 @@ using half = cl::sycl::detail::half_impl::half; MAKE_VECTOR_ALIASES_FOR_OPENCL_TYPES(N) \ MAKE_VECTOR_ALIASES_FOR_SIGNED_AND_UNSIGNED_TYPES(N) -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { using byte = std::uint8_t; using schar = signed char; @@ -101,7 +101,7 @@ MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(4) MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(8) MAKE_VECTOR_ALIASES_FOR_VECTOR_LENGTH(16) } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) #undef MAKE_VECTOR_ALIAS #undef MAKE_VECTOR_ALIASES_FOR_ARITHMETIC_TYPES diff --git a/sycl/include/CL/sycl/atomic.hpp b/sycl/include/CL/sycl/atomic.hpp index 7dfe2acb664b7..fc91da7e9096c 100644 --- a/sycl/include/CL/sycl/atomic.hpp +++ b/sycl/include/CL/sycl/atomic.hpp @@ -23,7 +23,7 @@ static_assert(!std::is_same::value, \ "SYCL atomic function not available for float type") -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { enum class memory_order : int { relaxed }; @@ -62,11 +62,11 @@ template <> struct GetSpirvMemoryScope { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) #ifndef __SYCL_DEVICE_ONLY__ // host implementation of SYCL atomics -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { // Translate cl::sycl::memory_order or __spv::MemorySemanticsMask @@ -81,7 +81,7 @@ static inline std::memory_order getStdMemoryOrder(::cl::sycl::memory_order MS) { } } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) // std::atomic version of atomic SPIR-V builtins @@ -161,7 +161,7 @@ extern T __spirv_AtomicMax(std::atomic *Ptr, __spv::Scope S, #endif // !defined(__SYCL_DEVICE_ONLY__) -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { template Object, T Operand, } } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) #undef STATIC_ASSERT_NOT_FLOAT diff --git a/sycl/include/CL/sycl/buffer.hpp b/sycl/include/CL/sycl/buffer.hpp index 3e96f1b960bbc..8181f2628a173 100644 --- a/sycl/include/CL/sycl/buffer.hpp +++ b/sycl/include/CL/sycl/buffer.hpp @@ -14,7 +14,7 @@ // TODO: 4.3.4 Properties -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { class handler; class queue; @@ -396,7 +396,7 @@ buffer(const T *, const range &, const property_list & = {}) #endif // __cpp_deduction_guides } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) namespace std { template diff --git a/sycl/include/CL/sycl/builtins.hpp b/sycl/include/CL/sycl/builtins.hpp index 4053a4a717a6a..21e45c8c5c97e 100644 --- a/sycl/include/CL/sycl/builtins.hpp +++ b/sycl/include/CL/sycl/builtins.hpp @@ -17,7 +17,7 @@ // TODO Decide whether to mark functions with this attribute. #define __NOEXC /*noexcept*/ -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { #ifdef __SYCL_DEVICE_ONLY__ #define __sycl_std @@ -25,9 +25,9 @@ namespace sycl { namespace __sycl_std = __host_std; #endif } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { /* ----------------- 4.13.3 Math functions. ---------------------------------*/ // genfloat acos (genfloat x) @@ -1546,6 +1546,6 @@ detail::enable_if_t::value, T> tan(T x) __NOEXC { } // namespace half_precision } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) #undef __NOEXC diff --git a/sycl/include/CL/sycl/context.hpp b/sycl/include/CL/sycl/context.hpp index 52aeb411ba0b6..67d3f2d559d17 100644 --- a/sycl/include/CL/sycl/context.hpp +++ b/sycl/include/CL/sycl/context.hpp @@ -14,7 +14,7 @@ #include // 4.6.2 Context class -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declarations class device; @@ -139,7 +139,7 @@ class context { }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) namespace std { template <> struct hash { diff --git a/sycl/include/CL/sycl/detail/accessor_impl.hpp b/sycl/include/CL/sycl/detail/accessor_impl.hpp index 1c61ca4470156..23985145fdc74 100644 --- a/sycl/include/CL/sycl/detail/accessor_impl.hpp +++ b/sycl/include/CL/sycl/detail/accessor_impl.hpp @@ -14,7 +14,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -187,4 +187,4 @@ using Requirement = AccessorImplHost; } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/aligned_allocator.hpp b/sycl/include/CL/sycl/detail/aligned_allocator.hpp index d7d35ffb10249..1563d829d2753 100644 --- a/sycl/include/CL/sycl/detail/aligned_allocator.hpp +++ b/sycl/include/CL/sycl/detail/aligned_allocator.hpp @@ -19,7 +19,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { template class aligned_allocator { @@ -80,4 +80,4 @@ template class aligned_allocator { }; } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/array.hpp b/sycl/include/CL/sycl/detail/array.hpp index 3b23e9fca80d0..1a4eaa16820d4 100644 --- a/sycl/include/CL/sycl/detail/array.hpp +++ b/sycl/include/CL/sycl/detail/array.hpp @@ -12,7 +12,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { template class id; template class range; @@ -119,4 +119,4 @@ template class array { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/boolean.hpp b/sycl/include/CL/sycl/detail/boolean.hpp index 4414ebb316228..c7e76f1df33bc 100644 --- a/sycl/include/CL/sycl/detail/boolean.hpp +++ b/sycl/include/CL/sycl/detail/boolean.hpp @@ -14,7 +14,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -140,4 +140,4 @@ template <> struct Boolean<1> { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/buffer_impl.hpp b/sycl/include/CL/sycl/detail/buffer_impl.hpp index 5e1447ffa6d3f..f9c06b96709eb 100644 --- a/sycl/include/CL/sycl/detail/buffer_impl.hpp +++ b/sycl/include/CL/sycl/detail/buffer_impl.hpp @@ -24,7 +24,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declarations template #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -520,4 +520,4 @@ class CGPrefetchUSM : public CG { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/circular_buffer.hpp b/sycl/include/CL/sycl/detail/circular_buffer.hpp index e50b3915aefac..c72c68c39ca82 100644 --- a/sycl/include/CL/sycl/detail/circular_buffer.hpp +++ b/sycl/include/CL/sycl/detail/circular_buffer.hpp @@ -14,7 +14,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -96,4 +96,4 @@ template class CircularBuffer { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/clusm.hpp b/sycl/include/CL/sycl/detail/clusm.hpp index 893982f359bf5..263b871852760 100644 --- a/sycl/include/CL/sycl/detail/clusm.hpp +++ b/sycl/include/CL/sycl/detail/clusm.hpp @@ -17,7 +17,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { namespace usm { @@ -97,4 +97,4 @@ class CLUSM { } // namespace usm } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/common.hpp b/sycl/include/CL/sycl/detail/common.hpp index d366b00739598..2dfe8ef71dc74 100644 --- a/sycl/include/CL/sycl/detail/common.hpp +++ b/sycl/include/CL/sycl/detail/common.hpp @@ -22,7 +22,7 @@ #define STRINGIFY_LINE_HELP(s) #s #define STRINGIFY_LINE(s) STRINGIFY_LINE_HELP(s) -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -33,7 +33,7 @@ static inline std::string codeToString(cl_int code){ stringifyErrorCode(code) + ")"); } -}}} // namespace cl::sycl::detail +}}} // __SYCL_INLINE_NAMESPACE(cl)::sycl::detail #ifdef __SYCL_DEVICE_ONLY__ // TODO remove this when 'assert' is supported in device code @@ -87,7 +87,7 @@ static inline std::string codeToString(cl_int code){ #define CHECK_OCL_CODE_NO_EXC(X) REPORT_OCL_ERR_TO_STREAM(X) #endif -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -252,4 +252,4 @@ constexpr KernelSetId LastKSId = SpvFileKSId; } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/common_info.hpp b/sycl/include/CL/sycl/detail/common_info.hpp index 0ae24b2a996aa..bd05ec22b9db2 100644 --- a/sycl/include/CL/sycl/detail/common_info.hpp +++ b/sycl/include/CL/sycl/detail/common_info.hpp @@ -9,7 +9,7 @@ #pragma once #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -18,4 +18,4 @@ vector_class split_string(const string_class &str, } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/context_impl.hpp b/sycl/include/CL/sycl/detail/context_impl.hpp index ebe5d09037285..2f02352876d2b 100644 --- a/sycl/include/CL/sycl/detail/context_impl.hpp +++ b/sycl/include/CL/sycl/detail/context_impl.hpp @@ -22,7 +22,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declaration class device; @@ -151,4 +151,4 @@ class context_impl { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/context_info.hpp b/sycl/include/CL/sycl/detail/context_info.hpp index f9d73b1f2642e..032b36762cd5e 100644 --- a/sycl/include/CL/sycl/detail/context_info.hpp +++ b/sycl/include/CL/sycl/detail/context_info.hpp @@ -12,7 +12,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -32,4 +32,4 @@ template struct get_context_info { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/defines.hpp b/sycl/include/CL/sycl/detail/defines.hpp index fa896379ef509..b60d2b73f0e74 100644 --- a/sycl/include/CL/sycl/detail/defines.hpp +++ b/sycl/include/CL/sycl/detail/defines.hpp @@ -9,9 +9,9 @@ #pragma once #ifndef __SYCL_DISABLE_NAMESPACE_INLINE__ -#define __SYCL_INLINE inline +#define __SYCL_INLINE_NAMESPACE(X) inline namespace X #else -#define __SYCL_INLINE +#define __SYCL_INLINE_NAMESPACE(X) namespace X #endif // __SYCL_DISABLE_NAMESPACE_INLINE__ #ifndef __has_attribute diff --git a/sycl/include/CL/sycl/detail/device_impl.hpp b/sycl/include/CL/sycl/detail/device_impl.hpp index c10c91ea19bd9..30f3006b8790d 100644 --- a/sycl/include/CL/sycl/detail/device_impl.hpp +++ b/sycl/include/CL/sycl/detail/device_impl.hpp @@ -13,7 +13,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declaration @@ -195,4 +195,4 @@ class device_impl { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/device_info.hpp b/sycl/include/CL/sycl/detail/device_info.hpp index c591f7feb24f8..574a81fba69e1 100644 --- a/sycl/include/CL/sycl/detail/device_info.hpp +++ b/sycl/include/CL/sycl/detail/device_info.hpp @@ -14,7 +14,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -421,4 +421,4 @@ struct get_device_info { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/event_impl.hpp b/sycl/include/CL/sycl/detail/event_impl.hpp index eb4d767a3de0b..7b99145c82a24 100644 --- a/sycl/include/CL/sycl/detail/event_impl.hpp +++ b/sycl/include/CL/sycl/detail/event_impl.hpp @@ -16,7 +16,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { class context; namespace detail { @@ -155,4 +155,4 @@ class event_impl { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/event_info.hpp b/sycl/include/CL/sycl/detail/event_info.hpp index 3863f9ab7f277..8963d849b1144 100644 --- a/sycl/include/CL/sycl/detail/event_info.hpp +++ b/sycl/include/CL/sycl/detail/event_info.hpp @@ -13,7 +13,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -44,4 +44,4 @@ template struct get_event_info { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/force_device.hpp b/sycl/include/CL/sycl/detail/force_device.hpp index e437620803723..0700634ade578 100644 --- a/sycl/include/CL/sycl/detail/force_device.hpp +++ b/sycl/include/CL/sycl/detail/force_device.hpp @@ -11,7 +11,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -21,4 +21,4 @@ info::device_type get_forced_type(); } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/generic_type_lists.hpp b/sycl/include/CL/sycl/detail/generic_type_lists.hpp index 5a7226183d6a3..191b52765c524 100644 --- a/sycl/include/CL/sycl/detail/generic_type_lists.hpp +++ b/sycl/include/CL/sycl/detail/generic_type_lists.hpp @@ -16,7 +16,7 @@ // types of parameters to kernel functions // Forward declarations -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { template class vec; namespace detail { @@ -26,9 +26,9 @@ class half; } // namespace detail using half = detail::half_impl::half; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { namespace gtl { @@ -379,4 +379,4 @@ using nonlocal_address_space_list = } // namespace gvl } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/generic_type_traits.hpp b/sycl/include/CL/sycl/detail/generic_type_traits.hpp index 49dd336835660..522610ecb288a 100644 --- a/sycl/include/CL/sycl/detail/generic_type_traits.hpp +++ b/sycl/include/CL/sycl/detail/generic_type_traits.hpp @@ -18,7 +18,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -628,4 +628,4 @@ template inline void check_vector_size() { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/helpers.hpp b/sycl/include/CL/sycl/detail/helpers.hpp index 0abd35410a22c..44be0771431d1 100644 --- a/sycl/include/CL/sycl/detail/helpers.hpp +++ b/sycl/include/CL/sycl/detail/helpers.hpp @@ -20,7 +20,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { class context; class event; @@ -216,4 +216,4 @@ getSPIRVMemorySemanticsMask(const access::fence_space AccessSpace, } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/host_profiling_info.hpp b/sycl/include/CL/sycl/detail/host_profiling_info.hpp index 2dbdaff963e32..04458a85326b4 100644 --- a/sycl/include/CL/sycl/detail/host_profiling_info.hpp +++ b/sycl/include/CL/sycl/detail/host_profiling_info.hpp @@ -10,7 +10,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -36,4 +36,4 @@ class HostProfilingInfo { }; } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/image_accessor_util.hpp b/sycl/include/CL/sycl/detail/image_accessor_util.hpp index 149388616b8aa..9d3375f98a453 100644 --- a/sycl/include/CL/sycl/detail/image_accessor_util.hpp +++ b/sycl/include/CL/sycl/detail/image_accessor_util.hpp @@ -21,7 +21,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -1083,5 +1083,5 @@ DataT imageReadSamplerHostImpl(const CoordT &Coords, const sampler &Smpl, } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) #endif diff --git a/sycl/include/CL/sycl/detail/image_impl.hpp b/sycl/include/CL/sycl/detail/image_impl.hpp index 12ac8a8bf263e..653ddcba79caf 100644 --- a/sycl/include/CL/sycl/detail/image_impl.hpp +++ b/sycl/include/CL/sycl/detail/image_impl.hpp @@ -18,7 +18,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // forward declarations @@ -303,4 +303,4 @@ template class image_impl final : public SYCLMemObjT { }; } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/image_ocl_types.hpp b/sycl/include/CL/sycl/detail/image_ocl_types.hpp index e8c925f76ef94..83ea63914a8bd 100644 --- a/sycl/include/CL/sycl/detail/image_ocl_types.hpp +++ b/sycl/include/CL/sycl/detail/image_ocl_types.hpp @@ -100,7 +100,7 @@ static RetType __invoke__ImageReadSampler(ImageT Img, CoordT Coords, return cl::sycl::detail::convertDataToType(Ret); } -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -235,7 +235,7 @@ IMAGETY_DISCARD_WRITE_2_DIM_IARRAY } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) #undef INVOKE_SPIRV_CALL_ARG1 #undef IMAGETY_DEFINE diff --git a/sycl/include/CL/sycl/detail/item_base.hpp b/sycl/include/CL/sycl/detail/item_base.hpp index 5b8ae983d36a5..80ef0ab46df05 100644 --- a/sycl/include/CL/sycl/detail/item_base.hpp +++ b/sycl/include/CL/sycl/detail/item_base.hpp @@ -11,7 +11,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { template class id; template class range; @@ -73,4 +73,4 @@ template struct ItemBase { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/kernel_desc.hpp b/sycl/include/CL/sycl/detail/kernel_desc.hpp index ee6af56db4e67..deb0aa04d90ec 100644 --- a/sycl/include/CL/sycl/detail/kernel_desc.hpp +++ b/sycl/include/CL/sycl/detail/kernel_desc.hpp @@ -11,7 +11,7 @@ #include #include // for DLL_LOCAL used in int. header -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -83,4 +83,4 @@ template using KernelInfo = typename KernelInfoImpl::type; } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/kernel_impl.hpp b/sycl/include/CL/sycl/detail/kernel_impl.hpp index 5ec0f156377f1..f30450949415a 100644 --- a/sycl/include/CL/sycl/detail/kernel_impl.hpp +++ b/sycl/include/CL/sycl/detail/kernel_impl.hpp @@ -19,7 +19,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declaration class program; @@ -150,4 +150,4 @@ class kernel_impl { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/kernel_info.hpp b/sycl/include/CL/sycl/detail/kernel_info.hpp index 3ce376b461a79..0b2e04b300646 100644 --- a/sycl/include/CL/sycl/detail/kernel_info.hpp +++ b/sycl/include/CL/sycl/detail/kernel_info.hpp @@ -14,7 +14,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -163,4 +163,4 @@ struct get_kernel_sub_group_info_with_input> { }; } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/kernel_program_cache.hpp b/sycl/include/CL/sycl/detail/kernel_program_cache.hpp index 470650d84f824..4adf89f7fb372 100644 --- a/sycl/include/CL/sycl/detail/kernel_program_cache.hpp +++ b/sycl/include/CL/sycl/detail/kernel_program_cache.hpp @@ -19,7 +19,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { class context_impl; diff --git a/sycl/include/CL/sycl/detail/locked.hpp b/sycl/include/CL/sycl/detail/locked.hpp index b74437102665d..e61c4d36c5059 100644 --- a/sycl/include/CL/sycl/detail/locked.hpp +++ b/sycl/include/CL/sycl/detail/locked.hpp @@ -13,7 +13,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { /// Represents a reference to value with appropriate lock acquired. diff --git a/sycl/include/CL/sycl/detail/memory_manager.hpp b/sycl/include/CL/sycl/detail/memory_manager.hpp index 06921329afa7a..d161ea283c584 100644 --- a/sycl/include/CL/sycl/detail/memory_manager.hpp +++ b/sycl/include/CL/sycl/detail/memory_manager.hpp @@ -16,7 +16,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -137,4 +137,4 @@ class MemoryManager { }; } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/os_util.hpp b/sycl/include/CL/sycl/detail/os_util.hpp index d0a8b95530848..c66695e28eaa0 100644 --- a/sycl/include/CL/sycl/detail/os_util.hpp +++ b/sycl/include/CL/sycl/detail/os_util.hpp @@ -56,7 +56,7 @@ #endif -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -99,4 +99,4 @@ class OSUtil { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/pi.hpp b/sycl/include/CL/sycl/detail/pi.hpp index 5665c990ad3ad..f5aff8e60e0e1 100644 --- a/sycl/include/CL/sycl/detail/pi.hpp +++ b/sycl/include/CL/sycl/detail/pi.hpp @@ -17,7 +17,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -154,4 +154,4 @@ template To pi::cast(From value) { namespace RT = cl::sycl::detail::pi; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/platform_impl.hpp b/sycl/include/CL/sycl/detail/platform_impl.hpp index 991bba721bed8..ef707d5910dbc 100644 --- a/sycl/include/CL/sycl/detail/platform_impl.hpp +++ b/sycl/include/CL/sycl/detail/platform_impl.hpp @@ -14,7 +14,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declaration @@ -115,4 +115,4 @@ class platform_impl { }; } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/platform_info.hpp b/sycl/include/CL/sycl/detail/platform_info.hpp index 96a3a3d3309ab..606e9305b92d1 100644 --- a/sycl/include/CL/sycl/detail/platform_info.hpp +++ b/sycl/include/CL/sycl/detail/platform_info.hpp @@ -13,7 +13,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -69,4 +69,4 @@ vector_class get_platform_info_host(); } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/platform_util.hpp b/sycl/include/CL/sycl/detail/platform_util.hpp index 532368e18079e..bf7a445d349ae 100644 --- a/sycl/include/CL/sycl/detail/platform_util.hpp +++ b/sycl/include/CL/sycl/detail/platform_util.hpp @@ -16,7 +16,7 @@ #define __builtin_expect(a, b) (a) #endif -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -45,4 +45,4 @@ struct PlatformUtil { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/plugin.hpp b/sycl/include/CL/sycl/detail/plugin.hpp index ca7413c669225..e5451dfa79a37 100644 --- a/sycl/include/CL/sycl/detail/plugin.hpp +++ b/sycl/include/CL/sycl/detail/plugin.hpp @@ -11,7 +11,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -73,4 +73,4 @@ class plugin { }; // class plugin } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/program_impl.hpp b/sycl/include/CL/sycl/detail/program_impl.hpp index e7c395c441153..e52bbe62935c1 100644 --- a/sycl/include/CL/sycl/detail/program_impl.hpp +++ b/sycl/include/CL/sycl/detail/program_impl.hpp @@ -21,7 +21,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declarations @@ -386,4 +386,4 @@ vector_class program_impl::get_info() const; } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/program_manager/program_manager.hpp b/sycl/include/CL/sycl/detail/program_manager/program_manager.hpp index 79e3988b7759f..7974a257ed512 100644 --- a/sycl/include/CL/sycl/detail/program_manager/program_manager.hpp +++ b/sycl/include/CL/sycl/detail/program_manager/program_manager.hpp @@ -29,7 +29,7 @@ extern "C" void __sycl_unregister_lib(pi_device_binaries desc); // +++ } -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { class context; namespace detail { @@ -144,4 +144,4 @@ class ProgramManager { }; } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/queue_impl.hpp b/sycl/include/CL/sycl/detail/queue_impl.hpp index a6040a41e5267..11dd3982f6ee5 100644 --- a/sycl/include/CL/sycl/detail/queue_impl.hpp +++ b/sycl/include/CL/sycl/detail/queue_impl.hpp @@ -22,7 +22,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -381,4 +381,4 @@ class queue_impl { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/sampler_impl.hpp b/sycl/include/CL/sycl/detail/sampler_impl.hpp index 07166375f0fd0..36326d60a385a 100644 --- a/sycl/include/CL/sycl/detail/sampler_impl.hpp +++ b/sycl/include/CL/sycl/detail/sampler_impl.hpp @@ -13,7 +13,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { enum class addressing_mode : unsigned int; @@ -59,4 +59,4 @@ class sampler_impl { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/scheduler/commands.hpp b/sycl/include/CL/sycl/detail/scheduler/commands.hpp index 85023f165c5ea..1d243e3642a30 100644 --- a/sycl/include/CL/sycl/detail/scheduler/commands.hpp +++ b/sycl/include/CL/sycl/detail/scheduler/commands.hpp @@ -16,7 +16,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -384,4 +384,4 @@ class UpdateHostRequirementCommand : public Command { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/scheduler/scheduler.hpp b/sycl/include/CL/sycl/detail/scheduler/scheduler.hpp index 9fff10ee6b80c..ddfb70a62883e 100644 --- a/sycl/include/CL/sycl/detail/scheduler/scheduler.hpp +++ b/sycl/include/CL/sycl/detail/scheduler/scheduler.hpp @@ -19,7 +19,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -230,4 +230,4 @@ class Scheduler { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/stl_type_traits.hpp b/sycl/include/CL/sycl/detail/stl_type_traits.hpp index 63ab19ec6eb65..163248a989e68 100644 --- a/sycl/include/CL/sycl/detail/stl_type_traits.hpp +++ b/sycl/include/CL/sycl/detail/stl_type_traits.hpp @@ -12,7 +12,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -79,4 +79,4 @@ struct is_output_iterator> { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/stream_impl.hpp b/sycl/include/CL/sycl/detail/stream_impl.hpp index 81015b12c00e9..d91897264ec50 100644 --- a/sycl/include/CL/sycl/detail/stream_impl.hpp +++ b/sycl/include/CL/sycl/detail/stream_impl.hpp @@ -15,7 +15,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -686,4 +686,4 @@ inline void writeHItem(stream_impl::FlushBufAccessorT &FlushBufs, } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/sycl_mem_obj_allocator.hpp b/sycl/include/CL/sycl/detail/sycl_mem_obj_allocator.hpp index 09256d8bf9925..512e105b60bf6 100644 --- a/sycl/include/CL/sycl/detail/sycl_mem_obj_allocator.hpp +++ b/sycl/include/CL/sycl/detail/sycl_mem_obj_allocator.hpp @@ -8,7 +8,7 @@ #pragma once -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { diff --git a/sycl/include/CL/sycl/detail/sycl_mem_obj_i.hpp b/sycl/include/CL/sycl/detail/sycl_mem_obj_i.hpp index 99ae65039fd78..1e1d4a0a6f059 100644 --- a/sycl/include/CL/sycl/detail/sycl_mem_obj_i.hpp +++ b/sycl/include/CL/sycl/detail/sycl_mem_obj_i.hpp @@ -11,7 +11,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -70,4 +70,4 @@ class SYCLMemObjI { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/sycl_mem_obj_t.hpp b/sycl/include/CL/sycl/detail/sycl_mem_obj_t.hpp index af2bab740d4b0..6337f34eeeedc 100644 --- a/sycl/include/CL/sycl/detail/sycl_mem_obj_t.hpp +++ b/sycl/include/CL/sycl/detail/sycl_mem_obj_t.hpp @@ -21,7 +21,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -294,4 +294,4 @@ class SYCLMemObjT : public SYCLMemObjI { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/type_list.hpp b/sycl/include/CL/sycl/detail/type_list.hpp index d8d06958292b1..3f68f9ec178a4 100644 --- a/sycl/include/CL/sycl/detail/type_list.hpp +++ b/sycl/include/CL/sycl/detail/type_list.hpp @@ -13,7 +13,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -137,4 +137,4 @@ using find_twice_as_large_type_t = find_type_t; } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/type_traits.hpp b/sycl/include/CL/sycl/detail/type_traits.hpp index c11e443f63ed9..4050c2742b66d 100644 --- a/sycl/include/CL/sycl/detail/type_traits.hpp +++ b/sycl/include/CL/sycl/detail/type_traits.hpp @@ -15,7 +15,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { namespace half_impl { @@ -286,4 +286,4 @@ template using make_larger_t = typename make_larger::type; } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/usm_dispatch.hpp b/sycl/include/CL/sycl/detail/usm_dispatch.hpp index 966f53991f8e5..e8ea5b4fd1a97 100644 --- a/sycl/include/CL/sycl/detail/usm_dispatch.hpp +++ b/sycl/include/CL/sycl/detail/usm_dispatch.hpp @@ -11,7 +11,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { namespace usm { @@ -74,4 +74,4 @@ class USMDispatcher { } // namespace usm } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/usm_impl.hpp b/sycl/include/CL/sycl/detail/usm_impl.hpp index 26dd72b41e93e..c5b234ace7424 100644 --- a/sycl/include/CL/sycl/detail/usm_impl.hpp +++ b/sycl/include/CL/sycl/detail/usm_impl.hpp @@ -11,7 +11,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { namespace usm { @@ -27,4 +27,4 @@ void free(void *Ptr, const context &Ctxt); } // namespace usm } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/detail/util.hpp b/sycl/include/CL/sycl/detail/util.hpp index 8263f316daf59..f5fc55d2e928c 100644 --- a/sycl/include/CL/sycl/detail/util.hpp +++ b/sycl/include/CL/sycl/detail/util.hpp @@ -14,7 +14,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -32,6 +32,6 @@ class Sync { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) #endif //__SYCL_DEVICE_ONLY diff --git a/sycl/include/CL/sycl/device.hpp b/sycl/include/CL/sycl/device.hpp index 08f11247f4cc1..cdd0b76428f0e 100644 --- a/sycl/include/CL/sycl/device.hpp +++ b/sycl/include/CL/sycl/device.hpp @@ -15,7 +15,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declarations class device_selector; @@ -167,7 +167,7 @@ class device { }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) namespace std { template <> struct hash { diff --git a/sycl/include/CL/sycl/device_event.hpp b/sycl/include/CL/sycl/device_event.hpp index 72270e04b8684..6c49cfa5d1731 100644 --- a/sycl/include/CL/sycl/device_event.hpp +++ b/sycl/include/CL/sycl/device_event.hpp @@ -11,7 +11,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { class device_event { @@ -32,4 +32,4 @@ class device_event { }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/device_selector.hpp b/sycl/include/CL/sycl/device_selector.hpp index 8fca60ec76abb..67bb373298e94 100644 --- a/sycl/include/CL/sycl/device_selector.hpp +++ b/sycl/include/CL/sycl/device_selector.hpp @@ -10,7 +10,7 @@ // 4.6.1 Device selection class -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declarations @@ -51,4 +51,4 @@ class host_selector : public device_selector { }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/event.hpp b/sycl/include/CL/sycl/event.hpp index cdfa487e7ea86..ba6248a2b8908 100644 --- a/sycl/include/CL/sycl/event.hpp +++ b/sycl/include/CL/sycl/event.hpp @@ -14,7 +14,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declaration class context; @@ -125,7 +125,7 @@ class event { }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) namespace std { template <> struct hash { diff --git a/sycl/include/CL/sycl/exception.hpp b/sycl/include/CL/sycl/exception.hpp index a01971aa5d662..826f394e99b0d 100644 --- a/sycl/include/CL/sycl/exception.hpp +++ b/sycl/include/CL/sycl/exception.hpp @@ -15,7 +15,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declaration @@ -109,4 +109,4 @@ class feature_not_supported : public device_error { }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/exception_list.hpp b/sycl/include/CL/sycl/exception_list.hpp index 6864732a8a5d4..9470ba14848ff 100644 --- a/sycl/include/CL/sycl/exception_list.hpp +++ b/sycl/include/CL/sycl/exception_list.hpp @@ -15,7 +15,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declaration @@ -49,4 +49,4 @@ class exception_list { using async_handler = function_class; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/group.hpp b/sycl/include/CL/sycl/group.hpp index e96759a911e35..7fc777a53e644 100644 --- a/sycl/include/CL/sycl/group.hpp +++ b/sycl/include/CL/sycl/group.hpp @@ -21,7 +21,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { class Builder; @@ -355,4 +355,4 @@ template class group { }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/h_item.hpp b/sycl/include/CL/sycl/h_item.hpp index fc8053afe5de4..2d2f129149650 100644 --- a/sycl/include/CL/sycl/h_item.hpp +++ b/sycl/include/CL/sycl/h_item.hpp @@ -13,7 +13,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -130,4 +130,4 @@ template class h_item { }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/half_type.hpp b/sycl/include/CL/sycl/half_type.hpp index 08d51e3580e14..ee25b5a6fabd1 100644 --- a/sycl/include/CL/sycl/half_type.hpp +++ b/sycl/include/CL/sycl/half_type.hpp @@ -18,7 +18,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { namespace host_half_impl { @@ -209,7 +209,7 @@ inline float cast_if_host_half(half_impl::half val) { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) using half = cl::sycl::detail::half_impl::half; diff --git a/sycl/include/CL/sycl/handler.hpp b/sycl/include/CL/sycl/handler.hpp index 1e7b88663a723..8dbc3fbe5c1e3 100644 --- a/sycl/include/CL/sycl/handler.hpp +++ b/sycl/include/CL/sycl/handler.hpp @@ -54,7 +54,7 @@ template class __copyAcc2Acc; -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declaration @@ -1287,4 +1287,4 @@ class handler { friend class detail::stream_impl; }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/id.hpp b/sycl/include/CL/sycl/id.hpp index f67855653391f..65f68652312d3 100644 --- a/sycl/include/CL/sycl/id.hpp +++ b/sycl/include/CL/sycl/id.hpp @@ -13,7 +13,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { template class range; template class item; @@ -271,4 +271,4 @@ __SYCL_INLINE namespace cl { #endif } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/image.hpp b/sycl/include/CL/sycl/image.hpp index b29367e682526..201e4efee6c6e 100644 --- a/sycl/include/CL/sycl/image.hpp +++ b/sycl/include/CL/sycl/image.hpp @@ -16,7 +16,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { enum class image_channel_order : unsigned int { @@ -292,7 +292,7 @@ class image { }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) namespace std { template diff --git a/sycl/include/CL/sycl/info/info_desc.hpp b/sycl/include/CL/sycl/info/info_desc.hpp index 8ba8adfc22982..df5765c3c79ba 100644 --- a/sycl/include/CL/sycl/info/info_desc.hpp +++ b/sycl/include/CL/sycl/info/info_desc.hpp @@ -12,7 +12,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { class program; @@ -283,4 +283,4 @@ template class param_traits {}; } // namespace info } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/intel/builtins.hpp b/sycl/include/CL/sycl/intel/builtins.hpp index ded8ccf50208b..a9c93393e360c 100644 --- a/sycl/include/CL/sycl/intel/builtins.hpp +++ b/sycl/include/CL/sycl/intel/builtins.hpp @@ -18,7 +18,7 @@ extern int __spirv_ocl_printf(const CONSTANT_AS char *__format, ...); #define CONSTANT_AS #endif -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace intel { namespace experimental { @@ -72,6 +72,6 @@ int printf(const CONSTANT_AS char *__format, Args... args) { } // namespace experimental } // namespace intel } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) #undef CONSTANT_AS diff --git a/sycl/include/CL/sycl/intel/fpga_device_selector.hpp b/sycl/include/CL/sycl/intel/fpga_device_selector.hpp index 7979eb4a71068..ca4f1031a4e06 100644 --- a/sycl/include/CL/sycl/intel/fpga_device_selector.hpp +++ b/sycl/include/CL/sycl/intel/fpga_device_selector.hpp @@ -10,7 +10,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace intel { @@ -48,4 +48,4 @@ class fpga_emulator_selector : public platform_selector { } // namespace intel } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/intel/fpga_reg.hpp b/sycl/include/CL/sycl/intel/fpga_reg.hpp index 4fee91ed109ec..ca619dcd38e8e 100644 --- a/sycl/include/CL/sycl/intel/fpga_reg.hpp +++ b/sycl/include/CL/sycl/intel/fpga_reg.hpp @@ -8,7 +8,7 @@ #pragma once -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace intel { @@ -22,7 +22,7 @@ template T fpga_reg(const T &t) { } // namespace intel } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) // Keep it consistent with FPGA attributes like intelfpga::memory() // Currently clang does not support nested namespace for attributes diff --git a/sycl/include/CL/sycl/intel/function_pointer.hpp b/sycl/include/CL/sycl/intel/function_pointer.hpp index 297bb0b3b656b..b3faf3f282c16 100644 --- a/sycl/include/CL/sycl/intel/function_pointer.hpp +++ b/sycl/include/CL/sycl/intel/function_pointer.hpp @@ -15,7 +15,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { cl_ulong getDeviceFunctionPointerImpl(device &D, program &P, @@ -84,4 +84,4 @@ device_func_ptr_holder_t get_device_func_ptr(FuncType F, const char *FuncName, } } // namespace intel } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/intel/functional.hpp b/sycl/include/CL/sycl/intel/functional.hpp index 88b40489a0848..0971d9089205c 100644 --- a/sycl/include/CL/sycl/intel/functional.hpp +++ b/sycl/include/CL/sycl/intel/functional.hpp @@ -9,7 +9,7 @@ #pragma once #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace intel { @@ -55,4 +55,4 @@ template using plus = std::plus; } // namespace intel } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/intel/pipes.hpp b/sycl/include/CL/sycl/intel/pipes.hpp index e670f83817006..9ba1cad5bf0b9 100644 --- a/sycl/include/CL/sycl/intel/pipes.hpp +++ b/sycl/include/CL/sycl/intel/pipes.hpp @@ -12,7 +12,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace intel { @@ -86,4 +86,4 @@ template class pipe { } // namespace intel } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/intel/sub_group.hpp b/sycl/include/CL/sycl/intel/sub_group.hpp index 5bd6d986de0b8..c591ceb4a19bc 100644 --- a/sycl/include/CL/sycl/intel/sub_group.hpp +++ b/sycl/include/CL/sycl/intel/sub_group.hpp @@ -24,7 +24,7 @@ #ifdef __SYCL_DEVICE_ONLY__ -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { template class multi_ptr; @@ -373,7 +373,7 @@ struct sub_group { }; } // namespace intel } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) #else #include #endif diff --git a/sycl/include/CL/sycl/intel/sub_group_host.hpp b/sycl/include/CL/sycl/intel/sub_group_host.hpp index 441c229c8bf44..d6fade163b117 100644 --- a/sycl/include/CL/sycl/intel/sub_group_host.hpp +++ b/sycl/include/CL/sycl/intel/sub_group_host.hpp @@ -15,7 +15,7 @@ #include #ifndef __SYCL_DEVICE_ONLY__ -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { template class multi_ptr; namespace intel { @@ -159,5 +159,5 @@ struct sub_group { }; } // namespace intel } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) #endif diff --git a/sycl/include/CL/sycl/item.hpp b/sycl/include/CL/sycl/item.hpp index 10c7003cfa9cb..ed7a0d89a47ad 100644 --- a/sycl/include/CL/sycl/item.hpp +++ b/sycl/include/CL/sycl/item.hpp @@ -14,7 +14,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { class Builder; @@ -84,4 +84,4 @@ template class item { }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/kernel.hpp b/sycl/include/CL/sycl/kernel.hpp index 79e72aa4f5aab..cdf02bf253147 100644 --- a/sycl/include/CL/sycl/kernel.hpp +++ b/sycl/include/CL/sycl/kernel.hpp @@ -14,7 +14,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declaration class program; @@ -127,7 +127,7 @@ class kernel { friend T detail::createSyclObjFromImpl(decltype(T::impl) ImplObj); }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) namespace std { template <> struct hash { diff --git a/sycl/include/CL/sycl/multi_ptr.hpp b/sycl/include/CL/sycl/multi_ptr.hpp index c3a05f08cc580..808d165e868d1 100644 --- a/sycl/include/CL/sycl/multi_ptr.hpp +++ b/sycl/include/CL/sycl/multi_ptr.hpp @@ -14,7 +14,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declaration template &rhs) { } } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/nd_item.hpp b/sycl/include/CL/sycl/nd_item.hpp index e24db34c1ddb7..f7cd04bd1da85 100644 --- a/sycl/include/CL/sycl/nd_item.hpp +++ b/sycl/include/CL/sycl/nd_item.hpp @@ -22,7 +22,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { class Builder; @@ -166,4 +166,4 @@ template class nd_item { group Group; }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/nd_range.hpp b/sycl/include/CL/sycl/nd_range.hpp index 2e90636c138ba..c831c0c2f4a2e 100644 --- a/sycl/include/CL/sycl/nd_range.hpp +++ b/sycl/include/CL/sycl/nd_range.hpp @@ -13,7 +13,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { template class nd_range { @@ -55,4 +55,4 @@ template class nd_range { }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/ordered_queue.hpp b/sycl/include/CL/sycl/ordered_queue.hpp index bc605de0ed830..0914254631d76 100644 --- a/sycl/include/CL/sycl/ordered_queue.hpp +++ b/sycl/include/CL/sycl/ordered_queue.hpp @@ -18,7 +18,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declaration @@ -168,7 +168,7 @@ class __SYCL_DEPRECATED__ ordered_queue { #undef __SYCL_DEPRECATED__ } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) namespace std { template <> struct hash { diff --git a/sycl/include/CL/sycl/pipes.hpp b/sycl/include/CL/sycl/pipes.hpp index 5eb1f3d654bf2..e02fa1155592f 100644 --- a/sycl/include/CL/sycl/pipes.hpp +++ b/sycl/include/CL/sycl/pipes.hpp @@ -10,9 +10,9 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { template using pipe = intel::pipe; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/platform.hpp b/sycl/include/CL/sycl/platform.hpp index 4facc7c2bc733..2bfc7bbc2cd5d 100644 --- a/sycl/include/CL/sycl/platform.hpp +++ b/sycl/include/CL/sycl/platform.hpp @@ -13,7 +13,7 @@ // 4.6.2 Platform class #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // TODO: make code thread-safe @@ -110,7 +110,7 @@ class platform { }; // class platform } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) namespace std { template <> struct hash { diff --git a/sycl/include/CL/sycl/pointers.hpp b/sycl/include/CL/sycl/pointers.hpp index 4141d59b4701f..9f91ba70ee6b7 100644 --- a/sycl/include/CL/sycl/pointers.hpp +++ b/sycl/include/CL/sycl/pointers.hpp @@ -10,7 +10,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { template class multi_ptr; @@ -31,4 +31,4 @@ using private_ptr = multi_ptr; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/program.hpp b/sycl/include/CL/sycl/program.hpp index ed65f3f43262c..59f42d2e727ac 100644 --- a/sycl/include/CL/sycl/program.hpp +++ b/sycl/include/CL/sycl/program.hpp @@ -15,7 +15,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declarations @@ -338,7 +338,7 @@ class program { friend T detail::createSyclObjFromImpl(decltype(T::impl) ImplObj); }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) namespace std { template <> struct hash { diff --git a/sycl/include/CL/sycl/property_list.hpp b/sycl/include/CL/sycl/property_list.hpp index 45cfc9b79c1a4..8624b349d8c84 100644 --- a/sycl/include/CL/sycl/property_list.hpp +++ b/sycl/include/CL/sycl/property_list.hpp @@ -13,7 +13,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // HOW TO ADD NEW PROPERTY INSTRUCTION: @@ -249,4 +249,4 @@ class property_list { }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/queue.hpp b/sycl/include/CL/sycl/queue.hpp index 4233e6474d05f..805c38286e9c4 100644 --- a/sycl/include/CL/sycl/queue.hpp +++ b/sycl/include/CL/sycl/queue.hpp @@ -18,7 +18,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declaration @@ -441,7 +441,7 @@ class queue { }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) namespace std { template <> struct hash { diff --git a/sycl/include/CL/sycl/range.hpp b/sycl/include/CL/sycl/range.hpp index 1355818c6a985..539b7070c3bc7 100644 --- a/sycl/include/CL/sycl/range.hpp +++ b/sycl/include/CL/sycl/range.hpp @@ -12,7 +12,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { template class id; template class range : public detail::array { @@ -141,4 +141,4 @@ range(size_t, size_t, size_t)->range<3>; #endif } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/sampler.hpp b/sycl/include/CL/sycl/sampler.hpp index 5c10eab555854..a7741cb9bb50a 100644 --- a/sycl/include/CL/sycl/sampler.hpp +++ b/sycl/include/CL/sycl/sampler.hpp @@ -13,7 +13,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { enum class addressing_mode : unsigned int { mirrored_repeat = CL_ADDRESS_MIRRORED_REPEAT, @@ -84,7 +84,7 @@ class sampler { friend class detail::image_accessor; }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) namespace std { template <> struct hash { diff --git a/sycl/include/CL/sycl/stl.hpp b/sycl/include/CL/sycl/stl.hpp index c9dcb85c7b28e..f57fc0674c8fe 100644 --- a/sycl/include/CL/sycl/stl.hpp +++ b/sycl/include/CL/sycl/stl.hpp @@ -19,7 +19,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { template < class T, class Alloc = std::allocator > diff --git a/sycl/include/CL/sycl/stream.hpp b/sycl/include/CL/sycl/stream.hpp index 01c44397c5d95..c8165ab250a92 100644 --- a/sycl/include/CL/sycl/stream.hpp +++ b/sycl/include/CL/sycl/stream.hpp @@ -10,7 +10,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { enum class stream_manipulator { @@ -477,7 +477,7 @@ inline const stream &operator<<(const stream &Out, const T &RHS) { } } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) namespace std { template <> struct hash { size_t operator()(const cl::sycl::stream &S) const { diff --git a/sycl/include/CL/sycl/types.hpp b/sycl/include/CL/sycl/types.hpp index 7ce41370810ff..efc0eb55e1157 100644 --- a/sycl/include/CL/sycl/types.hpp +++ b/sycl/include/CL/sycl/types.hpp @@ -62,7 +62,7 @@ // 4.10.1: Scalar data types // 4.10.2: SYCL vector types -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { enum class rounding_mode { automatic, rte, rtz, rtp, rtn }; @@ -1755,7 +1755,7 @@ __SYCL_RELLOGOP(||) #undef __SYCL_RELLOGOP } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) #ifdef __SYCL_USE_EXT_VECTOR_TYPE__ @@ -1819,7 +1819,7 @@ using __half8_vec_t = cl::sycl::detail::half_impl::Vec8StorageT; using __half16_vec_t = cl::sycl::detail::half_impl::Vec16StorageT; #define GET_CL_HALF_TYPE(target, num) __##target##num##_vec_t -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { // select_apply_cl_t selects from T8/T16/T32/T64 basing on @@ -1995,6 +1995,6 @@ DECLARE_FLOAT_VECTOR_CONVERTERS(double) #undef DECLARE_SCALAR_SCHAR_CONVERTER } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) #undef SYCL_ALIGNAS diff --git a/sycl/include/CL/sycl/usm.hpp b/sycl/include/CL/sycl/usm.hpp index 50f2b81eec833..e9b1d51d748ca 100644 --- a/sycl/include/CL/sycl/usm.hpp +++ b/sycl/include/CL/sycl/usm.hpp @@ -12,7 +12,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { /// // Explicit USM @@ -160,4 +160,4 @@ usm::alloc get_pointer_type(const void *ptr, const context &ctxt); device get_pointer_device(const void *ptr, const context &ctxt); } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/usm/usm_allocator.hpp b/sycl/include/CL/sycl/usm/usm_allocator.hpp index 14c735eeb7f61..ff6526bc1cbf5 100644 --- a/sycl/include/CL/sycl/usm/usm_allocator.hpp +++ b/sycl/include/CL/sycl/usm/usm_allocator.hpp @@ -16,7 +16,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { // Forward declarations. @@ -163,4 +163,4 @@ class usm_allocator { }; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/CL/sycl/usm/usm_enums.hpp b/sycl/include/CL/sycl/usm/usm_enums.hpp index 502ca66da1963..a4a1ef67cab43 100644 --- a/sycl/include/CL/sycl/usm/usm_enums.hpp +++ b/sycl/include/CL/sycl/usm/usm_enums.hpp @@ -7,7 +7,7 @@ // ===--------------------------------------------------------------------=== // #pragma once -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace usm { @@ -15,4 +15,4 @@ enum class alloc { host, device, shared, unknown }; } // namespace usm } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/context.cpp b/sycl/source/context.cpp index 022c439b2682d..f8b502f81cae3 100644 --- a/sycl/source/context.cpp +++ b/sycl/source/context.cpp @@ -21,7 +21,7 @@ // 4.6.2 Context class -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { context::context(const async_handler &AsyncHandler) : context(default_selector().select_device(), AsyncHandler) {} @@ -88,4 +88,4 @@ vector_class context::get_devices() const { context::context(shared_ptr_class Impl) : impl(Impl) {} } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/accessor_impl.cpp b/sycl/source/detail/accessor_impl.cpp index 9df50b1b9c1df..4a119f4d78ab7 100644 --- a/sycl/source/detail/accessor_impl.cpp +++ b/sycl/source/detail/accessor_impl.cpp @@ -9,7 +9,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { diff --git a/sycl/source/detail/buffer_impl.cpp b/sycl/source/detail/buffer_impl.cpp index 542fcd4b27282..9117eddd64af1 100644 --- a/sycl/source/detail/buffer_impl.cpp +++ b/sycl/source/detail/buffer_impl.cpp @@ -11,7 +11,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { void *buffer_impl::allocateMem(ContextImplPtr Context, bool InitFromUserData, @@ -34,4 +34,4 @@ void *buffer_impl::allocateMem(ContextImplPtr Context, bool InitFromUserData, } } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/builtins_common.cpp b/sycl/source/detail/builtins_common.cpp index b60af85cd4b5a..d9e4ad91cd4f0 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; -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace __host_std { namespace { @@ -184,4 +184,4 @@ MAKE_1V(sign, s::cl_double, s::cl_double) MAKE_1V(sign, s::cl_half, s::cl_half) } // namespace __host_std -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/builtins_geometric.cpp b/sycl/source/detail/builtins_geometric.cpp index fe6466c5609e4..2d48b1062f7ac 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; -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace __host_std { s::cl_float Dot(s::cl_float2, s::cl_float2); @@ -222,4 +222,4 @@ s::cl_float fast_distance(s::cl_float4 p0, s::cl_float4 p1) { } } // namespace __host_std -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/builtins_helper.hpp b/sycl/source/detail/builtins_helper.hpp index 1d46c731ae86e..948182a65475a 100644 --- a/sycl/source/detail/builtins_helper.hpp +++ b/sycl/source/detail/builtins_helper.hpp @@ -206,7 +206,7 @@ __MAKE_1V_2V_3P(Fun, 8, Ret, Arg1, Arg2, Arg3) \ __MAKE_1V_2V_3P(Fun, 16, Ret, Arg1, Arg2, Arg3) -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace __host_std { namespace detail { @@ -357,4 +357,4 @@ template <> struct helper<0> { } // namespace detail } // namespace __host_std -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/builtins_integer.cpp b/sycl/source/detail/builtins_integer.cpp index 7bc5cbcf0bbc6..98a272648e43d 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; -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace __host_std { namespace { @@ -779,4 +779,4 @@ s::cl_int s_mul24(s::cl_int x, s::cl_int y) __NOEXC { return __mul24(x, y); } MAKE_1V_2V(s_mul24, s::cl_int, s::cl_int, s::cl_int) } // namespace __host_std -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/builtins_math.cpp b/sycl/source/detail/builtins_math.cpp index b7cfe5b982db9..a71c13034b5cb 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; -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace __host_std { namespace { @@ -871,4 +871,4 @@ s::cl_float half_tan(s::cl_float x) __NOEXC { return std::tan(x); } MAKE_1V(half_tan, s::cl_float, s::cl_float) } // namespace __host_std -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/builtins_relational.cpp b/sycl/source/detail/builtins_relational.cpp index bbcd9fe0c1c9a..289b40ecbf237 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; -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace __host_std { namespace { @@ -452,4 +452,4 @@ MAKE_SC_FSC_1V_2V_3V_FV(select, __vselect, s::cl_half, s::cl_half, s::cl_half, MAKE_SC_FSC_1V_2V_3V_FV(select, __vselect, s::cl_half, s::cl_half, s::cl_half, s::cl_ushort) } // namespace __host_std -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/common.cpp b/sycl/source/detail/common.cpp index dc6e19b83aac3..c1a9be853d8cc 100644 --- a/sycl/source/detail/common.cpp +++ b/sycl/source/detail/common.cpp @@ -9,7 +9,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -239,4 +239,4 @@ vector_class split_string(const string_class &str, } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/config.cpp b/sycl/source/detail/config.cpp index dc8db099069d7..d37626c1526c2 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) -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -111,7 +111,7 @@ void dumpConfig() { #undef CONFIG } -} // 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 5c006a8874d46..903b95916dc15 100644 --- a/sycl/source/detail/config.hpp +++ b/sycl/source/detail/config.hpp @@ -10,7 +10,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -98,6 +98,6 @@ template class SYCLConfig { } }; -} // 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 5a65da6defd1c..12dfe2ab41b1a 100644 --- a/sycl/source/detail/context_impl.cpp +++ b/sycl/source/detail/context_impl.cpp @@ -17,7 +17,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -127,4 +127,4 @@ KernelProgramCache &context_impl::getKernelProgramCache() const { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/device_impl.cpp b/sycl/source/detail/device_impl.cpp index 92f31dc6bf9f8..1a4c4980623bc 100644 --- a/sycl/source/detail/device_impl.cpp +++ b/sycl/source/detail/device_impl.cpp @@ -11,7 +11,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -198,4 +198,4 @@ vector_class device_impl::create_sub_devices( } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/device_info.cpp b/sycl/source/detail/device_info.cpp index b380bcc72b511..948b402585e78 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 -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -525,4 +525,4 @@ template <> bool get_device_info_host() { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/error_handling/enqueue_kernel.cpp b/sycl/source/detail/error_handling/enqueue_kernel.cpp index eda04af33c10b..729770f373124 100644 --- a/sycl/source/detail/error_handling/enqueue_kernel.cpp +++ b/sycl/source/detail/error_handling/enqueue_kernel.cpp @@ -15,7 +15,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -188,4 +188,4 @@ bool handleError(pi_result Error, const device_impl &DeviceImpl, } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/error_handling/error_handling.hpp b/sycl/source/detail/error_handling/error_handling.hpp index c0e77b6a2df8c..29c2df1979cba 100644 --- a/sycl/source/detail/error_handling/error_handling.hpp +++ b/sycl/source/detail/error_handling/error_handling.hpp @@ -12,7 +12,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -30,4 +30,4 @@ bool handleError(pi_result, const device_impl &, pi_kernel, const NDRDescT &); } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/event_impl.cpp b/sycl/source/detail/event_impl.cpp index 6bd4f49f2ffdb..8ad3ab3706a86 100644 --- a/sycl/source/detail/event_impl.cpp +++ b/sycl/source/detail/event_impl.cpp @@ -15,7 +15,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -181,4 +181,4 @@ void HostProfilingInfo::end() { EndTime = getTimestamp(); } } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/force_device.cpp b/sycl/source/detail/force_device.cpp index 95335687ad3ba..e23c53704405d 100644 --- a/sycl/source/detail/force_device.cpp +++ b/sycl/source/detail/force_device.cpp @@ -11,7 +11,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -39,4 +39,4 @@ info::device_type get_forced_type() { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/helpers.cpp b/sycl/source/detail/helpers.cpp index e93d425aa8387..8dcd3871787cf 100644 --- a/sycl/source/detail/helpers.cpp +++ b/sycl/source/detail/helpers.cpp @@ -14,7 +14,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { using ContextImplPtr = std::shared_ptr; namespace detail { @@ -41,4 +41,4 @@ void waitEvents(std::vector DepEvents) { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/image_accessor_util.cpp b/sycl/source/detail/image_accessor_util.cpp index de6524dea30a8..06b32c56a0556 100644 --- a/sycl/source/detail/image_accessor_util.cpp +++ b/sycl/source/detail/image_accessor_util.cpp @@ -9,7 +9,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -189,4 +189,4 @@ cl_float4 getBorderColor(const image_channel_order ImgChannelOrder) { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/image_impl.cpp b/sycl/source/detail/image_impl.cpp index eb521977f173c..3c4fc11917f6f 100644 --- a/sycl/source/detail/image_impl.cpp +++ b/sycl/source/detail/image_impl.cpp @@ -12,7 +12,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -418,4 +418,4 @@ template class image_impl<3>; } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/kernel_impl.cpp b/sycl/source/detail/kernel_impl.cpp index 5e1f3e9a8fb81..2b50fccc67a09 100644 --- a/sycl/source/detail/kernel_impl.cpp +++ b/sycl/source/detail/kernel_impl.cpp @@ -15,7 +15,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -158,4 +158,4 @@ bool kernel_impl::isCreatedFromSource() const { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/kernel_info.cpp b/sycl/source/detail/kernel_info.cpp index aa38ad5056835..555835296cb07 100644 --- a/sycl/source/detail/kernel_info.cpp +++ b/sycl/source/detail/kernel_info.cpp @@ -9,7 +9,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { template <> @@ -50,4 +50,4 @@ get_kernel_work_group_info_host( } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/kernel_program_cache.cpp b/sycl/source/detail/kernel_program_cache.cpp index 8ef141ebfcf39..de8e03159dafb 100644 --- a/sycl/source/detail/kernel_program_cache.cpp +++ b/sycl/source/detail/kernel_program_cache.cpp @@ -10,7 +10,7 @@ #include #include -__SYCL_INLINE 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 c7d38cfaf67a1..c44248f86a662 100644 --- a/sycl/source/detail/memory_manager.cpp +++ b/sycl/source/detail/memory_manager.cpp @@ -17,7 +17,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -545,4 +545,4 @@ void MemoryManager::prefetch_usm(void *Mem, QueueImplPtr Queue, size_t Length, } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/os_util.cpp b/sycl/source/detail/os_util.cpp index 9fcc7ccd03949..7d1f4936cb047 100644 --- a/sycl/source/detail/os_util.cpp +++ b/sycl/source/detail/os_util.cpp @@ -44,7 +44,7 @@ #endif // SYCL_RT_OS -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -261,4 +261,4 @@ void OSUtil::alignedFree(void *Ptr) { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/pi.cpp b/sycl/source/detail/pi.cpp index 0063505cee61f..991346a3c41dd 100644 --- a/sycl/source/detail/pi.cpp +++ b/sycl/source/detail/pi.cpp @@ -16,7 +16,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { namespace pi { @@ -151,4 +151,4 @@ void assertion(bool Condition, const char *Message) { } // namespace pi } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/platform_impl.cpp b/sycl/source/detail/platform_impl.cpp index 201addb70c2f9..364ca7158153f 100644 --- a/sycl/source/detail/platform_impl.cpp +++ b/sycl/source/detail/platform_impl.cpp @@ -16,7 +16,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -268,4 +268,4 @@ platform_impl::get_info() const { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/platform_info.cpp b/sycl/source/detail/platform_info.cpp index c06be8d424677..9161e00dc4d1b 100644 --- a/sycl/source/detail/platform_info.cpp +++ b/sycl/source/detail/platform_info.cpp @@ -8,7 +8,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -37,4 +37,4 @@ get_platform_info_host() { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/platform_util.cpp b/sycl/source/detail/platform_util.cpp index 6027eec91c39c..5929f049e277b 100644 --- a/sycl/source/detail/platform_util.cpp +++ b/sycl/source/detail/platform_util.cpp @@ -16,7 +16,7 @@ #include #endif -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -143,4 +143,4 @@ void PlatformUtil::prefetch(const char *Ptr, size_t NumBytes) { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/posix_pi.cpp b/sycl/source/detail/posix_pi.cpp index 77080dd40a6f8..db21e2fa01ced 100644 --- a/sycl/source/detail/posix_pi.cpp +++ b/sycl/source/detail/posix_pi.cpp @@ -11,7 +11,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { namespace pi { @@ -29,4 +29,4 @@ void *getOsLibraryFuncAddress(void *Library, const std::string &FunctionName) { } // namespace pi } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/program_impl.cpp b/sycl/source/detail/program_impl.cpp index abb5f1dca04dd..a529d974082a4 100644 --- a/sycl/source/detail/program_impl.cpp +++ b/sycl/source/detail/program_impl.cpp @@ -15,7 +15,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -420,4 +420,4 @@ vector_class program_impl::get_info() const { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/program_manager/program_manager.cpp b/sycl/source/detail/program_manager/program_manager.cpp index 8e9bb45b3313d..a85281f97cfb7 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 -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -904,7 +904,7 @@ void ProgramManager::dumpImage(const DeviceImage &Img, KernelSetId KSId) const { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) extern "C" void __sycl_register_lib(pi_device_binaries desc) { cl::sycl::detail::ProgramManager::getInstance().addImages(desc); diff --git a/sycl/source/detail/queue_impl.cpp b/sycl/source/detail/queue_impl.cpp index bcd82d62ac58d..9e26800d2cf41 100644 --- a/sycl/source/detail/queue_impl.cpp +++ b/sycl/source/detail/queue_impl.cpp @@ -16,7 +16,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { template <> cl_uint queue_impl::get_info() const { @@ -76,4 +76,4 @@ event queue_impl::mem_advise(const void *Ptr, size_t Length, int Advice) { } } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/sampler_impl.cpp b/sycl/source/detail/sampler_impl.cpp index 91d6b4cc48092..56c2d345b7c1d 100644 --- a/sycl/source/detail/sampler_impl.cpp +++ b/sycl/source/detail/sampler_impl.cpp @@ -9,7 +9,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -84,4 +84,4 @@ sampler_impl::get_coordinate_normalization_mode() const { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index 5fb547215d773..6e1b8d246364b 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -33,7 +33,7 @@ #include #endif -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -1013,4 +1013,4 @@ cl_int ExecCGCommand::enqueueImp() { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/scheduler/graph_builder.cpp b/sycl/source/detail/scheduler/graph_builder.cpp index e4478d394e131..0d48a0b090505 100644 --- a/sycl/source/detail/scheduler/graph_builder.cpp +++ b/sycl/source/detail/scheduler/graph_builder.cpp @@ -23,7 +23,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -717,4 +717,4 @@ void Scheduler::GraphBuilder::removeRecordForMemObj(SYCLMemObjI *MemObject) { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/scheduler/graph_processor.cpp b/sycl/source/detail/scheduler/graph_processor.cpp index 87cb1dfd0386c..e9ccb51f2b57c 100644 --- a/sycl/source/detail/scheduler/graph_processor.cpp +++ b/sycl/source/detail/scheduler/graph_processor.cpp @@ -13,7 +13,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -90,4 +90,4 @@ bool Scheduler::GraphProcessor::enqueueCommand(Command *Cmd, } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/scheduler/scheduler.cpp b/sycl/source/detail/scheduler/scheduler.cpp index c3352907948fa..4111d34da2d22 100644 --- a/sycl/source/detail/scheduler/scheduler.cpp +++ b/sycl/source/detail/scheduler/scheduler.cpp @@ -16,7 +16,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -167,4 +167,4 @@ Scheduler::Scheduler() { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/stream_impl.cpp b/sycl/source/detail/stream_impl.cpp index dcb5a75748cb3..a7b57e2e0fbf0 100644 --- a/sycl/source/detail/stream_impl.cpp +++ b/sycl/source/detail/stream_impl.cpp @@ -9,7 +9,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -42,5 +42,5 @@ void stream_impl::flush() { } } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/sycl_mem_obj_t.cpp b/sycl/source/detail/sycl_mem_obj_t.cpp index 63e793ef4bcda..0069bd384daf9 100644 --- a/sycl/source/detail/sycl_mem_obj_t.cpp +++ b/sycl/source/detail/sycl_mem_obj_t.cpp @@ -12,7 +12,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { SYCLMemObjT::SYCLMemObjT(cl_mem MemObject, const context &SyclContext, @@ -83,4 +83,4 @@ void SYCLMemObjT::updateHostMemory() { } } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/usm/clusm.cpp b/sycl/source/detail/usm/clusm.cpp index 87de620a3f05d..cd7f021af52a2 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; -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { namespace usm { @@ -379,4 +379,4 @@ cl_int CLUSM::writeParamToMemory(size_t param_value_size, T param, } // namespace usm } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/usm/usm_dispatch.cpp b/sycl/source/detail/usm/usm_dispatch.cpp index 2daf449182f04..7c521a227ccd8 100644 --- a/sycl/source/detail/usm/usm_dispatch.cpp +++ b/sycl/source/detail/usm/usm_dispatch.cpp @@ -10,7 +10,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { namespace usm { @@ -399,4 +399,4 @@ pi_result USMDispatcher::enqueuePrefetch(pi_queue Queue, void *Ptr, size_t Size, } // namespace usm } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/usm/usm_impl.cpp b/sycl/source/detail/usm/usm_impl.cpp index 3ab1873ecf02a..de1ff859be2e1 100644 --- a/sycl/source/detail/usm/usm_impl.cpp +++ b/sycl/source/detail/usm/usm_impl.cpp @@ -16,7 +16,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { using alloc = cl::sycl::usm::alloc; @@ -312,4 +312,4 @@ device get_pointer_device(const void *Ptr, const context &Ctxt) { } } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/util.cpp b/sycl/source/detail/util.cpp index 7b98f1a7dab8e..c3a4430d10ab6 100644 --- a/sycl/source/detail/util.cpp +++ b/sycl/source/detail/util.cpp @@ -8,7 +8,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -20,4 +20,4 @@ Sync &Sync::getInstance() { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/windows_pi.cpp b/sycl/source/detail/windows_pi.cpp index dee857644da85..3e7d87cc86efd 100644 --- a/sycl/source/detail/windows_pi.cpp +++ b/sycl/source/detail/windows_pi.cpp @@ -12,7 +12,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { namespace pi { @@ -28,4 +28,4 @@ void *getOsLibraryFuncAddress(void *Library, const std::string &FunctionName) { } // namespace pi } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/device.cpp b/sycl/source/device.cpp index 513017a4ae926..ac6abf7a70c4a 100644 --- a/sycl/source/device.cpp +++ b/sycl/source/device.cpp @@ -12,7 +12,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { void force_type(info::device_type &t, const info::device_type &ft) { @@ -115,4 +115,4 @@ device::get_info() const { #undef PARAM_TRAITS_SPEC } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/device_selector.cpp b/sycl/source/device_selector.cpp index 6f3e1c636beed..aea9cbfba6572 100644 --- a/sycl/source/device_selector.cpp +++ b/sycl/source/device_selector.cpp @@ -12,7 +12,7 @@ #include // 4.6.1 Device selection class -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { device device_selector::select_device() const { vector_class devices = device::get_devices(); @@ -63,4 +63,4 @@ int host_selector::operator()(const device &dev) const { } } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/event.cpp b/sycl/source/event.cpp index 569d61340f1fb..a0b4b2c1ee07d 100644 --- a/sycl/source/event.cpp +++ b/sycl/source/event.cpp @@ -19,7 +19,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { event::event() : impl(std::make_shared()) {} @@ -85,4 +85,4 @@ event::event(shared_ptr_class event_impl) #undef PARAM_TRAITS_SPEC } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/exception.cpp b/sycl/source/exception.cpp index 756571ef65fd6..838e3f5aeae49 100644 --- a/sycl/source/exception.cpp +++ b/sycl/source/exception.cpp @@ -10,7 +10,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { const char *exception::what() const noexcept { return MMsg.c_str(); } @@ -27,4 +27,4 @@ context exception::get_context() const { cl_int exception::get_cl_code() const { return MCLErr; } } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/exception_list.cpp b/sycl/source/exception_list.cpp index 4db32e0c89558..93cdbf9ef850f 100644 --- a/sycl/source/exception_list.cpp +++ b/sycl/source/exception_list.cpp @@ -11,7 +11,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { exception_list::size_type exception_list::size() const { return MList.size(); } @@ -27,4 +27,4 @@ void exception_list::PushBack(value_type&& Value) { MList.emplace_back(std::move void exception_list::Clear() noexcept { MList.clear(); } } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/function_pointer.cpp b/sycl/source/function_pointer.cpp index 24db6e41b7ffb..92e19664c3a0c 100644 --- a/sycl/source/function_pointer.cpp +++ b/sycl/source/function_pointer.cpp @@ -10,7 +10,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { intel::device_func_ptr_holder_t @@ -28,4 +28,4 @@ getDeviceFunctionPointerImpl(device &D, program &P, const char *FuncName) { } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/half_type.cpp b/sycl/source/half_type.cpp index 9e2db56e53991..bab3009a8ed15 100644 --- a/sycl/source/half_type.cpp +++ b/sycl/source/half_type.cpp @@ -11,7 +11,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -184,4 +184,4 @@ bool operator!=(const half &LHS, const half &RHS) { return !(LHS == RHS); } } // namespace detail } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/handler.cpp b/sycl/source/handler.cpp index e2125d8099351..a271509dd64ab 100644 --- a/sycl/source/handler.cpp +++ b/sycl/source/handler.cpp @@ -17,7 +17,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { event handler::finalize() { sycl::event EventRet; @@ -243,4 +243,4 @@ string_class handler::getKernelName() { return MSyclKernel->get_info(); } } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/kernel.cpp b/sycl/source/kernel.cpp index 24f28b7fca4c5..7ec86691e5e22 100644 --- a/sycl/source/kernel.cpp +++ b/sycl/source/kernel.cpp @@ -10,7 +10,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { kernel::kernel(cl_kernel ClKernel, const context &SyclContext) @@ -87,4 +87,4 @@ kernel::get_sub_group_info( kernel::kernel(std::shared_ptr Impl) : impl(Impl) {} } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/ordered_queue.cpp b/sycl/source/ordered_queue.cpp index 85c4b1b63b62d..80d3b130550e1 100644 --- a/sycl/source/ordered_queue.cpp +++ b/sycl/source/ordered_queue.cpp @@ -12,7 +12,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { ordered_queue::ordered_queue(const context &syclContext, const device_selector &deviceSelector, @@ -119,4 +119,4 @@ ordered_queue::has_property() const; template property::queue::enable_profiling ordered_queue::get_property() const; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/platform.cpp b/sycl/source/platform.cpp index c78dde56a0e10..ec2412684456e 100644 --- a/sycl/source/platform.cpp +++ b/sycl/source/platform.cpp @@ -13,7 +13,7 @@ #include #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { platform::platform() : impl(std::make_shared()) {} @@ -57,4 +57,4 @@ platform::get_info() const { #undef PARAM_TRAITS_SPEC } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/program.cpp b/sycl/source/program.cpp index 5da37172fd729..ddcbe5260cbcb 100644 --- a/sycl/source/program.cpp +++ b/sycl/source/program.cpp @@ -11,7 +11,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { program::program(const context &context) @@ -116,4 +116,4 @@ string_class program::get_build_options() const { program_state program::get_state() const { return impl->get_state(); } } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/queue.cpp b/sycl/source/queue.cpp index 30de214675d02..f462bd5b2a7ec 100644 --- a/sycl/source/queue.cpp +++ b/sycl/source/queue.cpp @@ -15,7 +15,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { @@ -126,4 +126,4 @@ template property::queue::enable_profiling queue::get_property() const; } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/sampler.cpp b/sycl/source/sampler.cpp index d06222a13cf4e..8a5668905e3c5 100644 --- a/sycl/source/sampler.cpp +++ b/sycl/source/sampler.cpp @@ -8,7 +8,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { sampler::sampler(coordinate_normalization_mode normalizationMode, addressing_mode addressingMode, filtering_mode filteringMode) @@ -40,4 +40,4 @@ bool sampler::operator!=(const sampler &rhs) const { } } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/stream.cpp b/sycl/source/stream.cpp index 84b5ee60a952c..c947246f56a2b 100644 --- a/sycl/source/stream.cpp +++ b/sycl/source/stream.cpp @@ -8,7 +8,7 @@ #include -__SYCL_INLINE namespace cl { +__SYCL_INLINE_NAMESPACE(cl) { namespace sycl { stream::stream(size_t BufferSize, size_t MaxStatementSize, handler &CGH) @@ -53,5 +53,5 @@ bool stream::operator==(const stream &RHS) const { return (impl == RHS.impl); } bool stream::operator!=(const stream &RHS) const { return !(impl == RHS.impl); } } // namespace sycl -} // namespace cl +} // __SYCL_INLINE_NAMESPACE(cl)