diff --git a/sycl/include/CL/__spirv/spirv_ops.hpp b/sycl/include/CL/__spirv/spirv_ops.hpp index 68c7ca1fe0590..020441c071e0b 100644 --- a/sycl/include/CL/__spirv/spirv_ops.hpp +++ b/sycl/include/CL/__spirv/spirv_ops.hpp @@ -236,7 +236,7 @@ extern SYCL_EXTERNAL TempRetT __spirv_ImageSampleExplicitLod(SampledType, // of atomic min/max based on the type #define __SPIRV_ATOMIC_MINMAX(AS, Op) \ template \ - typename cl::sycl::detail::enable_if_t< \ + typename sycl::detail::enable_if_t< \ std::is_integral::value && std::is_signed::value, T> \ __spirv_Atomic##Op(AS T *Ptr, __spv::Scope::Flag Memory, \ __spv::MemorySemanticsMask::Flag Semantics, \ @@ -244,7 +244,7 @@ extern SYCL_EXTERNAL TempRetT __spirv_ImageSampleExplicitLod(SampledType, return __spirv_AtomicS##Op(Ptr, Memory, Semantics, Value); \ } \ template \ - typename cl::sycl::detail::enable_if_t< \ + typename sycl::detail::enable_if_t< \ std::is_integral::value && !std::is_signed::value, T> \ __spirv_Atomic##Op(AS T *Ptr, __spv::Scope::Flag Memory, \ __spv::MemorySemanticsMask::Flag Semantics, \ @@ -252,7 +252,7 @@ extern SYCL_EXTERNAL TempRetT __spirv_ImageSampleExplicitLod(SampledType, return __spirv_AtomicU##Op(Ptr, Memory, Semantics, Value); \ } \ template \ - typename cl::sycl::detail::enable_if_t::value, T> \ + typename sycl::detail::enable_if_t::value, T> \ __spirv_Atomic##Op(AS T *Ptr, __spv::Scope::Flag Memory, \ __spv::MemorySemanticsMask::Flag Semantics, \ T Value) { \ @@ -370,253 +370,235 @@ __SYCL_CONVERGENT__ extern SYCL_EXTERNAL void __spirv_SubgroupBlockWriteINTEL(__attribute__((opencl_global)) uint64_t *Ptr, dataT Data) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_FixedSqrtINTEL(cl::sycl::detail::ap_int a, bool S, int32_t I, - int32_t rI, int32_t Quantization = 0, - int32_t Overflow = 0) noexcept; +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_FixedSqrtINTEL(sycl::detail::ap_int a, bool S, int32_t I, int32_t rI, + int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_FixedRecipINTEL(cl::sycl::detail::ap_int a, bool S, int32_t I, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_FixedRecipINTEL(sycl::detail::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_FixedRsqrtINTEL(cl::sycl::detail::ap_int a, bool S, int32_t I, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_FixedRsqrtINTEL(sycl::detail::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_FixedSinINTEL(cl::sycl::detail::ap_int a, bool S, int32_t I, - int32_t rI, int32_t Quantization = 0, - int32_t Overflow = 0) noexcept; +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_FixedSinINTEL(sycl::detail::ap_int a, bool S, int32_t I, int32_t rI, + int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_FixedCosINTEL(cl::sycl::detail::ap_int a, bool S, int32_t I, - int32_t rI, int32_t Quantization = 0, - int32_t Overflow = 0) noexcept; +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_FixedCosINTEL(sycl::detail::ap_int a, bool S, int32_t I, int32_t rI, + int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int<2 * rW> -__spirv_FixedSinCosINTEL(cl::sycl::detail::ap_int a, bool S, int32_t I, +extern SYCL_EXTERNAL sycl::detail::ap_int<2 * rW> +__spirv_FixedSinCosINTEL(sycl::detail::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_FixedSinPiINTEL(cl::sycl::detail::ap_int a, bool S, int32_t I, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_FixedSinPiINTEL(sycl::detail::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_FixedCosPiINTEL(cl::sycl::detail::ap_int a, bool S, int32_t I, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_FixedCosPiINTEL(sycl::detail::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int<2 * rW> -__spirv_FixedSinCosPiINTEL(cl::sycl::detail::ap_int a, bool S, int32_t I, +extern SYCL_EXTERNAL sycl::detail::ap_int<2 * rW> +__spirv_FixedSinCosPiINTEL(sycl::detail::ap_int a, bool S, int32_t I, int32_t rI, int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_FixedLogINTEL(cl::sycl::detail::ap_int a, bool S, int32_t I, - int32_t rI, int32_t Quantization = 0, - int32_t Overflow = 0) noexcept; +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_FixedLogINTEL(sycl::detail::ap_int a, bool S, int32_t I, int32_t rI, + int32_t Quantization = 0, int32_t Overflow = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_FixedExpINTEL(cl::sycl::detail::ap_int a, bool S, int32_t I, - int32_t rI, int32_t Quantization = 0, - int32_t Overflow = 0) noexcept; +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_FixedExpINTEL(sycl::detail::ap_int a, bool S, int32_t I, int32_t rI, + int32_t Quantization = 0, int32_t Overflow = 0) noexcept; // In the following built-ins width of arbitrary precision integer type for // a floating point variable should be equal to sum of corresponding // exponent width E, mantissa width M and 1 for sign bit. I.e. WA = EA + MA + 1. template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatCastINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatCastINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatCastFromIntINTEL(cl::sycl::detail::ap_int A, - int32_t Mout, bool FromSign = false, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatCastFromIntINTEL(sycl::detail::ap_int A, int32_t Mout, + bool FromSign = false, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatCastToIntINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatCastToIntINTEL(sycl::detail::ap_int A, int32_t MA, bool ToSign = false, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatAddINTEL(cl::sycl::detail::ap_int A, int32_t MA, - cl::sycl::detail::ap_int B, int32_t MB, - int32_t Mout, int32_t EnableSubnormals = 0, - int32_t RoundingMode = 0, - int32_t RoundingAccuracy = 0) noexcept; +extern SYCL_EXTERNAL sycl::detail::ap_int __spirv_ArbitraryFloatAddINTEL( + sycl::detail::ap_int A, int32_t MA, sycl::detail::ap_int B, + int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, + int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatSubINTEL(cl::sycl::detail::ap_int A, int32_t MA, - cl::sycl::detail::ap_int B, int32_t MB, - int32_t Mout, int32_t EnableSubnormals = 0, - int32_t RoundingMode = 0, - int32_t RoundingAccuracy = 0) noexcept; +extern SYCL_EXTERNAL sycl::detail::ap_int __spirv_ArbitraryFloatSubINTEL( + sycl::detail::ap_int A, int32_t MA, sycl::detail::ap_int B, + int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, + int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatMulINTEL(cl::sycl::detail::ap_int A, int32_t MA, - cl::sycl::detail::ap_int B, int32_t MB, - int32_t Mout, int32_t EnableSubnormals = 0, - int32_t RoundingMode = 0, - int32_t RoundingAccuracy = 0) noexcept; +extern SYCL_EXTERNAL sycl::detail::ap_int __spirv_ArbitraryFloatMulINTEL( + sycl::detail::ap_int A, int32_t MA, sycl::detail::ap_int B, + int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, + int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatDivINTEL(cl::sycl::detail::ap_int A, int32_t MA, - cl::sycl::detail::ap_int B, int32_t MB, - int32_t Mout, int32_t EnableSubnormals = 0, - int32_t RoundingMode = 0, - int32_t RoundingAccuracy = 0) noexcept; +extern SYCL_EXTERNAL sycl::detail::ap_int __spirv_ArbitraryFloatDivINTEL( + sycl::detail::ap_int A, int32_t MA, sycl::detail::ap_int B, + int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, + int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; // Comparison built-ins don't use Subnormal Support, Rounding Mode and // Rounding Accuracy. template extern SYCL_EXTERNAL bool -__spirv_ArbitraryFloatGTINTEL(cl::sycl::detail::ap_int A, int32_t MA, - cl::sycl::detail::ap_int B, - int32_t MB) noexcept; +__spirv_ArbitraryFloatGTINTEL(sycl::detail::ap_int A, int32_t MA, + sycl::detail::ap_int B, int32_t MB) noexcept; template extern SYCL_EXTERNAL bool -__spirv_ArbitraryFloatGEINTEL(cl::sycl::detail::ap_int A, int32_t MA, - cl::sycl::detail::ap_int B, - int32_t MB) noexcept; +__spirv_ArbitraryFloatGEINTEL(sycl::detail::ap_int A, int32_t MA, + sycl::detail::ap_int B, int32_t MB) noexcept; template extern SYCL_EXTERNAL bool -__spirv_ArbitraryFloatLTINTEL(cl::sycl::detail::ap_int A, int32_t MA, - cl::sycl::detail::ap_int B, - int32_t MB) noexcept; +__spirv_ArbitraryFloatLTINTEL(sycl::detail::ap_int A, int32_t MA, + sycl::detail::ap_int B, int32_t MB) noexcept; template extern SYCL_EXTERNAL bool -__spirv_ArbitraryFloatLEINTEL(cl::sycl::detail::ap_int A, int32_t MA, - cl::sycl::detail::ap_int B, - int32_t MB) noexcept; +__spirv_ArbitraryFloatLEINTEL(sycl::detail::ap_int A, int32_t MA, + sycl::detail::ap_int B, int32_t MB) noexcept; template extern SYCL_EXTERNAL bool -__spirv_ArbitraryFloatEQINTEL(cl::sycl::detail::ap_int A, int32_t MA, - cl::sycl::detail::ap_int B, - int32_t MB) noexcept; +__spirv_ArbitraryFloatEQINTEL(sycl::detail::ap_int A, int32_t MA, + sycl::detail::ap_int B, int32_t MB) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatRecipINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatRecipINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatRSqrtINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatRSqrtINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatCbrtINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatCbrtINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatHypotINTEL(cl::sycl::detail::ap_int A, int32_t MA, - cl::sycl::detail::ap_int B, int32_t MB, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatHypotINTEL(sycl::detail::ap_int A, int32_t MA, + sycl::detail::ap_int B, int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatSqrtINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatSqrtINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatLogINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatLogINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatLog2INTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatLog2INTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatLog10INTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatLog10INTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatLog1pINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatLog1pINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatExpINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatExpINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatExp2INTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatExp2INTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatExp10INTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatExp10INTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatExpm1INTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatExpm1INTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatSinINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatSinINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatCosINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatCosINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; @@ -624,22 +606,22 @@ __spirv_ArbitraryFloatCosINTEL(cl::sycl::detail::ap_int A, int32_t MA, // Result value contains both values of sine and cosine and so has the size of // 2 * Wout where Wout is equal to (1 + Eout + Mout). template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int<2 * Wout> -__spirv_ArbitraryFloatSinCosINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int<2 * Wout> +__spirv_ArbitraryFloatSinCosINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatSinPiINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatSinPiINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatCosPiINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatCosPiINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; @@ -647,88 +629,82 @@ __spirv_ArbitraryFloatCosPiINTEL(cl::sycl::detail::ap_int A, int32_t MA, // Result value contains both values of sine(A*pi) and cosine(A*pi) and so has // the size of 2 * Wout where Wout is equal to (1 + Eout + Mout). template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int<2 * Wout> -__spirv_ArbitraryFloatSinCosPiINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int<2 * Wout> +__spirv_ArbitraryFloatSinCosPiINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatASinINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatASinINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatASinPiINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatASinPiINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatACosINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatACosINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatACosPiINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatACosPiINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatATanINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatATanINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatATanPiINTEL(cl::sycl::detail::ap_int A, int32_t MA, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatATanPiINTEL(sycl::detail::ap_int A, int32_t MA, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatATan2INTEL(cl::sycl::detail::ap_int A, int32_t MA, - cl::sycl::detail::ap_int B, int32_t MB, +extern SYCL_EXTERNAL sycl::detail::ap_int +__spirv_ArbitraryFloatATan2INTEL(sycl::detail::ap_int A, int32_t MA, + sycl::detail::ap_int B, int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatPowINTEL(cl::sycl::detail::ap_int A, int32_t MA, - cl::sycl::detail::ap_int B, int32_t MB, - int32_t Mout, int32_t EnableSubnormals = 0, - int32_t RoundingMode = 0, - int32_t RoundingAccuracy = 0) noexcept; +extern SYCL_EXTERNAL sycl::detail::ap_int __spirv_ArbitraryFloatPowINTEL( + sycl::detail::ap_int A, int32_t MA, sycl::detail::ap_int B, + int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, + int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatPowRINTEL(cl::sycl::detail::ap_int A, int32_t MA, - cl::sycl::detail::ap_int B, int32_t MB, - int32_t Mout, int32_t EnableSubnormals = 0, - int32_t RoundingMode = 0, - int32_t RoundingAccuracy = 0) noexcept; +extern SYCL_EXTERNAL sycl::detail::ap_int __spirv_ArbitraryFloatPowRINTEL( + sycl::detail::ap_int A, int32_t MA, sycl::detail::ap_int B, + int32_t MB, int32_t Mout, int32_t EnableSubnormals = 0, + int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; // PowN built-in calculates `A^B` where `A` is arbitrary precision floating // point number and `B` is signed or unsigned arbitrary precision integer, // i.e. its width doesn't depend on sum of exponent and mantissa. template -extern SYCL_EXTERNAL cl::sycl::detail::ap_int -__spirv_ArbitraryFloatPowNINTEL(cl::sycl::detail::ap_int A, int32_t MA, - cl::sycl::detail::ap_int B, bool SignOfB, - int32_t Mout, int32_t EnableSubnormals = 0, - int32_t RoundingMode = 0, - int32_t RoundingAccuracy = 0) noexcept; +extern SYCL_EXTERNAL sycl::detail::ap_int __spirv_ArbitraryFloatPowNINTEL( + sycl::detail::ap_int A, int32_t MA, sycl::detail::ap_int B, + bool SignOfB, int32_t Mout, int32_t EnableSubnormals = 0, + int32_t RoundingMode = 0, int32_t RoundingAccuracy = 0) noexcept; template extern SYCL_EXTERNAL int32_t __spirv_ReadPipe(__ocl_RPipeTy Pipe, diff --git a/sycl/include/sycl/accessor.hpp b/sycl/include/sycl/accessor.hpp index 07cda2d1eace7..9c5e42e8ca98b 100644 --- a/sycl/include/sycl/accessor.hpp +++ b/sycl/include/sycl/accessor.hpp @@ -2232,7 +2232,7 @@ class __SYCL_SPECIAL_CLASS accessor { public: template - accessor(cl::sycl::image &Image, + accessor(sycl::image &Image, handler &CommandGroupHandler) : detail::image_accessor( @@ -2245,7 +2245,7 @@ class __SYCL_SPECIAL_CLASS accessor - accessor(cl::sycl::image &Image, + accessor(sycl::image &Image, handler &CommandGroupHandler, const property_list &propList) : detail::image_accessor( @@ -2291,13 +2291,13 @@ class accessor { public: template - accessor(cl::sycl::image &Image) + accessor(sycl::image &Image) : detail::image_accessor( Image, (detail::getSyclObjImpl(Image))->getElementSize()) {} template - accessor(cl::sycl::image &Image, + accessor(sycl::image &Image, const property_list &propList) : detail::image_accessor( @@ -2339,7 +2339,7 @@ class __SYCL_SPECIAL_CLASS accessor - accessor(cl::sycl::image &Image, + accessor(sycl::image &Image, handler &CommandGroupHandler) : detail::image_accessor( @@ -2352,7 +2352,7 @@ class __SYCL_SPECIAL_CLASS accessor - accessor(cl::sycl::image &Image, + accessor(sycl::image &Image, handler &CommandGroupHandler, const property_list &propList) : detail::image_accessor( @@ -2615,13 +2615,13 @@ host_accessor(buffer, Type1, Type2, Type3, Type4, } // __SYCL_INLINE_NAMESPACE(cl) namespace std { -template -struct hash> { - using AccType = cl::sycl::accessor; +template +struct hash> { + using AccType = sycl::accessor; size_t operator()(const AccType &A) const { #ifdef __SYCL_DEVICE_ONLY__ @@ -2631,7 +2631,7 @@ struct hash()(AccImplPtr); #endif } diff --git a/sycl/include/sycl/aliases.hpp b/sycl/include/sycl/aliases.hpp index f42c43e066f92..6bf525c9e2c27 100644 --- a/sycl/include/sycl/aliases.hpp +++ b/sycl/include/sycl/aliases.hpp @@ -26,7 +26,7 @@ class half; } // __SYCL_INLINE_NAMESPACE(cl) #define __SYCL_MAKE_VECTOR_ALIAS(ALIAS, TYPE, N) \ - using ALIAS##N = cl::sycl::vec; + using ALIAS##N = sycl::vec; #define __SYCL_MAKE_VECTOR_ALIASES_FOR_ARITHMETIC_TYPES(N) \ __SYCL_MAKE_VECTOR_ALIAS(char, char, N) \ @@ -38,17 +38,17 @@ class half; __SYCL_MAKE_VECTOR_ALIAS(half, half, N) #define __SYCL_MAKE_VECTOR_ALIASES_FOR_OPENCL_TYPES(N) \ - __SYCL_MAKE_VECTOR_ALIAS(cl_char, cl::sycl::cl_char, N) \ - __SYCL_MAKE_VECTOR_ALIAS(cl_uchar, cl::sycl::cl_uchar, N) \ - __SYCL_MAKE_VECTOR_ALIAS(cl_short, cl::sycl::cl_short, N) \ - __SYCL_MAKE_VECTOR_ALIAS(cl_ushort, cl::sycl::cl_ushort, N) \ - __SYCL_MAKE_VECTOR_ALIAS(cl_int, cl::sycl::cl_int, N) \ - __SYCL_MAKE_VECTOR_ALIAS(cl_uint, cl::sycl::cl_uint, N) \ - __SYCL_MAKE_VECTOR_ALIAS(cl_long, cl::sycl::cl_long, N) \ - __SYCL_MAKE_VECTOR_ALIAS(cl_ulong, cl::sycl::cl_ulong, N) \ - __SYCL_MAKE_VECTOR_ALIAS(cl_float, cl::sycl::cl_float, N) \ - __SYCL_MAKE_VECTOR_ALIAS(cl_double, cl::sycl::cl_double, N) \ - __SYCL_MAKE_VECTOR_ALIAS(cl_half, cl::sycl::cl_half, N) + __SYCL_MAKE_VECTOR_ALIAS(cl_char, sycl::cl_char, N) \ + __SYCL_MAKE_VECTOR_ALIAS(cl_uchar, sycl::cl_uchar, N) \ + __SYCL_MAKE_VECTOR_ALIAS(cl_short, sycl::cl_short, N) \ + __SYCL_MAKE_VECTOR_ALIAS(cl_ushort, sycl::cl_ushort, N) \ + __SYCL_MAKE_VECTOR_ALIAS(cl_int, sycl::cl_int, N) \ + __SYCL_MAKE_VECTOR_ALIAS(cl_uint, sycl::cl_uint, N) \ + __SYCL_MAKE_VECTOR_ALIAS(cl_long, sycl::cl_long, N) \ + __SYCL_MAKE_VECTOR_ALIAS(cl_ulong, sycl::cl_ulong, N) \ + __SYCL_MAKE_VECTOR_ALIAS(cl_float, sycl::cl_float, N) \ + __SYCL_MAKE_VECTOR_ALIAS(cl_double, sycl::cl_double, N) \ + __SYCL_MAKE_VECTOR_ALIAS(cl_half, sycl::cl_half, N) #define __SYCL_MAKE_VECTOR_ALIASES_FOR_SIGNED_AND_UNSIGNED_TYPES(N) \ __SYCL_MAKE_VECTOR_ALIAS(schar, signed char, N) \ @@ -74,7 +74,7 @@ using uint = unsigned int; using ulong = unsigned long; using longlong = long long; using ulonglong = unsigned long long; -using half = cl::sycl::detail::half_impl::half; +using half = sycl::detail::half_impl::half; using cl_bool = bool; using cl_char = std::int8_t; using cl_uchar = std::uint8_t; diff --git a/sycl/include/sycl/atomic.hpp b/sycl/include/sycl/atomic.hpp index 968de0bdcc767..8166ba043a23f 100644 --- a/sycl/include/sycl/atomic.hpp +++ b/sycl/include/sycl/atomic.hpp @@ -34,7 +34,7 @@ class multi_ptr; namespace detail { -using memory_order = cl::sycl::memory_order; +using memory_order = sycl::memory_order; template struct IsValidAtomicType { static constexpr bool value = @@ -45,14 +45,14 @@ template struct IsValidAtomicType { std::is_same::value); }; -template struct IsValidAtomicAddressSpace { +template struct IsValidAtomicAddressSpace { static constexpr bool value = (AS == access::address_space::global_space || AS == access::address_space::local_space || AS == access::address_space::ext_intel_global_device_space); }; -// Type trait to translate a cl::sycl::access::address_space to +// Type trait to translate a sycl::access::address_space to // a SPIR-V memory scope template struct GetSpirvMemoryScope {}; template <> struct GetSpirvMemoryScope { @@ -76,7 +76,7 @@ template <> struct GetSpirvMemoryScope { __SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { -// Translate cl::sycl::memory_order or __spv::MemorySemanticsMask::Flag +// Translate sycl::memory_order or __spv::MemorySemanticsMask::Flag // into std::memory_order // Only relaxed memory semantics are supported currently static inline std::memory_order @@ -92,55 +92,55 @@ getStdMemoryOrder(__spv::MemorySemanticsMask::Flag) { template void __spirv_AtomicStore(std::atomic *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V) { - Ptr->store(V, ::cl::sycl::detail::getStdMemoryOrder(MS)); + Ptr->store(V, ::sycl::detail::getStdMemoryOrder(MS)); } template T __spirv_AtomicLoad(const std::atomic *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS) { - return Ptr->load(::cl::sycl::detail::getStdMemoryOrder(MS)); + return Ptr->load(::sycl::detail::getStdMemoryOrder(MS)); } template T __spirv_AtomicExchange(std::atomic *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V) { - return Ptr->exchange(V, ::cl::sycl::detail::getStdMemoryOrder(MS)); + return Ptr->exchange(V, ::sycl::detail::getStdMemoryOrder(MS)); } template extern T __spirv_AtomicIAdd(std::atomic *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V) { - return Ptr->fetch_add(V, ::cl::sycl::detail::getStdMemoryOrder(MS)); + return Ptr->fetch_add(V, ::sycl::detail::getStdMemoryOrder(MS)); } template extern T __spirv_AtomicISub(std::atomic *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V) { - return Ptr->fetch_sub(V, ::cl::sycl::detail::getStdMemoryOrder(MS)); + return Ptr->fetch_sub(V, ::sycl::detail::getStdMemoryOrder(MS)); } template extern T __spirv_AtomicAnd(std::atomic *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V) { - return Ptr->fetch_and(V, ::cl::sycl::detail::getStdMemoryOrder(MS)); + return Ptr->fetch_and(V, ::sycl::detail::getStdMemoryOrder(MS)); } template extern T __spirv_AtomicOr(std::atomic *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V) { - return Ptr->fetch_or(V, ::cl::sycl::detail::getStdMemoryOrder(MS)); + return Ptr->fetch_or(V, ::sycl::detail::getStdMemoryOrder(MS)); } template extern T __spirv_AtomicXor(std::atomic *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V) { - return Ptr->fetch_xor(V, ::cl::sycl::detail::getStdMemoryOrder(MS)); + return Ptr->fetch_xor(V, ::sycl::detail::getStdMemoryOrder(MS)); } template extern T __spirv_AtomicMin(std::atomic *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V) { - std::memory_order MemoryOrder = ::cl::sycl::detail::getStdMemoryOrder(MS); + std::memory_order MemoryOrder = ::sycl::detail::getStdMemoryOrder(MS); T Val = Ptr->load(MemoryOrder); while (V < Val) { if (Ptr->compare_exchange_strong(Val, V, MemoryOrder, MemoryOrder)) @@ -153,7 +153,7 @@ extern T __spirv_AtomicMin(std::atomic *Ptr, __spv::Scope::Flag, template extern T __spirv_AtomicMax(std::atomic *Ptr, __spv::Scope::Flag, __spv::MemorySemanticsMask::Flag MS, T V) { - std::memory_order MemoryOrder = ::cl::sycl::detail::getStdMemoryOrder(MS); + std::memory_order MemoryOrder = ::sycl::detail::getStdMemoryOrder(MS); T Val = Ptr->load(MemoryOrder); while (V > Val) { if (Ptr->compare_exchange_strong(Val, V, MemoryOrder, MemoryOrder)) diff --git a/sycl/include/sycl/atomic_ref.hpp b/sycl/include/sycl/atomic_ref.hpp index 083c5c7319e1d..792615ff2dce8 100644 --- a/sycl/include/sycl/atomic_ref.hpp +++ b/sycl/include/sycl/atomic_ref.hpp @@ -26,8 +26,8 @@ __SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { -using memory_order = cl::sycl::memory_order; -using memory_scope = cl::sycl::memory_scope; +using memory_order = sycl::memory_order; +using memory_scope = sycl::memory_scope; template struct IsValidAtomicRefType { static constexpr bool value = @@ -39,8 +39,7 @@ template struct IsValidAtomicRefType { std::is_pointer::value); }; -template -struct IsValidAtomicRefAddressSpace { +template struct IsValidAtomicRefAddressSpace { static constexpr bool value = (AS == access::address_space::global_space || AS == access::address_space::local_space || diff --git a/sycl/include/sycl/buffer.hpp b/sycl/include/sycl/buffer.hpp index c1efbc63fa060..b640834d41d58 100644 --- a/sycl/include/sycl/buffer.hpp +++ b/sycl/include/sycl/buffer.hpp @@ -328,14 +328,14 @@ class buffer { sizeof(T), rangeToArray(Range).data()); if (b.is_sub_buffer()) - throw cl::sycl::invalid_object_error( + throw sycl::invalid_object_error( "Cannot create sub buffer from sub buffer.", PI_ERROR_INVALID_VALUE); if (isOutOfBounds(baseIndex, subRange, b.Range)) - throw cl::sycl::invalid_object_error( + throw sycl::invalid_object_error( "Requested sub-buffer size exceeds the size of the parent buffer", PI_ERROR_INVALID_VALUE); if (!isContiguousRegion(baseIndex, subRange, b.Range)) - throw cl::sycl::invalid_object_error( + throw sycl::invalid_object_error( "Requested sub-buffer region is not contiguous", PI_ERROR_INVALID_VALUE); } @@ -434,7 +434,7 @@ class buffer { id accessOffset = {}, const detail::code_location CodeLoc = detail::code_location::current()) { if (isOutOfBounds(accessOffset, accessRange, this->Range)) - throw cl::sycl::invalid_object_error( + throw sycl::invalid_object_error( "Requested accessor would exceed the bounds of the buffer", PI_ERROR_INVALID_VALUE); @@ -450,7 +450,7 @@ class buffer { range accessRange, id accessOffset = {}, const detail::code_location CodeLoc = detail::code_location::current()) { if (isOutOfBounds(accessOffset, accessRange, this->Range)) - throw cl::sycl::invalid_object_error( + throw sycl::invalid_object_error( "Requested accessor would exceed the bounds of the buffer", PI_ERROR_INVALID_VALUE); @@ -495,7 +495,7 @@ class buffer { buffer reinterpret(range reinterpretRange) const { if (sizeof(ReinterpretT) * reinterpretRange.size() != byte_size()) - throw cl::sycl::invalid_object_error( + throw sycl::invalid_object_error( "Total size in bytes represented by the type and range of the " "reinterpreted SYCL buffer does not equal the total size in bytes " "represented by the type and range of this SYCL buffer", @@ -522,7 +522,7 @@ class buffer { reinterpret() const { long sz = byte_size(); if (sz % sizeof(ReinterpretT) != 0) - throw cl::sycl::invalid_object_error( + throw sycl::invalid_object_error( "Total byte size of buffer is not evenly divisible by the size of " "the reinterpreted type", PI_ERROR_INVALID_VALUE); @@ -680,11 +680,10 @@ buffer(const T *, const range &, const property_list & = {}) namespace std { template -struct hash> { - size_t - operator()(const cl::sycl::buffer &b) const { - return hash>()( - cl::sycl::detail::getSyclObjImpl(b)); +struct hash> { + size_t operator()(const sycl::buffer &b) const { + return hash>()( + sycl::detail::getSyclObjImpl(b)); } }; } // namespace std diff --git a/sycl/include/sycl/context.hpp b/sycl/include/sycl/context.hpp index 10c60ca1626e1..7b6f6975a8a53 100644 --- a/sycl/include/sycl/context.hpp +++ b/sycl/include/sycl/context.hpp @@ -253,10 +253,10 @@ class __SYCL_EXPORT context { } // __SYCL_INLINE_NAMESPACE(cl) namespace std { -template <> struct hash { - size_t operator()(const cl::sycl::context &Context) const { - return hash>()( - cl::sycl::detail::getSyclObjImpl(Context)); +template <> struct hash { + size_t operator()(const sycl::context &Context) const { + return hash>()( + sycl::detail::getSyclObjImpl(Context)); } }; } // namespace std diff --git a/sycl/include/sycl/detail/array.hpp b/sycl/include/sycl/detail/array.hpp index 9b3a2aea5708b..80137c1a356aa 100644 --- a/sycl/include/sycl/detail/array.hpp +++ b/sycl/include/sycl/detail/array.hpp @@ -48,16 +48,16 @@ template class array { array() : array(0, 0, 0) {} // Conversion operators to derived classes - operator cl::sycl::id() const { - cl::sycl::id result; + operator sycl::id() const { + sycl::id result; for (int i = 0; i < dimensions; ++i) { result[i] = common_array[i]; } return result; } - operator cl::sycl::range() const { - cl::sycl::range result; + operator sycl::range() const { + sycl::range result; for (int i = 0; i < dimensions; ++i) { result[i] = common_array[i]; } @@ -111,8 +111,8 @@ template class array { __SYCL_ALWAYS_INLINE void check_dimension(int dimension) const { #ifndef __SYCL_DEVICE_ONLY__ if (dimension >= dimensions || dimension < 0) { - throw cl::sycl::invalid_parameter_error("Index out of range", - PI_ERROR_INVALID_VALUE); + throw sycl::invalid_parameter_error("Index out of range", + PI_ERROR_INVALID_VALUE); } #endif (void)dimension; diff --git a/sycl/include/sycl/detail/builtins.hpp b/sycl/include/sycl/detail/builtins.hpp index c3b0305531cd6..3dadab43134e6 100644 --- a/sycl/include/sycl/detail/builtins.hpp +++ b/sycl/include/sycl/detail/builtins.hpp @@ -43,63 +43,63 @@ #define __SYCL_MAKE_CALL_ARG1(call, prefix) \ template \ inline __SYCL_ALWAYS_INLINE R __invoke_##call(T1 t1) __NOEXC { \ - using Ret = cl::sycl::detail::ConvertToOpenCLType_t; \ - using Arg1 = cl::sycl::detail::ConvertToOpenCLType_t; \ + using Ret = sycl::detail::ConvertToOpenCLType_t; \ + using Arg1 = sycl::detail::ConvertToOpenCLType_t; \ __SYCL_EXTERN_IT1(Ret, prefix, call, Arg1); \ - Arg1 arg1 = cl::sycl::detail::convertDataToType(t1); \ + Arg1 arg1 = sycl::detail::convertDataToType(t1); \ Ret ret = __SYCL_PPCAT(prefix, call)(arg1); \ - return cl::sycl::detail::convertDataToType(ret); \ + return sycl::detail::convertDataToType(ret); \ } #define __SYCL_MAKE_CALL_ARG2(call, prefix) \ template \ inline __SYCL_ALWAYS_INLINE R __invoke_##call(T1 t1, T2 t2) __NOEXC { \ - using Ret = cl::sycl::detail::ConvertToOpenCLType_t; \ - using Arg1 = cl::sycl::detail::ConvertToOpenCLType_t; \ - using Arg2 = cl::sycl::detail::ConvertToOpenCLType_t; \ + using Ret = sycl::detail::ConvertToOpenCLType_t; \ + using Arg1 = sycl::detail::ConvertToOpenCLType_t; \ + using Arg2 = sycl::detail::ConvertToOpenCLType_t; \ __SYCL_EXTERN_IT2(Ret, prefix, call, Arg1, Arg2); \ - Arg1 arg1 = cl::sycl::detail::convertDataToType(t1); \ - Arg2 arg2 = cl::sycl::detail::convertDataToType(t2); \ + Arg1 arg1 = sycl::detail::convertDataToType(t1); \ + Arg2 arg2 = sycl::detail::convertDataToType(t2); \ Ret ret = __SYCL_PPCAT(prefix, call)(arg1, arg2); \ - return cl::sycl::detail::convertDataToType(ret); \ + return sycl::detail::convertDataToType(ret); \ } #define __SYCL_MAKE_CALL_ARG2_SAME(call, prefix) \ template \ inline __SYCL_ALWAYS_INLINE R __invoke_##call(T t1, T t2) __NOEXC { \ - using Ret = cl::sycl::detail::ConvertToOpenCLType_t; \ - using Arg = cl::sycl::detail::ConvertToOpenCLType_t; \ + using Ret = sycl::detail::ConvertToOpenCLType_t; \ + using Arg = sycl::detail::ConvertToOpenCLType_t; \ __SYCL_EXTERN_IT2_SAME(Ret, prefix, call, Arg); \ - Arg arg1 = cl::sycl::detail::convertDataToType(t1); \ - Arg arg2 = cl::sycl::detail::convertDataToType(t2); \ + Arg arg1 = sycl::detail::convertDataToType(t1); \ + Arg arg2 = sycl::detail::convertDataToType(t2); \ Ret ret = __SYCL_PPCAT(prefix, call)(arg1, arg2); \ - return cl::sycl::detail::convertDataToType(ret); \ + return sycl::detail::convertDataToType(ret); \ } #define __SYCL_MAKE_CALL_ARG2_SAME_RESULT(call, prefix) \ template \ inline __SYCL_ALWAYS_INLINE T __invoke_##call(T v1, T v2) __NOEXC { \ - using Type = cl::sycl::detail::ConvertToOpenCLType_t; \ + using Type = sycl::detail::ConvertToOpenCLType_t; \ __SYCL_EXTERN_IT2_SAME(Type, prefix, call, Type); \ - Type arg1 = cl::sycl::detail::convertDataToType(v1); \ - Type arg2 = cl::sycl::detail::convertDataToType(v2); \ + Type arg1 = sycl::detail::convertDataToType(v1); \ + Type arg2 = sycl::detail::convertDataToType(v2); \ Type ret = __SYCL_PPCAT(prefix, call)(arg1, arg2); \ - return cl::sycl::detail::convertDataToType(ret); \ + return sycl::detail::convertDataToType(ret); \ } #define __SYCL_MAKE_CALL_ARG3(call, prefix) \ template \ inline __SYCL_ALWAYS_INLINE R __invoke_##call(T1 t1, T2 t2, T3 t3) __NOEXC { \ - using Ret = cl::sycl::detail::ConvertToOpenCLType_t; \ - using Arg1 = cl::sycl::detail::ConvertToOpenCLType_t; \ - using Arg2 = cl::sycl::detail::ConvertToOpenCLType_t; \ - using Arg3 = cl::sycl::detail::ConvertToOpenCLType_t; \ + using Ret = sycl::detail::ConvertToOpenCLType_t; \ + using Arg1 = sycl::detail::ConvertToOpenCLType_t; \ + using Arg2 = sycl::detail::ConvertToOpenCLType_t; \ + using Arg3 = sycl::detail::ConvertToOpenCLType_t; \ __SYCL_EXTERN_IT3(Ret, prefix, call, Arg1, Arg2, Arg3); \ - Arg1 arg1 = cl::sycl::detail::convertDataToType(t1); \ - Arg2 arg2 = cl::sycl::detail::convertDataToType(t2); \ - Arg3 arg3 = cl::sycl::detail::convertDataToType(t3); \ + Arg1 arg1 = sycl::detail::convertDataToType(t1); \ + Arg2 arg2 = sycl::detail::convertDataToType(t2); \ + Arg3 arg3 = sycl::detail::convertDataToType(t3); \ Ret ret = __SYCL_PPCAT(prefix, call)(arg1, arg2, arg3); \ - return cl::sycl::detail::convertDataToType(ret); \ + return sycl::detail::convertDataToType(ret); \ } #ifndef __SYCL_DEVICE_ONLY__ diff --git a/sycl/include/sycl/detail/cg_types.hpp b/sycl/include/sycl/detail/cg_types.hpp index 109bd4d62283f..e97b33c2b555e 100644 --- a/sycl/include/sycl/detail/cg_types.hpp +++ b/sycl/include/sycl/detail/cg_types.hpp @@ -26,11 +26,11 @@ namespace detail { // The structure represents kernel argument. class ArgDesc { public: - ArgDesc(cl::sycl::detail::kernel_param_kind_t Type, void *Ptr, int Size, + ArgDesc(sycl::detail::kernel_param_kind_t Type, void *Ptr, int Size, int Index) : MType(Type), MPtr(Ptr), MSize(Size), MIndex(Index) {} - cl::sycl::detail::kernel_param_kind_t MType; + sycl::detail::kernel_param_kind_t MType; void *MPtr; int MSize; int MIndex; @@ -218,12 +218,11 @@ class HostKernelBase { }; class InteropTask { - std::function MFunc; + std::function MFunc; public: - InteropTask(std::function Func) - : MFunc(Func) {} - void call(cl::sycl::interop_handler &h) { MFunc(h); } + InteropTask(std::function Func) : MFunc(Func) {} + void call(sycl::interop_handler &h) { MFunc(h); } }; class HostTask { @@ -398,7 +397,7 @@ class HostKernel : public HostKernelBase { } template - enable_if_t>::value> + enable_if_t>::value> runOnHost(const NDRDescT &NDRDesc) { sycl::range NGroups(InitializedVal::template get<0>()); diff --git a/sycl/include/sycl/detail/common.hpp b/sycl/include/sycl/detail/common.hpp index e6ae41208bfe8..359b5f0a1a333 100644 --- a/sycl/include/sycl/detail/common.hpp +++ b/sycl/include/sycl/detail/common.hpp @@ -122,8 +122,8 @@ static inline std::string codeToString(pi_int32 code) { { \ auto code = expr; \ if (code != PI_SUCCESS) { \ - std::cerr << __SYCL_PI_ERROR_REPORT \ - << cl::sycl::detail::codeToString(code) << std::endl; \ + std::cerr << __SYCL_PI_ERROR_REPORT << sycl::detail::codeToString(code) \ + << std::endl; \ } \ } #endif @@ -137,15 +137,15 @@ static inline std::string codeToString(pi_int32 code) { if (code != PI_SUCCESS) { \ std::string err_str = \ str ? "\n" + std::string(str) + "\n" : std::string{}; \ - throw exc(__SYCL_PI_ERROR_REPORT + \ - cl::sycl::detail::codeToString(code) + err_str, \ + throw exc(__SYCL_PI_ERROR_REPORT + sycl::detail::codeToString(code) + \ + err_str, \ code); \ } \ } #define __SYCL_REPORT_PI_ERR_TO_EXC_THROW(code, exc, str) \ __SYCL_REPORT_PI_ERR_TO_EXC(code, exc, str) #define __SYCL_REPORT_PI_ERR_TO_EXC_BASE(code) \ - __SYCL_REPORT_PI_ERR_TO_EXC(code, cl::sycl::runtime_error, nullptr) + __SYCL_REPORT_PI_ERR_TO_EXC(code, sycl::runtime_error, nullptr) #else #define __SYCL_REPORT_PI_ERR_TO_EXC_BASE(code) \ __SYCL_REPORT_PI_ERR_TO_STREAM(code) @@ -157,7 +157,7 @@ static inline std::string codeToString(pi_int32 code) { if (code != PI_SUCCESS) { \ throw sycl::exception(sycl::make_error_code(errc), \ __SYCL_PI_ERROR_REPORT + \ - cl::sycl::detail::codeToString(code)); \ + sycl::detail::codeToString(code)); \ } \ } #define __SYCL_REPORT_ERR_TO_EXC_THROW_VIA_ERRC(code, errc) \ diff --git a/sycl/include/sycl/detail/defines_elementary.hpp b/sycl/include/sycl/detail/defines_elementary.hpp index 5865498a384ca..dd7be03767efd 100644 --- a/sycl/include/sycl/detail/defines_elementary.hpp +++ b/sycl/include/sycl/detail/defines_elementary.hpp @@ -8,11 +8,7 @@ #pragma once -#ifndef __SYCL_DISABLE_NAMESPACE_INLINE__ #define __SYCL_INLINE_NAMESPACE(X) inline namespace X -#else -#define __SYCL_INLINE_NAMESPACE(X) namespace X -#endif // __SYCL_DISABLE_NAMESPACE_INLINE__ #ifndef __has_attribute #define __has_attribute(x) 0 diff --git a/sycl/include/sycl/detail/generic_type_traits.hpp b/sycl/include/sycl/detail/generic_type_traits.hpp index 475d9130fb4e4..edb62c98e4f3d 100644 --- a/sycl/include/sycl/detail/generic_type_traits.hpp +++ b/sycl/include/sycl/detail/generic_type_traits.hpp @@ -396,7 +396,7 @@ using select_cl_scalar_t = conditional_t< // half is a special case: it is implemented differently on host and // device and therefore, might lower to different types conditional_t::value, - cl::sycl::detail::half_impl::BIsRepresentationT, T>>>; + sycl::detail::half_impl::BIsRepresentationT, T>>>; // select_cl_vector_or_scalar does cl_* type selection for element type of // a vector type T and does scalar type substitution. If T is not diff --git a/sycl/include/sycl/detail/helpers.hpp b/sycl/include/sycl/detail/helpers.hpp index 6c6ab4e3a8b3d..1bbc42d6d04a4 100644 --- a/sycl/include/sycl/detail/helpers.hpp +++ b/sycl/include/sycl/detail/helpers.hpp @@ -47,10 +47,10 @@ class context_impl; // The function returns list of events that can be passed to OpenCL API as // dependency list and waits for others. __SYCL_EXPORT std::vector -getOrWaitEvents(std::vector DepEvents, - std::shared_ptr Context); +getOrWaitEvents(std::vector DepEvents, + std::shared_ptr Context); -__SYCL_EXPORT void waitEvents(std::vector DepEvents); +__SYCL_EXPORT void waitEvents(std::vector DepEvents); template T *declptr() { return static_cast(nullptr); } @@ -121,7 +121,7 @@ class Builder { } template - static void updateItemIndex(cl::sycl::item &Item, + static void updateItemIndex(sycl::item &Item, const id &NextIndex) { Item.MImpl.MIndex = NextIndex; } diff --git a/sycl/include/sycl/detail/image_accessor_util.hpp b/sycl/include/sycl/detail/image_accessor_util.hpp index ac48940d4bbd5..4075004b2a987 100644 --- a/sycl/include/sycl/detail/image_accessor_util.hpp +++ b/sycl/include/sycl/detail/image_accessor_util.hpp @@ -295,7 +295,7 @@ void convertReadData(const vec PixelData, // OpenCL Spec section 6.12.14.2 does not allow reading uint4 data from an // image with channel datatype other than unsigned_int8,unsigned_int16 and // unsigned_int32. - throw cl::sycl::invalid_parameter_error( + throw sycl::invalid_parameter_error( "Datatype of read data - cl_uint4 is incompatible with the " "image_channel_type of the image.", PI_ERROR_INVALID_VALUE); @@ -317,7 +317,7 @@ void convertReadData(const vec PixelData, // OpenCL Spec section 6.12.14.2 does not allow reading int4 data from an // image with channel datatype other than signed_int8,signed_int16 and // signed_int32. - throw cl::sycl::invalid_parameter_error( + throw sycl::invalid_parameter_error( "Datatype of read data - cl_int4 is incompatible with the " "image_channel_type of the image.", PI_ERROR_INVALID_VALUE); @@ -333,12 +333,12 @@ void convertReadData(const vec PixelData, case image_channel_type::snorm_int8: // max(-1.0f, (float)c / 127.0f) RetData = (PixelData.template convert()) / 127.0f; - RetData = cl::sycl::fmax(RetData, -1); + RetData = sycl::fmax(RetData, -1); break; case image_channel_type::snorm_int16: // max(-1.0f, (float)c / 32767.0f) RetData = (PixelData.template convert()) / 32767.0f; - RetData = cl::sycl::fmax(RetData, -1); + RetData = sycl::fmax(RetData, -1); break; case image_channel_type::unorm_int8: // (float)c / 255.0f @@ -399,7 +399,7 @@ void convertReadData(const vec PixelData, // OpenCL Spec section 6.12.14.2 does not allow reading float4 data from an // image with channel datatype - signed/unsigned_int8,signed/unsigned_int16 // and signed/unsigned_int32. - throw cl::sycl::invalid_parameter_error( + throw sycl::invalid_parameter_error( "Datatype of read data - cl_float4 is incompatible with the " "image_channel_type of the image.", PI_ERROR_INVALID_VALUE); @@ -423,12 +423,12 @@ void convertReadData(const vec PixelData, case image_channel_type::snorm_int8: // max(-1.0f, (half)c / 127.0f) RetDataFloat = (PixelData.template convert()) / 127.0f; - RetDataFloat = cl::sycl::fmax(RetDataFloat, -1); + RetDataFloat = sycl::fmax(RetDataFloat, -1); break; case image_channel_type::snorm_int16: // max(-1.0f, (half)c / 32767.0f) RetDataFloat = (PixelData.template convert()) / 32767.0f; - RetDataFloat = cl::sycl::fmax(RetDataFloat, -1); + RetDataFloat = sycl::fmax(RetDataFloat, -1); break; case image_channel_type::unorm_int8: // (half)c / 255.0f @@ -442,7 +442,7 @@ void convertReadData(const vec PixelData, case image_channel_type::unorm_short_555: case image_channel_type::unorm_int_101010: // TODO: Missing information in OpenCL spec. - throw cl::sycl::feature_not_supported( + throw sycl::feature_not_supported( "Currently unsupported datatype conversion from image_channel_type " "to cl_half4.", PI_ERROR_INVALID_OPERATION); @@ -455,7 +455,7 @@ void convertReadData(const vec PixelData, // OpenCL Spec section 6.12.14.2 does not allow reading float4 data to an // image with channel datatype - signed/unsigned_int8,signed/unsigned_int16 // and signed/unsigned_int32. - throw cl::sycl::invalid_parameter_error( + throw sycl::invalid_parameter_error( "Datatype to read- cl_half4 is incompatible with the " "image_channel_type of the image.", PI_ERROR_INVALID_VALUE); @@ -463,7 +463,7 @@ void convertReadData(const vec PixelData, RetData = PixelData.template convert(); return; case image_channel_type::fp32: - throw cl::sycl::invalid_parameter_error( + throw sycl::invalid_parameter_error( "Datatype to read - cl_half4 is incompatible with the " "image_channel_type of the image.", PI_ERROR_INVALID_VALUE); @@ -486,14 +486,14 @@ convertWriteData(const vec WriteData, // convert_uchar_sat(Data) cl_uint MinVal = min_v(); cl_uint MaxVal = max_v(); - vec PixelData = cl::sycl::clamp(WriteData, MinVal, MaxVal); + vec PixelData = sycl::clamp(WriteData, MinVal, MaxVal); return PixelData.convert(); } case image_channel_type::unsigned_int16: { // convert_ushort_sat(Data) cl_uint MinVal = min_v(); cl_uint MaxVal = max_v(); - vec PixelData = cl::sycl::clamp(WriteData, MinVal, MaxVal); + vec PixelData = sycl::clamp(WriteData, MinVal, MaxVal); return PixelData.convert(); } case image_channel_type::unsigned_int32: @@ -503,7 +503,7 @@ convertWriteData(const vec WriteData, // OpenCL Spec section 6.12.14.4 does not allow writing uint4 data to an // image with channel datatype other than unsigned_int8,unsigned_int16 and // unsigned_int32. - throw cl::sycl::invalid_parameter_error( + throw sycl::invalid_parameter_error( "Datatype of data to write - cl_uint4 is incompatible with the " "image_channel_type of the image.", PI_ERROR_INVALID_VALUE); @@ -520,14 +520,14 @@ convertWriteData(const vec WriteData, // convert_char_sat(Data) cl_int MinVal = min_v(); cl_int MaxVal = max_v(); - vec PixelData = cl::sycl::clamp(WriteData, MinVal, MaxVal); + vec PixelData = sycl::clamp(WriteData, MinVal, MaxVal); return PixelData.convert(); } case image_channel_type::signed_int16: { // convert_short_sat(Data) cl_int MinVal = min_v(); cl_int MaxVal = max_v(); - vec PixelData = cl::sycl::clamp(WriteData, MinVal, MaxVal); + vec PixelData = sycl::clamp(WriteData, MinVal, MaxVal); return PixelData.convert(); } case image_channel_type::signed_int32: @@ -536,7 +536,7 @@ convertWriteData(const vec WriteData, // OpenCL Spec section 6.12.14.4 does not allow writing int4 data to an // image with channel datatype other than signed_int8,signed_int16 and // signed_int32. - throw cl::sycl::invalid_parameter_error( + throw sycl::invalid_parameter_error( "Datatype of data to write - cl_int4 is incompatible with the " "image_channel_type of the image.", PI_ERROR_INVALID_VALUE); @@ -549,7 +549,7 @@ vec processFloatDataToPixel(vec WriteData, vec Temp = WriteData * MulFactor; vec TempInInt = Temp.convert(); vec TempInIntSaturated = - cl::sycl::clamp(TempInInt, min_v(), max_v()); + sycl::clamp(TempInInt, min_v(), max_v()); return TempInIntSaturated.convert(); } @@ -575,7 +575,7 @@ convertWriteData(const vec WriteData, return processFloatDataToPixel(WriteData, 65535.0f); case image_channel_type::unorm_short_565: // TODO: Missing information in OpenCL spec. - throw cl::sycl::feature_not_supported( + throw sycl::feature_not_supported( "Currently unsupported datatype conversion from image_channel_type " "to cl_float4.", PI_ERROR_INVALID_OPERATION); @@ -587,7 +587,7 @@ convertWriteData(const vec WriteData, { vec PixelData = processFloatDataToPixel(WriteData, 32.0f); - PixelData = cl::sycl::min(PixelData, static_cast(0x1f)); + PixelData = sycl::min(PixelData, static_cast(0x1f)); // Compressing the data into the first element of PixelData. // This is needed so that the data can be directly stored into the pixel // location from the first element. @@ -604,7 +604,7 @@ convertWriteData(const vec WriteData, { vec PixelData = processFloatDataToPixel(WriteData, 1023.0f); - PixelData = cl::sycl::min(PixelData, static_cast(0x3ff)); + PixelData = sycl::min(PixelData, static_cast(0x3ff)); PixelData.x() = (PixelData.x() << 20) | (PixelData.y() << 10) | PixelData.z(); return PixelData.convert(); @@ -618,7 +618,7 @@ convertWriteData(const vec WriteData, // OpenCL Spec section 6.12.14.4 does not allow writing float4 data to an // image with channel datatype - signed/unsigned_int8,signed/unsigned_int16 // and signed/unsigned_int32. - throw cl::sycl::invalid_parameter_error( + throw sycl::invalid_parameter_error( "Datatype of data to write - cl_float4 is incompatible with the " "image_channel_type of the image.", PI_ERROR_INVALID_VALUE); @@ -653,7 +653,7 @@ convertWriteData(const vec WriteData, case image_channel_type::unorm_short_555: case image_channel_type::unorm_int_101010: // TODO: Missing information in OpenCL spec. - throw cl::sycl::feature_not_supported( + throw sycl::feature_not_supported( "Currently unsupported datatype conversion from image_channel_type " "to cl_half4.", PI_ERROR_INVALID_OPERATION); @@ -666,14 +666,14 @@ convertWriteData(const vec WriteData, // OpenCL Spec section 6.12.14.4 does not allow writing float4 data to an // image with channel datatype - signed/unsigned_int8,signed/unsigned_int16 // and signed/unsigned_int32. - throw cl::sycl::invalid_parameter_error( + throw sycl::invalid_parameter_error( "Datatype of data to write - cl_float4 is incompatible with the " "image_channel_type of the image.", PI_ERROR_INVALID_VALUE); case image_channel_type::fp16: return WriteData.convert(); case image_channel_type::fp32: - throw cl::sycl::invalid_parameter_error( + throw sycl::invalid_parameter_error( "Datatype of data to write - cl_float4 is incompatible with the " "image_channel_type of the image.", PI_ERROR_INVALID_VALUE); @@ -1038,7 +1038,7 @@ DataT imageReadSamplerHostImpl(const CoordT &Coords, const sampler &Smpl, switch (SmplAddrMode) { case addressing_mode::mirrored_repeat: case addressing_mode::repeat: - throw cl::sycl::feature_not_supported( + throw sycl::feature_not_supported( "Sampler used with unsupported configuration of " "mirrored_repeat/repeat filtering mode with unnormalized " "coordinates. ", diff --git a/sycl/include/sycl/detail/image_ocl_types.hpp b/sycl/include/sycl/detail/image_ocl_types.hpp index c4b186480a6c3..0389a1aaa5916 100644 --- a/sycl/include/sycl/detail/image_ocl_types.hpp +++ b/sycl/include/sycl/detail/image_ocl_types.hpp @@ -46,10 +46,10 @@ template struct sampled_opencl_image_type; #define __SYCL_INVOKE_SPIRV_CALL_ARG1(call) \ template inline R __invoke_##call(T1 ParT1) { \ - using Ret = cl::sycl::detail::ConvertToOpenCLType_t; \ + using Ret = sycl::detail::ConvertToOpenCLType_t; \ T1 Arg1 = ParT1; \ Ret RetVar = __spirv_##call(Arg1); \ - return cl::sycl::detail::convertDataToType(RetVar); \ + return sycl::detail::convertDataToType(RetVar); \ } // The macro defines the function __invoke_ImageXXXX, @@ -62,12 +62,12 @@ template static void __invoke__ImageWrite(ImageT Img, CoordT Coords, ValT Val) { // Convert from sycl types to builtin types to get correct function mangling. - using TmpValT = cl::sycl::detail::ConvertToOpenCLType_t; - using TmpCoordT = cl::sycl::detail::ConvertToOpenCLType_t; + using TmpValT = sycl::detail::ConvertToOpenCLType_t; + using TmpCoordT = sycl::detail::ConvertToOpenCLType_t; TmpCoordT TmpCoord = - cl::sycl::detail::convertDataToType(Coords); - TmpValT TmpVal = cl::sycl::detail::convertDataToType(Val); + sycl::detail::convertDataToType(Coords); + TmpValT TmpVal = sycl::detail::convertDataToType(Val); __spirv_ImageWrite(Img, TmpCoord, TmpVal); } @@ -75,12 +75,12 @@ template static RetType __invoke__ImageRead(ImageT Img, CoordT Coords) { // Convert from sycl types to builtin types to get correct function mangling. - using TempRetT = cl::sycl::detail::ConvertToOpenCLType_t; - using TempArgT = cl::sycl::detail::ConvertToOpenCLType_t; + using TempRetT = sycl::detail::ConvertToOpenCLType_t; + using TempArgT = sycl::detail::ConvertToOpenCLType_t; - TempArgT Arg = cl::sycl::detail::convertDataToType(Coords); + TempArgT Arg = sycl::detail::convertDataToType(Coords); TempRetT Ret = __spirv_ImageRead(Img, Arg); - return cl::sycl::detail::convertDataToType(Ret); + return sycl::detail::convertDataToType(Ret); } template @@ -88,13 +88,13 @@ static RetType __invoke__ImageReadSampler(ImageT Img, CoordT Coords, const __ocl_sampler_t &Smpl) { // Convert from sycl types to builtin types to get correct function mangling. - using TempRetT = cl::sycl::detail::ConvertToOpenCLType_t; - using TempArgT = cl::sycl::detail::ConvertToOpenCLType_t; + using TempRetT = sycl::detail::ConvertToOpenCLType_t; + using TempArgT = sycl::detail::ConvertToOpenCLType_t; using SampledT = - typename cl::sycl::detail::sampled_opencl_image_type::type; + typename sycl::detail::sampled_opencl_image_type::type; TempArgT TmpCoords = - cl::sycl::detail::convertDataToType(Coords); + sycl::detail::convertDataToType(Coords); // According to validation rules(SPIR-V specification, section 2.16.1) result // of __spirv_SampledImage is allowed to be an operand of image lookup // and query instructions explicitly specified to take an operand whose @@ -110,7 +110,7 @@ static RetType __invoke__ImageReadSampler(ImageT Img, CoordT Coords, TempRetT Ret = __spirv_ImageSampleExplicitLod( __spirv_SampledImage(Img, Smpl), TmpCoords, ImageOperands::Lod, 0.0f); - return cl::sycl::detail::convertDataToType(Ret); + return sycl::detail::convertDataToType(Ret); } __SYCL_INLINE_NAMESPACE(cl) { diff --git a/sycl/include/sycl/detail/pi.hpp b/sycl/include/sycl/detail/pi.hpp index a8ec2e9e6943a..aa10889b573bc 100644 --- a/sycl/include/sycl/detail/pi.hpp +++ b/sycl/include/sycl/detail/pi.hpp @@ -45,7 +45,7 @@ enum class PiApiKind { }; class plugin; -template +template __SYCL_EXPORT void *getPluginOpaqueData(void *opaquedata_arg); namespace pi { @@ -94,7 +94,7 @@ void handleUnknownParamName(const char *functionName, T parameter) { // GetInfo functions. It will print the name of the function that invoked it // and the value of the unknown enumerator. #define __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME(parameter) \ - { cl::sycl::detail::pi::handleUnknownParamName(__func__, parameter); } + { sycl::detail::pi::handleUnknownParamName(__func__, parameter); } using PiPlugin = ::pi_plugin; using PiResult = ::pi_result; @@ -123,7 +123,7 @@ using PiMemObjectType = ::pi_mem_type; using PiMemImageChannelOrder = ::pi_image_channel_order; using PiMemImageChannelType = ::pi_image_channel_type; -__SYCL_EXPORT void contextSetExtendedDeleter(const cl::sycl::context &constext, +__SYCL_EXPORT void contextSetExtendedDeleter(const sycl::context &constext, pi_context_extended_deleter func, void *user_data); @@ -404,7 +404,7 @@ PiDeviceBinaryType getBinaryImageFormat(const unsigned char *ImgData, } // namespace pi -namespace RT = cl::sycl::detail::pi; +namespace RT = sycl::detail::pi; // Workaround for build with GCC 5.x // An explicit specialization shall be declared in the namespace block. @@ -439,7 +439,7 @@ template To cast(std::vector Values) { } // namespace detail // For shortness of using PI from the top-level sycl files. -namespace RT = cl::sycl::detail::pi; +namespace RT = sycl::detail::pi; } // namespace sycl } // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/sycl/detail/spirv.hpp b/sycl/include/sycl/detail/spirv.hpp index c6dd228b279dd..780f52e8675c5 100644 --- a/sycl/include/sycl/detail/spirv.hpp +++ b/sycl/include/sycl/detail/spirv.hpp @@ -35,7 +35,7 @@ template struct group_scope> { static constexpr __spv::Scope::Flag value = __spv::Scope::Flag::Workgroup; }; -template <> struct group_scope<::cl::sycl::ext::oneapi::sub_group> { +template <> struct group_scope<::sycl::ext::oneapi::sub_group> { static constexpr __spv::Scope::Flag value = __spv::Scope::Flag::Subgroup; }; @@ -136,7 +136,7 @@ using WidenOpenCLTypeTo32_t = conditional_t< template struct GroupId { using type = size_t; }; -template <> struct GroupId<::cl::sycl::ext::oneapi::sub_group> { +template <> struct GroupId<::sycl::ext::oneapi::sub_group> { using type = uint32_t; }; template diff --git a/sycl/include/sycl/detail/tuple.hpp b/sycl/include/sycl/detail/tuple.hpp index 6298fb7c152d0..e0da3e7713c41 100644 --- a/sycl/include/sycl/detail/tuple.hpp +++ b/sycl/include/sycl/detail/tuple.hpp @@ -196,14 +196,14 @@ namespace std { template constexpr typename tuple_element>::type & -get(cl::sycl::detail::tuple &Arg) noexcept { - return cl::sycl::detail::get()(Arg); +get(sycl::detail::tuple &Arg) noexcept { + return sycl::detail::get()(Arg); } template constexpr typename tuple_element>::type const & -get(const cl::sycl::detail::tuple &Arg) noexcept { - return cl::sycl::detail::get()(Arg); +get(const sycl::detail::tuple &Arg) noexcept { + return sycl::detail::get()(Arg); } } // namespace std diff --git a/sycl/include/sycl/detail/type_traits.hpp b/sycl/include/sycl/detail/type_traits.hpp index 3f0bbf6fc0b05..34522afdc7899 100644 --- a/sycl/include/sycl/detail/type_traits.hpp +++ b/sycl/include/sycl/detail/type_traits.hpp @@ -211,7 +211,7 @@ using is_gen_based_on_type_sizeof = template struct is_vec : std::false_type {}; template -struct is_vec> : std::true_type {}; +struct is_vec> : std::true_type {}; // is_integral template diff --git a/sycl/include/sycl/device.hpp b/sycl/include/sycl/device.hpp index 5e969ca71ecc6..61dc62df5e57e 100644 --- a/sycl/include/sycl/device.hpp +++ b/sycl/include/sycl/device.hpp @@ -229,10 +229,10 @@ class __SYCL_EXPORT device { } // __SYCL_INLINE_NAMESPACE(cl) namespace std { -template <> struct hash { - size_t operator()(const cl::sycl::device &Device) const { - return hash>()( - cl::sycl::detail::getSyclObjImpl(Device)); +template <> struct hash { + size_t operator()(const sycl::device &Device) const { + return hash>()( + sycl::detail::getSyclObjImpl(Device)); } }; } // namespace std diff --git a/sycl/include/sycl/event.hpp b/sycl/include/sycl/event.hpp index 396df38fa675e..1c209c8715095 100644 --- a/sycl/include/sycl/event.hpp +++ b/sycl/include/sycl/event.hpp @@ -161,10 +161,10 @@ class __SYCL_EXPORT event { } // __SYCL_INLINE_NAMESPACE(cl) namespace std { -template <> struct hash { - size_t operator()(const cl::sycl::event &e) const { - return hash>()( - cl::sycl::detail::getSyclObjImpl(e)); +template <> struct hash { + size_t operator()(const sycl::event &e) const { + return hash>()( + sycl::detail::getSyclObjImpl(e)); } }; } // namespace std diff --git a/sycl/include/sycl/exception.hpp b/sycl/include/sycl/exception.hpp index 62ddafc20ded8..3d4c3b66a83ea 100644 --- a/sycl/include/sycl/exception.hpp +++ b/sycl/include/sycl/exception.hpp @@ -333,5 +333,5 @@ class __SYCL2020_DEPRECATED( } // __SYCL_INLINE_NAMESPACE(cl) namespace std { -template <> struct is_error_code_enum : true_type {}; +template <> struct is_error_code_enum : true_type {}; } // namespace std diff --git a/sycl/include/sycl/exception_list.hpp b/sycl/include/sycl/exception_list.hpp index d552110af082e..ddbe3621f3ed7 100644 --- a/sycl/include/sycl/exception_list.hpp +++ b/sycl/include/sycl/exception_list.hpp @@ -50,7 +50,7 @@ class __SYCL_EXPORT exception_list { std::vector MList; }; -using async_handler = std::function; +using async_handler = std::function; } // namespace sycl } // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/include/sycl/ext/intel/esimd/detail/types.hpp b/sycl/include/sycl/ext/intel/esimd/detail/types.hpp index 98856aec18c27..e38c1955540e0 100644 --- a/sycl/include/sycl/ext/intel/esimd/detail/types.hpp +++ b/sycl/include/sycl/ext/intel/esimd/detail/types.hpp @@ -35,7 +35,7 @@ template class simd_view; namespace detail { -namespace csd = cl::sycl::detail; +namespace sd = sycl::detail; template using uint_type_t = std::conditional_t< @@ -81,7 +81,7 @@ static inline constexpr bool is_clang_vector_type_v = // @} template -using remove_cvref_t = csd::remove_cv_t>; +using remove_cvref_t = sd::remove_cv_t>; // is_esimd_arithmetic_type template struct make_esimd_void { @@ -116,7 +116,7 @@ static inline constexpr bool is_vectorizable_v = is_vectorizable::value; template static inline constexpr bool is_esimd_scalar_v = - cl::sycl::detail::is_arithmetic::value; + sycl::detail::is_arithmetic::value; template using is_esimd_scalar = typename std::bool_constant>; @@ -356,14 +356,14 @@ std::enable_if_t && is_clang_vector_type_v, To> template constexpr bool is_type() { return false; } template constexpr bool is_type() { - using UU = typename csd::remove_const_t; - using TT = typename csd::remove_const_t; + using UU = typename sd::remove_const_t; + using TT = typename sd::remove_const_t; return std::is_same::value || is_type(); } // calculates the number of elements in "To" type template ::value>> + typename = sd::enable_if_t::value>> struct bitcast_helper { static inline constexpr int nToElems() { constexpr int R1 = sizeof(ToEltTy) / sizeof(FromEltTy); @@ -375,8 +375,8 @@ struct bitcast_helper { // Change the element type of a simd vector. template ::value>> -ESIMD_INLINE typename csd::conditional_t< + typename = sd::enable_if_t::value>> +ESIMD_INLINE typename sd::conditional_t< std::is_same::value, vector_type_t, vector_type_t::nToElems()>> diff --git a/sycl/include/sycl/ext/intel/experimental/esimd/math.hpp b/sycl/include/sycl/ext/intel/experimental/esimd/math.hpp index ee188fa671faf..68a440f665710 100644 --- a/sycl/include/sycl/ext/intel/experimental/esimd/math.hpp +++ b/sycl/include/sycl/ext/intel/experimental/esimd/math.hpp @@ -1975,7 +1975,7 @@ __ESIMD_API __ESIMD_NS::simd dpasw(__ESIMD_NS::simd src0, __ESIMD_NS::simd src1, __ESIMD_NS::simd src2, Sat sat = {}) { constexpr bool is_4xhf = - (__ESIMD_DNS::is_type()) && + (__ESIMD_DNS::is_type()) && src1_precision == src2_precision && src1_precision == argument_type::FP16; constexpr bool is_4xbf = __ESIMD_DNS::is_word_type::value && @@ -2056,7 +2056,7 @@ __ESIMD_API __ESIMD_NS::simd dpasw2(__ESIMD_NS::simd src1, __ESIMD_NS::simd src2, Sat sat = {}) { constexpr bool is_4xhf = - (__ESIMD_DNS::is_type()) && + (__ESIMD_DNS::is_type()) && src1_precision == src2_precision && src1_precision == argument_type::FP16; constexpr bool is_4xbf = __ESIMD_DNS::is_word_type::value && diff --git a/sycl/include/sycl/ext/intel/fpga_reg.hpp b/sycl/include/sycl/ext/intel/fpga_reg.hpp index a9be1a9dba96e..63808b7c9af2e 100644 --- a/sycl/include/sycl/ext/intel/fpga_reg.hpp +++ b/sycl/include/sycl/ext/intel/fpga_reg.hpp @@ -55,6 +55,6 @@ namespace intelfpga { template [[deprecated("intelfpga::fpga_reg will be removed in a future release.")]] _T fpga_reg(const _T &t) { - return cl::sycl::ext::intel::fpga_reg(t); + return sycl::ext::intel::fpga_reg(t); } } // namespace intelfpga diff --git a/sycl/include/sycl/ext/oneapi/atomic_enums.hpp b/sycl/include/sycl/ext/oneapi/atomic_enums.hpp index 8a7d764d5968e..41a8ff3dc68ca 100644 --- a/sycl/include/sycl/ext/oneapi/atomic_enums.hpp +++ b/sycl/include/sycl/ext/oneapi/atomic_enums.hpp @@ -25,7 +25,7 @@ namespace ext { namespace oneapi { using memory_order __SYCL2020_DEPRECATED("use 'sycl::memory_order' instead") = - cl::sycl::memory_order; + sycl::memory_order; __SYCL_INLINE_CONSTEXPR memory_order memory_order_relaxed __SYCL2020_DEPRECATED( "use 'sycl::memory_order_relaxed' instead") = memory_order::relaxed; __SYCL_INLINE_CONSTEXPR memory_order memory_order_acquire __SYCL2020_DEPRECATED( @@ -38,7 +38,7 @@ __SYCL_INLINE_CONSTEXPR memory_order memory_order_seq_cst __SYCL2020_DEPRECATED( "use 'sycl::memory_order_seq_cst' instead") = memory_order::seq_cst; using memory_scope __SYCL2020_DEPRECATED("use 'sycl::memory_scope' instead") = - cl::sycl::memory_scope; + sycl::memory_scope; __SYCL_INLINE_CONSTEXPR memory_scope memory_scope_work_item __SYCL2020_DEPRECATED( "use 'sycl::memory_scope_work_item' instead") = memory_scope::work_item; @@ -59,7 +59,7 @@ namespace detail { __SYCL2020_DEPRECATED( "use 'sycl::detail::getStdMemoryOrder(sycl::memory_order)' instead") static inline constexpr std::memory_order -getStdMemoryOrder(::cl::sycl::ext::oneapi::memory_order order) { +getStdMemoryOrder(::sycl::ext::oneapi::memory_order order) { switch (order) { case memory_order::relaxed: return std::memory_order_relaxed; diff --git a/sycl/include/sycl/ext/oneapi/atomic_fence.hpp b/sycl/include/sycl/ext/oneapi/atomic_fence.hpp index 43ae7aaae2508..ca5343f0c94b4 100644 --- a/sycl/include/sycl/ext/oneapi/atomic_fence.hpp +++ b/sycl/include/sycl/ext/oneapi/atomic_fence.hpp @@ -21,7 +21,7 @@ namespace sycl { namespace ext { namespace oneapi { namespace detail { -using namespace cl::sycl::detail; +using namespace sycl::detail; } __SYCL2020_DEPRECATED("use sycl::atomic_fence instead") diff --git a/sycl/include/sycl/ext/oneapi/atomic_ref.hpp b/sycl/include/sycl/ext/oneapi/atomic_ref.hpp index 30df94c65503c..3981ca39c57ac 100644 --- a/sycl/include/sycl/ext/oneapi/atomic_ref.hpp +++ b/sycl/include/sycl/ext/oneapi/atomic_ref.hpp @@ -28,10 +28,10 @@ namespace oneapi { namespace detail { // Import from detail:: into ext::oneapi::detail:: to improve readability later -using namespace ::cl::sycl::detail; +using namespace ::sycl::detail; -using memory_order = cl::sycl::ext::oneapi::memory_order; -using memory_scope = cl::sycl::ext::oneapi::memory_scope; +using memory_order = sycl::ext::oneapi::memory_order; +using memory_scope = sycl::ext::oneapi::memory_scope; template struct IsValidAtomicRefType { static constexpr bool value = @@ -43,7 +43,7 @@ template struct IsValidAtomicRefType { std::is_pointer::value); }; -template +template using IsValidAtomicAddressSpace = bool_constant diff --git a/sycl/include/sycl/ext/oneapi/group_algorithm.hpp b/sycl/include/sycl/ext/oneapi/group_algorithm.hpp index b0d7f93047d00..06ed4b1146d1b 100644 --- a/sycl/include/sycl/ext/oneapi/group_algorithm.hpp +++ b/sycl/include/sycl/ext/oneapi/group_algorithm.hpp @@ -26,43 +26,43 @@ namespace oneapi { // EnableIf shorthands for algorithms that depend only on type template -using EnableIfIsScalarArithmetic = cl::sycl::detail::enable_if_t< - cl::sycl::detail::is_scalar_arithmetic::value, T>; +using EnableIfIsScalarArithmetic = + sycl::detail::enable_if_t::value, T>; template -using EnableIfIsVectorArithmetic = cl::sycl::detail::enable_if_t< - cl::sycl::detail::is_vector_arithmetic::value, T>; +using EnableIfIsVectorArithmetic = + sycl::detail::enable_if_t::value, T>; template using EnableIfIsPointer = - cl::sycl::detail::enable_if_t::value, T>; + sycl::detail::enable_if_t::value, T>; template -using EnableIfIsTriviallyCopyable = cl::sycl::detail::enable_if_t< - std::is_trivially_copyable::value && - !cl::sycl::detail::is_vector_arithmetic::value, - T>; +using EnableIfIsTriviallyCopyable = + sycl::detail::enable_if_t::value && + !sycl::detail::is_vector_arithmetic::value, + T>; // EnableIf shorthands for algorithms that depend on type and an operator template -using EnableIfIsScalarArithmeticNativeOp = cl::sycl::detail::enable_if_t< - cl::sycl::detail::is_scalar_arithmetic::value && - cl::sycl::detail::is_native_op::value, +using EnableIfIsScalarArithmeticNativeOp = sycl::detail::enable_if_t< + sycl::detail::is_scalar_arithmetic::value && + sycl::detail::is_native_op::value, T>; template -using EnableIfIsVectorArithmeticNativeOp = cl::sycl::detail::enable_if_t< - cl::sycl::detail::is_vector_arithmetic::value && - cl::sycl::detail::is_native_op::value, +using EnableIfIsVectorArithmeticNativeOp = sycl::detail::enable_if_t< + sycl::detail::is_vector_arithmetic::value && + sycl::detail::is_native_op::value, T>; // TODO: Lift TriviallyCopyable restriction eventually template -using EnableIfIsNonNativeOp = cl::sycl::detail::enable_if_t< - (!cl::sycl::detail::is_scalar_arithmetic::value && - !cl::sycl::detail::is_vector_arithmetic::value && +using EnableIfIsNonNativeOp = sycl::detail::enable_if_t< + (!sycl::detail::is_scalar_arithmetic::value && + !sycl::detail::is_vector_arithmetic::value && std::is_trivially_copyable::value) || - !cl::sycl::detail::is_native_op::value, + !sycl::detail::is_native_op::value, T>; template diff --git a/sycl/include/sycl/ext/oneapi/reduction.hpp b/sycl/include/sycl/ext/oneapi/reduction.hpp index 08598b2540cd5..ea03979b70dbd 100644 --- a/sycl/include/sycl/ext/oneapi/reduction.hpp +++ b/sycl/include/sycl/ext/oneapi/reduction.hpp @@ -38,10 +38,10 @@ event withAuxHandler(std::shared_ptr Queue, bool IsHost, return AuxHandler.finalize(); } -using cl::sycl::detail::bool_constant; -using cl::sycl::detail::enable_if_t; -using cl::sycl::detail::queue_impl; -using cl::sycl::detail::remove_AS; +using sycl::detail::bool_constant; +using sycl::detail::enable_if_t; +using sycl::detail::queue_impl; +using sycl::detail::remove_AS; // This type trait is used to detect if the atomic operation BinaryOperation // used with operands of the type T is available for using in reduction. @@ -2476,7 +2476,7 @@ __SYCL_INLINE_CONSTEXPR AccumulatorT known_identity_v = namespace __SYCL2020_DEPRECATED("use 'ext::oneapi' instead") ONEAPI { using namespace ext::oneapi; namespace detail { -using cl::sycl::detail::queue_impl; +using sycl::detail::queue_impl; __SYCL_EXPORT size_t reduGetMaxWGSize(std::shared_ptr Queue, size_t LocalMemBytesPerWorkItem); __SYCL_EXPORT size_t reduComputeWGSize(size_t NWorkItems, size_t MaxWGSize, diff --git a/sycl/include/sycl/ext/oneapi/sub_group.hpp b/sycl/include/sycl/ext/oneapi/sub_group.hpp index ea5ecda946c16..9a6820d197aa2 100644 --- a/sycl/include/sycl/ext/oneapi/sub_group.hpp +++ b/sycl/include/sycl/ext/oneapi/sub_group.hpp @@ -736,7 +736,7 @@ struct sub_group { } protected: - template friend class cl::sycl::nd_item; + template friend class sycl::nd_item; friend sub_group this_sub_group(); friend sub_group experimental::this_sub_group(); sub_group() = default; diff --git a/sycl/include/sycl/group_algorithm.hpp b/sycl/include/sycl/group_algorithm.hpp index 9615a1ae8be01..5dcffb60b9645 100644 --- a/sycl/include/sycl/group_algorithm.hpp +++ b/sycl/include/sycl/group_algorithm.hpp @@ -71,7 +71,7 @@ inline typename Group::linear_id_type get_local_linear_id(Group g); #define __SYCL_GROUP_GET_LOCAL_LINEAR_ID(D) \ template <> \ inline group::linear_id_type get_local_linear_id>(group) { \ - nd_item it = cl::sycl::detail::Builder::getNDItem(); \ + nd_item it = sycl::detail::Builder::getNDItem(); \ return it.get_local_linear_id(); \ } __SYCL_GROUP_GET_LOCAL_LINEAR_ID(1); diff --git a/sycl/include/sycl/half_type.hpp b/sycl/include/sycl/half_type.hpp index 9d792b3225ebe..af3cc322cd546 100644 --- a/sycl/include/sycl/half_type.hpp +++ b/sycl/include/sycl/half_type.hpp @@ -276,7 +276,7 @@ class half; // Several aliases are defined below: // - StorageT: actual representation of half data type. It is used by scalar -// half values and by 'cl::sycl::vec' class. On device side, it points to some +// half values and by 'sycl::vec' class. On device side, it points to some // native half data type, while on host some custom data type is used to // emulate operations of 16-bit floating-point values // @@ -587,12 +587,12 @@ class half { // Operator << and >> inline friend std::ostream &operator<<(std::ostream &O, - cl::sycl::half const &rhs) { + sycl::half const &rhs) { O << static_cast(rhs); return O; } - inline friend std::istream &operator>>(std::istream &I, cl::sycl::half &rhs) { + inline friend std::istream &operator>>(std::istream &I, sycl::half &rhs) { float ValFloat = 0.0f; I >> ValFloat; rhs = ValFloat; @@ -628,15 +628,15 @@ inline float cast_if_host_half(half_impl::half val) { // Partial specialization of some functions in namespace `std` namespace std { -// Partial specialization of `std::hash` -template <> struct hash { - size_t operator()(cl::sycl::half const &Key) const noexcept { +// Partial specialization of `std::hash` +template <> struct hash { + size_t operator()(sycl::half const &Key) const noexcept { return hash{}(reinterpret_cast(Key)); } }; -// Partial specialization of `std::numeric` -template <> struct numeric_limits { +// Partial specialization of `std::numeric` +template <> struct numeric_limits { // All following values are either calculated based on description of each // function/value on https://en.cppreference.com/w/cpp/types/numeric_limits, // or cl_platform.h. @@ -664,44 +664,43 @@ template <> struct numeric_limits { static constexpr bool is_iec559 = true; static constexpr float_round_style round_style = round_to_nearest; - static __SYCL_CONSTEXPR_HALF const cl::sycl::half(min)() noexcept { + static __SYCL_CONSTEXPR_HALF const sycl::half(min)() noexcept { return 6.103515625e-05f; // half minimum value } - static __SYCL_CONSTEXPR_HALF const cl::sycl::half(max)() noexcept { + static __SYCL_CONSTEXPR_HALF const sycl::half(max)() noexcept { return 65504.0f; // half maximum value } - static __SYCL_CONSTEXPR_HALF const cl::sycl::half lowest() noexcept { + static __SYCL_CONSTEXPR_HALF const sycl::half lowest() noexcept { return -65504.0f; // -1*(half maximum value) } - static __SYCL_CONSTEXPR_HALF const cl::sycl::half epsilon() noexcept { + static __SYCL_CONSTEXPR_HALF const sycl::half epsilon() noexcept { return 9.765625e-04f; // half epsilon } - static __SYCL_CONSTEXPR_HALF const cl::sycl::half round_error() noexcept { + static __SYCL_CONSTEXPR_HALF const sycl::half round_error() noexcept { return 0.5f; } - static constexpr const cl::sycl::half infinity() noexcept { + static constexpr const sycl::half infinity() noexcept { #ifdef __SYCL_DEVICE_ONLY__ return __builtin_huge_valf(); #else - return cl::sycl::detail::host_half_impl::half_v2( - static_cast(0x7C00)); + return sycl::detail::host_half_impl::half_v2(static_cast(0x7C00)); #endif } - static __SYCL_CONSTEXPR_HALF const cl::sycl::half quiet_NaN() noexcept { + static __SYCL_CONSTEXPR_HALF const sycl::half quiet_NaN() noexcept { return __builtin_nanf(""); } - static __SYCL_CONSTEXPR_HALF const cl::sycl::half signaling_NaN() noexcept { + static __SYCL_CONSTEXPR_HALF const sycl::half signaling_NaN() noexcept { return __builtin_nansf(""); } - static __SYCL_CONSTEXPR_HALF const cl::sycl::half denorm_min() noexcept { + static __SYCL_CONSTEXPR_HALF const sycl::half denorm_min() noexcept { return 5.96046e-08f; } }; diff --git a/sycl/include/sycl/handler.hpp b/sycl/include/sycl/handler.hpp index 6425d59a9b5fe..853720e3362db 100644 --- a/sycl/include/sycl/handler.hpp +++ b/sycl/include/sycl/handler.hpp @@ -41,31 +41,29 @@ #define __SYCL_NONCONST_FUNCTOR__ #endif -template +template class __fill; template class __usmfill; template + sycl::access::mode AccessMode, sycl::access::target AccessTarget, + sycl::access::placeholder IsPlaceholder> class __copyAcc2Ptr; template + sycl::access::mode AccessMode, sycl::access::target AccessTarget, + sycl::access::placeholder IsPlaceholder> class __copyPtr2Acc; -template +template class __copyAcc2Acc; // For unit testing purposes @@ -245,8 +243,8 @@ template class reduction_impl_algo; -using cl::sycl::detail::enable_if_t; -using cl::sycl::detail::queue_impl; +using sycl::detail::enable_if_t; +using sycl::detail::queue_impl; // Kernels with single reduction @@ -734,7 +732,7 @@ class __SYCL_EXPORT handler { LambdaArgType>::value; if (IsCallableWithKernelHandler && MIsHost) { - throw cl::sycl::feature_not_supported( + throw sycl::feature_not_supported( "kernel_handler is not yet supported by host device.", PI_ERROR_INVALID_OPERATION); } diff --git a/sycl/include/sycl/image.hpp b/sycl/include/sycl/image.hpp index 896a47fa0d3cc..1cb0e6bc8145f 100644 --- a/sycl/include/sycl/image.hpp +++ b/sycl/include/sycl/image.hpp @@ -69,7 +69,7 @@ using image_allocator = detail::aligned_allocator; /// \sa sampler /// /// \ingroup sycl_api -template +template class image { public: image(image_channel_order Order, image_channel_type Type, @@ -316,10 +316,10 @@ class image { namespace std { template -struct hash> { - size_t operator()(const cl::sycl::image &I) const { - return hash>>()( - cl::sycl::detail::getSyclObjImpl(I)); +struct hash> { + size_t operator()(const sycl::image &I) const { + return hash>>()( + sycl::detail::getSyclObjImpl(I)); } }; } // namespace std diff --git a/sycl/include/sycl/info/context_traits.def b/sycl/include/sycl/info/context_traits.def index bd29e14309fb6..cc532d4cbc683 100644 --- a/sycl/include/sycl/info/context_traits.def +++ b/sycl/include/sycl/info/context_traits.def @@ -1,5 +1,5 @@ __SYCL_PARAM_TRAITS_SPEC(context, reference_count, uint32_t) -__SYCL_PARAM_TRAITS_SPEC(context, platform, cl::sycl::platform) -__SYCL_PARAM_TRAITS_SPEC(context, devices, std::vector) -__SYCL_PARAM_TRAITS_SPEC(context, atomic_memory_order_capabilities, std::vector) -__SYCL_PARAM_TRAITS_SPEC(context, atomic_memory_scope_capabilities, std::vector) +__SYCL_PARAM_TRAITS_SPEC(context, platform, sycl::platform) +__SYCL_PARAM_TRAITS_SPEC(context, devices, std::vector) +__SYCL_PARAM_TRAITS_SPEC(context, atomic_memory_order_capabilities, std::vector) +__SYCL_PARAM_TRAITS_SPEC(context, atomic_memory_scope_capabilities, std::vector) diff --git a/sycl/include/sycl/info/device_traits.def b/sycl/include/sycl/info/device_traits.def index 34385674b29da..46c0fc9cdbd31 100644 --- a/sycl/include/sycl/info/device_traits.def +++ b/sycl/include/sycl/info/device_traits.def @@ -24,9 +24,9 @@ __SYCL_PARAM_TRAITS_SPEC(device, max_mem_alloc_size, pi_uint64) __SYCL_PARAM_TRAITS_SPEC(device, image_support, bool) __SYCL_PARAM_TRAITS_SPEC(device, atomic64, bool) __SYCL_PARAM_TRAITS_SPEC(device, atomic_memory_order_capabilities, - std::vector) + std::vector) __SYCL_PARAM_TRAITS_SPEC(device, atomic_memory_scope_capabilities, - std::vector) + std::vector) __SYCL_PARAM_TRAITS_SPEC(device, ext_oneapi_bfloat16, bool) __SYCL_PARAM_TRAITS_SPEC(device, max_read_image_args, pi_uint32) __SYCL_PARAM_TRAITS_SPEC(device, max_write_image_args, pi_uint32) @@ -63,7 +63,7 @@ __SYCL_PARAM_TRAITS_SPEC(device, execution_capabilities, __SYCL_PARAM_TRAITS_SPEC(device, queue_profiling, bool) __SYCL_PARAM_TRAITS_SPEC(device, built_in_kernel_ids, std::vector) __SYCL_PARAM_TRAITS_SPEC(device, built_in_kernels, std::vector) -__SYCL_PARAM_TRAITS_SPEC(device, platform, cl::sycl::platform) +__SYCL_PARAM_TRAITS_SPEC(device, platform, sycl::platform) __SYCL_PARAM_TRAITS_SPEC(device, name, std::string) __SYCL_PARAM_TRAITS_SPEC(device, vendor, std::string) __SYCL_PARAM_TRAITS_SPEC(device, driver_version, std::string) @@ -73,7 +73,7 @@ __SYCL_PARAM_TRAITS_SPEC(device, opencl_c_version, std::string) __SYCL_PARAM_TRAITS_SPEC(device, extensions, std::vector) __SYCL_PARAM_TRAITS_SPEC(device, printf_buffer_size, size_t) __SYCL_PARAM_TRAITS_SPEC(device, preferred_interop_user_sync, bool) -__SYCL_PARAM_TRAITS_SPEC(device, parent_device, cl::sycl::device) +__SYCL_PARAM_TRAITS_SPEC(device, parent_device, sycl::device) __SYCL_PARAM_TRAITS_SPEC(device, partition_max_sub_devices, pi_uint32) __SYCL_PARAM_TRAITS_SPEC(device, partition_properties, std::vector) diff --git a/sycl/include/sycl/info/kernel_device_specific_traits.def b/sycl/include/sycl/info/kernel_device_specific_traits.def index 367d4fb603cb2..7449d50568073 100644 --- a/sycl/include/sycl/info/kernel_device_specific_traits.def +++ b/sycl/include/sycl/info/kernel_device_specific_traits.def @@ -1,13 +1,12 @@ -__SYCL_PARAM_TRAITS_SPEC(kernel_device_specific, compile_work_group_size, - cl::sycl::range<3>) -__SYCL_PARAM_TRAITS_SPEC(kernel_device_specific, global_work_size, cl::sycl::range<3>) +__SYCL_PARAM_TRAITS_SPEC(kernel_device_specific, compile_work_group_size, sycl::range<3>) +__SYCL_PARAM_TRAITS_SPEC(kernel_device_specific, global_work_size, sycl::range<3>) __SYCL_PARAM_TRAITS_SPEC(kernel_device_specific, preferred_work_group_size_multiple, size_t) __SYCL_PARAM_TRAITS_SPEC(kernel_device_specific, private_mem_size, size_t) __SYCL_PARAM_TRAITS_SPEC(kernel_device_specific, ext_codeplay_num_regs, uint32_t) __SYCL_PARAM_TRAITS_SPEC(kernel_device_specific, work_group_size, size_t) __SYCL_PARAM_TRAITS_SPEC_WITH_INPUT(kernel_device_specific, max_sub_group_size, - uint32_t, cl::sycl::range<3>) + uint32_t, sycl::range<3>) __SYCL_PARAM_TRAITS_SPEC(kernel_device_specific, max_num_sub_groups, uint32_t) __SYCL_PARAM_TRAITS_SPEC(kernel_device_specific, compile_num_sub_groups, uint32_t) __SYCL_PARAM_TRAITS_SPEC(kernel_device_specific, compile_sub_group_size, uint32_t) diff --git a/sycl/include/sycl/info/kernel_sub_group_traits.def b/sycl/include/sycl/info/kernel_sub_group_traits.def index a396d5ceb295f..b0182298ad78b 100644 --- a/sycl/include/sycl/info/kernel_sub_group_traits.def +++ b/sycl/include/sycl/info/kernel_sub_group_traits.def @@ -1,5 +1,5 @@ __SYCL_PARAM_TRAITS_SPEC_WITH_INPUT(kernel_sub_group, max_sub_group_size, - uint32_t, cl::sycl::range<3>) + uint32_t, sycl::range<3>) __SYCL_PARAM_TRAITS_SPEC(kernel_sub_group, max_num_sub_groups, uint32_t) __SYCL_PARAM_TRAITS_SPEC(kernel_sub_group, compile_num_sub_groups, uint32_t) __SYCL_PARAM_TRAITS_SPEC(kernel_sub_group, compile_sub_group_size, uint32_t) diff --git a/sycl/include/sycl/info/kernel_traits.def b/sycl/include/sycl/info/kernel_traits.def index 438b829b76a81..13b8638befbe1 100644 --- a/sycl/include/sycl/info/kernel_traits.def +++ b/sycl/include/sycl/info/kernel_traits.def @@ -2,8 +2,8 @@ __SYCL_PARAM_TRAITS_SPEC(kernel, function_name, std::string) __SYCL_PARAM_TRAITS_SPEC(kernel, num_args, uint32_t) __SYCL_PARAM_TRAITS_SPEC(kernel, reference_count, uint32_t) __SYCL_PARAM_TRAITS_SPEC(kernel, attributes, std::string) -__SYCL_PARAM_TRAITS_SPEC(kernel, context, cl::sycl::context) +__SYCL_PARAM_TRAITS_SPEC(kernel, context, sycl::context) #ifdef __SYCL_INTERNAL_API -__SYCL_PARAM_TRAITS_SPEC(kernel, program, cl::sycl::program) +__SYCL_PARAM_TRAITS_SPEC(kernel, program, sycl::program) #endif diff --git a/sycl/include/sycl/info/kernel_work_group_traits.def b/sycl/include/sycl/info/kernel_work_group_traits.def index 4554c7de92b1f..98c853e6d37a8 100644 --- a/sycl/include/sycl/info/kernel_work_group_traits.def +++ b/sycl/include/sycl/info/kernel_work_group_traits.def @@ -1,6 +1,5 @@ -__SYCL_PARAM_TRAITS_SPEC(kernel_work_group, compile_work_group_size, - cl::sycl::range<3>) -__SYCL_PARAM_TRAITS_SPEC(kernel_work_group, global_work_size, cl::sycl::range<3>) +__SYCL_PARAM_TRAITS_SPEC(kernel_work_group, compile_work_group_size, sycl::range<3>) +__SYCL_PARAM_TRAITS_SPEC(kernel_work_group, global_work_size, sycl::range<3>) __SYCL_PARAM_TRAITS_SPEC(kernel_work_group, preferred_work_group_size_multiple, size_t) __SYCL_PARAM_TRAITS_SPEC(kernel_work_group, private_mem_size, uint64_t) __SYCL_PARAM_TRAITS_SPEC(kernel_work_group, work_group_size, size_t) diff --git a/sycl/include/sycl/info/program_traits.def b/sycl/include/sycl/info/program_traits.def index de36901e9f404..0fef2533005eb 100644 --- a/sycl/include/sycl/info/program_traits.def +++ b/sycl/include/sycl/info/program_traits.def @@ -1,4 +1,4 @@ -__SYCL_PARAM_TRAITS_SPEC(program, context, cl::sycl::context) -__SYCL_PARAM_TRAITS_SPEC(program, devices, std::vector) +__SYCL_PARAM_TRAITS_SPEC(program, context, sycl::context) +__SYCL_PARAM_TRAITS_SPEC(program, devices, std::vector) __SYCL_PARAM_TRAITS_SPEC(program, reference_count, uint32_t) diff --git a/sycl/include/sycl/info/queue_traits.def b/sycl/include/sycl/info/queue_traits.def index d282ebe86dbe0..9b01a9dcb3fd5 100644 --- a/sycl/include/sycl/info/queue_traits.def +++ b/sycl/include/sycl/info/queue_traits.def @@ -1,4 +1,3 @@ __SYCL_PARAM_TRAITS_SPEC(queue, reference_count, uint32_t) -__SYCL_PARAM_TRAITS_SPEC(queue, context, cl::sycl::context) -__SYCL_PARAM_TRAITS_SPEC(queue, device, cl::sycl::device) - +__SYCL_PARAM_TRAITS_SPEC(queue, context, sycl::context) +__SYCL_PARAM_TRAITS_SPEC(queue, device, sycl::device) diff --git a/sycl/include/sycl/kernel.hpp b/sycl/include/sycl/kernel.hpp index f7d13a1b73756..44f98cd729df8 100644 --- a/sycl/include/sycl/kernel.hpp +++ b/sycl/include/sycl/kernel.hpp @@ -216,10 +216,10 @@ class __SYCL_EXPORT kernel { } // __SYCL_INLINE_NAMESPACE(cl) namespace std { -template <> struct hash { - size_t operator()(const cl::sycl::kernel &Kernel) const { - return hash>()( - cl::sycl::detail::getSyclObjImpl(Kernel)); +template <> struct hash { + size_t operator()(const sycl::kernel &Kernel) const { + return hash>()( + sycl::detail::getSyclObjImpl(Kernel)); } }; } // namespace std diff --git a/sycl/include/sycl/kernel_bundle.hpp b/sycl/include/sycl/kernel_bundle.hpp index 47f4a8fa344ca..c2aa65264494d 100644 --- a/sycl/include/sycl/kernel_bundle.hpp +++ b/sycl/include/sycl/kernel_bundle.hpp @@ -731,26 +731,24 @@ build(const kernel_bundle &InputBundle, } // __SYCL_INLINE_NAMESPACE(cl) namespace std { -template <> struct hash { - size_t operator()(const cl::sycl::kernel_id &KernelID) const { - return hash>()( - cl::sycl::detail::getSyclObjImpl(KernelID)); +template <> struct hash { + size_t operator()(const sycl::kernel_id &KernelID) const { + return hash>()( + sycl::detail::getSyclObjImpl(KernelID)); } }; -template -struct hash> { - size_t operator()(const cl::sycl::device_image &DeviceImage) const { - return hash>()( - cl::sycl::detail::getSyclObjImpl(DeviceImage)); +template struct hash> { + size_t operator()(const sycl::device_image &DeviceImage) const { + return hash>()( + sycl::detail::getSyclObjImpl(DeviceImage)); } }; -template -struct hash> { - size_t operator()(const cl::sycl::kernel_bundle &KernelBundle) const { - return hash>()( - cl::sycl::detail::getSyclObjImpl(KernelBundle)); +template struct hash> { + size_t operator()(const sycl::kernel_bundle &KernelBundle) const { + return hash>()( + sycl::detail::getSyclObjImpl(KernelBundle)); } }; } // namespace std diff --git a/sycl/include/sycl/kernel_handler.hpp b/sycl/include/sycl/kernel_handler.hpp index f91f81bde3209..778ead44909b7 100644 --- a/sycl/include/sycl/kernel_handler.hpp +++ b/sycl/include/sycl/kernel_handler.hpp @@ -29,7 +29,7 @@ class kernel_handler { return getSpecializationConstantOnDevice(); #else // TODO: add support of host device - throw cl::sycl::feature_not_supported( + throw sycl::feature_not_supported( "kernel_handler::get_specialization_constant() is not yet supported by " "host device.", PI_ERROR_INVALID_OPERATION); diff --git a/sycl/include/sycl/known_identity.hpp b/sycl/include/sycl/known_identity.hpp index 79e0c0cc8f253..979d5869ceed0 100644 --- a/sycl/include/sycl/known_identity.hpp +++ b/sycl/include/sycl/known_identity.hpp @@ -166,7 +166,7 @@ struct known_identity_impl< #ifdef __SYCL_DEVICE_ONLY__ 0; #else - cl::sycl::detail::host_half_impl::half_v2(static_cast(0)); + sycl::detail::host_half_impl::half_v2(static_cast(0)); #endif }; @@ -206,7 +206,7 @@ struct known_identity_impl< #ifdef __SYCL_DEVICE_ONLY__ 1; #else - cl::sycl::detail::host_half_impl::half_v2(static_cast(0x3C00)); + sycl::detail::host_half_impl::half_v2(static_cast(0x3C00)); #endif }; diff --git a/sycl/include/sycl/marray.hpp b/sycl/include/sycl/marray.hpp index be5cb830071f8..137ece88dbf30 100644 --- a/sycl/include/sycl/marray.hpp +++ b/sycl/include/sycl/marray.hpp @@ -301,7 +301,7 @@ template class marray { }; #define __SYCL_MAKE_MARRAY_ALIAS(ALIAS, TYPE, N) \ - using ALIAS##N = cl::sycl::marray; + using ALIAS##N = sycl::marray; #define __SYCL_MAKE_MARRAY_ALIASES_FOR_ARITHMETIC_TYPES(N) \ __SYCL_MAKE_MARRAY_ALIAS(mchar, char, N) \ diff --git a/sycl/include/sycl/multi_ptr.hpp b/sycl/include/sycl/multi_ptr.hpp index 325db5b7dacfd..6b422e1393565 100644 --- a/sycl/include/sycl/multi_ptr.hpp +++ b/sycl/include/sycl/multi_ptr.hpp @@ -30,7 +30,7 @@ template class multi_ptr { public: using element_type = detail::conditional_t::value, - cl::sycl::detail::half_impl::BIsRepresentationT, + sycl::detail::half_impl::BIsRepresentationT, ElementType>; using difference_type = std::ptrdiff_t; diff --git a/sycl/include/sycl/platform.hpp b/sycl/include/sycl/platform.hpp index 535f3f49bee52..8f69e62b95c8d 100644 --- a/sycl/include/sycl/platform.hpp +++ b/sycl/include/sycl/platform.hpp @@ -157,10 +157,10 @@ class __SYCL_EXPORT platform { } // __SYCL_INLINE_NAMESPACE(cl) namespace std { -template <> struct hash { - size_t operator()(const cl::sycl::platform &p) const { - return hash>()( - cl::sycl::detail::getSyclObjImpl(p)); +template <> struct hash { + size_t operator()(const sycl::platform &p) const { + return hash>()( + sycl::detail::getSyclObjImpl(p)); } }; } // namespace std diff --git a/sycl/include/sycl/program.hpp b/sycl/include/sycl/program.hpp index 6017ce29f8b4d..12b401a6f3a5e 100644 --- a/sycl/include/sycl/program.hpp +++ b/sycl/include/sycl/program.hpp @@ -424,10 +424,10 @@ class __SYCL_EXPORT __SYCL2020_DEPRECATED( } // __SYCL_INLINE_NAMESPACE(cl) namespace std { -template <> struct hash { - size_t operator()(const cl::sycl::program &prg) const { - return hash>()( - cl::sycl::detail::getSyclObjImpl(prg)); +template <> struct hash { + size_t operator()(const sycl::program &prg) const { + return hash>()( + sycl::detail::getSyclObjImpl(prg)); } }; } // namespace std diff --git a/sycl/include/sycl/properties/context_properties.hpp b/sycl/include/sycl/properties/context_properties.hpp index 2fc7891c70340..b945460a81c91 100644 --- a/sycl/include/sycl/properties/context_properties.hpp +++ b/sycl/include/sycl/properties/context_properties.hpp @@ -19,8 +19,8 @@ namespace oneapi { namespace cuda { namespace property { namespace context { -class use_primary_context : public ::cl::sycl::detail::DataLessProperty< - ::cl::sycl::detail::UsePrimaryContext> {}; +class use_primary_context : public ::sycl::detail::DataLessProperty< + ::sycl::detail::UsePrimaryContext> {}; } // namespace context } // namespace property } // namespace cuda @@ -31,8 +31,9 @@ namespace property { namespace context { namespace __SYCL2020_DEPRECATED( "use 'sycl::ext::oneapi::cuda::property::context' instead") cuda { -class use_primary_context : public ::cl::sycl::ext::oneapi::cuda::property:: - context::use_primary_context {}; +class use_primary_context + : public ::sycl::ext::oneapi::cuda::property::context::use_primary_context { +}; // clang-format off } // namespace cuda // clang-format on diff --git a/sycl/include/sycl/properties/queue_properties.hpp b/sycl/include/sycl/properties/queue_properties.hpp index ba92cc954293d..38841890a6e53 100644 --- a/sycl/include/sycl/properties/queue_properties.hpp +++ b/sycl/include/sycl/properties/queue_properties.hpp @@ -26,16 +26,16 @@ namespace oneapi { namespace property { namespace queue { -class discard_events : public ::cl::sycl::detail::DataLessProperty< - ::cl::sycl::detail::DiscardEvents> {}; +class discard_events + : public ::sycl::detail::DataLessProperty<::sycl::detail::DiscardEvents> {}; } // namespace queue } // namespace property namespace cuda { namespace property { namespace queue { -class use_default_stream : public ::cl::sycl::detail::DataLessProperty< - ::cl::sycl::detail::UseDefaultStream> {}; +class use_default_stream : public ::sycl::detail::DataLessProperty< + ::sycl::detail::UseDefaultStream> {}; } // namespace queue } // namespace property } // namespace cuda @@ -46,8 +46,8 @@ namespace property { namespace queue { namespace __SYCL2020_DEPRECATED( "use 'sycl::ext::oneapi::cuda::property::queue' instead") cuda { -class use_default_stream : public ::cl::sycl::ext::oneapi::cuda::property:: - queue::use_default_stream {}; +class use_default_stream + : public ::sycl::ext::oneapi::cuda::property::queue::use_default_stream {}; // clang-format off } // namespace cuda // clang-format on diff --git a/sycl/include/sycl/queue.hpp b/sycl/include/sycl/queue.hpp index bb9deaa90820b..2406cd6195e83 100644 --- a/sycl/include/sycl/queue.hpp +++ b/sycl/include/sycl/queue.hpp @@ -1245,10 +1245,10 @@ event submitAssertCapture(queue &Self, event &Event, queue *SecondaryQueue, } // __SYCL_INLINE_NAMESPACE(cl) namespace std { -template <> struct hash { - size_t operator()(const cl::sycl::queue &Q) const { - return std::hash>()( - cl::sycl::detail::getSyclObjImpl(Q)); +template <> struct hash { + size_t operator()(const sycl::queue &Q) const { + return std::hash>()( + sycl::detail::getSyclObjImpl(Q)); } }; } // namespace std diff --git a/sycl/include/sycl/sampler.hpp b/sycl/include/sycl/sampler.hpp index 236c02ca5c4b7..af7255f85d231 100644 --- a/sycl/include/sycl/sampler.hpp +++ b/sycl/include/sycl/sampler.hpp @@ -119,8 +119,8 @@ class __SYCL_EXPORT __SYCL_SPECIAL_CLASS sampler { template friend decltype(Obj::impl) detail::getSyclObjImpl(const Obj &SyclObject); #endif - template friend class detail::image_accessor; }; @@ -128,14 +128,14 @@ class __SYCL_EXPORT __SYCL_SPECIAL_CLASS sampler { } // __SYCL_INLINE_NAMESPACE(cl) namespace std { -template <> struct hash { - size_t operator()(const cl::sycl::sampler &s) const { +template <> struct hash { + size_t operator()(const sycl::sampler &s) const { #ifdef __SYCL_DEVICE_ONLY__ (void)s; return 0; #else - return hash>()( - cl::sycl::detail::getSyclObjImpl(s)); + return hash>()( + sycl::detail::getSyclObjImpl(s)); #endif } }; diff --git a/sycl/include/sycl/stream.hpp b/sycl/include/sycl/stream.hpp index 781e0b0065e83..cbbd3a0c42d41 100644 --- a/sycl/include/sycl/stream.hpp +++ b/sycl/include/sycl/stream.hpp @@ -64,23 +64,22 @@ using EnableIfFP = std::is_same::value, T>; -using GlobalBufAccessorT = accessor; +using GlobalBufAccessorT = accessor; constexpr static access::address_space GlobalBufAS = - TargetToAS::AS; + TargetToAS::AS; using GlobalBufPtrType = typename detail::DecoratedType::type *; constexpr static int GlobalBufDim = 1; -using GlobalOffsetAccessorT = - accessor; +using GlobalOffsetAccessorT = accessor; constexpr static access::address_space GlobalOffsetAS = - TargetToAS::AS; + TargetToAS::AS; using GlobalOffsetPtrType = typename detail::DecoratedType::type *; constexpr static int GlobalOffsetDim = 1; @@ -646,11 +645,11 @@ template struct IsSwizzleOp : std::false_type {}; template class OperationCurrentT, int... Indexes> -struct IsSwizzleOp> : std::true_type { using T = typename VecT::element_type; - using Type = typename cl::sycl::vec; + using Type = typename sycl::vec; }; template @@ -1163,14 +1162,14 @@ inline const stream &operator<<(const stream &Out, const T &RHS) { } // namespace sycl } // __SYCL_INLINE_NAMESPACE(cl) namespace std { -template <> struct hash { - size_t operator()(const cl::sycl::stream &S) const { +template <> struct hash { + size_t operator()(const sycl::stream &S) const { #ifdef __SYCL_DEVICE_ONLY__ (void)S; return 0; #else - return hash>()( - cl::sycl::detail::getSyclObjImpl(S)); + return hash>()( + sycl::detail::getSyclObjImpl(S)); #endif } }; diff --git a/sycl/include/sycl/types.hpp b/sycl/include/sycl/types.hpp index 3caa0d6d40300..42eca27ef1283 100644 --- a/sycl/include/sycl/types.hpp +++ b/sycl/include/sycl/types.hpp @@ -350,7 +350,7 @@ convertImpl(T Value) { std::is_same::value)), \ R> \ convertImpl(T Value) { \ - OpenCLT OpValue = cl::sycl::detail::convertDataToType(Value); \ + OpenCLT OpValue = sycl::detail::convertDataToType(Value); \ return __spirv_SConvert##_R##DestType(OpValue); \ } @@ -370,7 +370,7 @@ __SYCL_GENERATE_CONVERT_IMPL(long) std::is_same::value, \ R> \ convertImpl(T Value) { \ - OpenCLT OpValue = cl::sycl::detail::convertDataToType(Value); \ + OpenCLT OpValue = sycl::detail::convertDataToType(Value); \ return __spirv_UConvert##_R##DestType(OpValue); \ } @@ -402,7 +402,7 @@ convertImpl(T Value) { std::is_same::value)), \ R> \ convertImpl(T Value) { \ - OpenCLT OpValue = cl::sycl::detail::convertDataToType(Value); \ + OpenCLT OpValue = sycl::detail::convertDataToType(Value); \ return __spirv_Convert##SPIRVOp##_R##DestType(OpValue); \ } @@ -422,7 +422,7 @@ __SYCL_GENERATE_CONVERT_IMPL(SToF, double) std::is_same::value)), \ R> \ convertImpl(T Value) { \ - OpenCLT OpValue = cl::sycl::detail::convertDataToType(Value); \ + OpenCLT OpValue = sycl::detail::convertDataToType(Value); \ return __spirv_Convert##SPIRVOp##_R##DestType(OpValue); \ } @@ -445,7 +445,7 @@ __SYCL_GENERATE_CONVERT_IMPL(UToF, double) RoundingModeCondition::value, \ R> \ convertImpl(T Value) { \ - OpenCLT OpValue = cl::sycl::detail::convertDataToType(Value); \ + OpenCLT OpValue = sycl::detail::convertDataToType(Value); \ return __spirv_FConvert##_R##DestType##_##RoundingMode(OpValue); \ } @@ -475,7 +475,7 @@ __SYCL_GENERATE_CONVERT_IMPL_FOR_ROUNDING_MODE(rtn, Rtn) RoundingModeCondition::value, \ R> \ convertImpl(T Value) { \ - OpenCLT OpValue = cl::sycl::detail::convertDataToType(Value); \ + OpenCLT OpValue = sycl::detail::convertDataToType(Value); \ return __spirv_Convert##SPIRVOp##_R##DestType##_##RoundingMode(OpValue); \ } @@ -700,15 +700,15 @@ template class vec { #ifdef __SYCL_USE_EXT_VECTOR_TYPE__ template using EnableIfNotHostHalf = typename detail::enable_if_t< - !std::is_same::value || - !std::is_same::value, + !std::is_same::value || + !std::is_same::value, T>; template using EnableIfHostHalf = typename detail::enable_if_t< - std::is_same::value && - std::is_same::value, + std::is_same::value && + std::is_same::value, T>; template @@ -1960,7 +1960,7 @@ class SwizzleOp { OperationRightT m_RightOperation; // friends - template friend class cl::sycl::vec; + template friend class sycl::vec; template class T4, int... T5> @@ -2082,30 +2082,25 @@ __SYCL_RELLOGOP(||) #ifdef __SYCL_USE_EXT_VECTOR_TYPE__ #define __SYCL_DECLARE_TYPE_VIA_CL_T(type) \ - using __##type##_t = cl::sycl::cl_##type; \ + using __##type##_t = sycl::cl_##type; \ using __##type##2_vec_t = \ - cl::sycl::cl_##type __attribute__((ext_vector_type(2))); \ + sycl::cl_##type __attribute__((ext_vector_type(2))); \ using __##type##3_vec_t = \ - cl::sycl::cl_##type __attribute__((ext_vector_type(3))); \ + sycl::cl_##type __attribute__((ext_vector_type(3))); \ using __##type##4_vec_t = \ - cl::sycl::cl_##type __attribute__((ext_vector_type(4))); \ + sycl::cl_##type __attribute__((ext_vector_type(4))); \ using __##type##8_vec_t = \ - cl::sycl::cl_##type __attribute__((ext_vector_type(8))); \ + sycl::cl_##type __attribute__((ext_vector_type(8))); \ using __##type##16_vec_t = \ - cl::sycl::cl_##type __attribute__((ext_vector_type(16))); + sycl::cl_##type __attribute__((ext_vector_type(16))); #define __SYCL_DECLARE_TYPE_T(type) \ - using __##type##_t = cl::sycl::type; \ - using __##type##2_vec_t = \ - cl::sycl::type __attribute__((ext_vector_type(2))); \ - using __##type##3_vec_t = \ - cl::sycl::type __attribute__((ext_vector_type(3))); \ - using __##type##4_vec_t = \ - cl::sycl::type __attribute__((ext_vector_type(4))); \ - using __##type##8_vec_t = \ - cl::sycl::type __attribute__((ext_vector_type(8))); \ - using __##type##16_vec_t = \ - cl::sycl::type __attribute__((ext_vector_type(16))); + using __##type##_t = sycl::type; \ + using __##type##2_vec_t = sycl::type __attribute__((ext_vector_type(2))); \ + using __##type##3_vec_t = sycl::type __attribute__((ext_vector_type(3))); \ + using __##type##4_vec_t = sycl::type __attribute__((ext_vector_type(4))); \ + using __##type##8_vec_t = sycl::type __attribute__((ext_vector_type(8))); \ + using __##type##16_vec_t = sycl::type __attribute__((ext_vector_type(16))); __SYCL_DECLARE_TYPE_VIA_CL_T(char) __SYCL_DECLARE_TYPE_T(schar) @@ -2133,12 +2128,12 @@ __SYCL_DECLARE_TYPE_VIA_CL_T(double) #define __SYCL_GET_SCALAR_CL_TYPE(target) ::cl_##target #endif // __SYCL_USE_EXT_VECTOR_TYPE__ -using __half_t = cl::sycl::detail::half_impl::StorageT; -using __half2_vec_t = cl::sycl::detail::half_impl::Vec2StorageT; -using __half3_vec_t = cl::sycl::detail::half_impl::Vec3StorageT; -using __half4_vec_t = cl::sycl::detail::half_impl::Vec4StorageT; -using __half8_vec_t = cl::sycl::detail::half_impl::Vec8StorageT; -using __half16_vec_t = cl::sycl::detail::half_impl::Vec16StorageT; +using __half_t = sycl::detail::half_impl::StorageT; +using __half2_vec_t = sycl::detail::half_impl::Vec2StorageT; +using __half3_vec_t = sycl::detail::half_impl::Vec3StorageT; +using __half4_vec_t = sycl::detail::half_impl::Vec4StorageT; +using __half8_vec_t = sycl::detail::half_impl::Vec8StorageT; +using __half16_vec_t = sycl::detail::half_impl::Vec16StorageT; #define __SYCL_GET_CL_HALF_TYPE(target, num) __##target##num##_vec_t __SYCL_INLINE_NAMESPACE(cl) { diff --git a/sycl/source/detail/accessor_impl.cpp b/sycl/source/detail/accessor_impl.cpp index 1ec6804d400ed..5c78b861452e3 100644 --- a/sycl/source/detail/accessor_impl.cpp +++ b/sycl/source/detail/accessor_impl.cpp @@ -40,8 +40,8 @@ void addHostAccessorAndWait(Requirement *Req) { } void constructorNotification(void *BufferObj, void *AccessorObj, - cl::sycl::access::target Target, - cl::sycl::access::mode Mode, + sycl::access::target Target, + sycl::access::mode Mode, const detail::code_location &CodeLoc) { XPTIRegistry::bufferAccessorNotification( BufferObj, AccessorObj, (uint32_t)Target, (uint32_t)Mode, CodeLoc); diff --git a/sycl/source/detail/builtins_common.cpp b/sycl/source/detail/builtins_common.cpp index 7e813d3273a91..983509d253de6 100644 --- a/sycl/source/detail/builtins_common.cpp +++ b/sycl/source/detail/builtins_common.cpp @@ -19,7 +19,7 @@ #include -namespace s = cl::sycl; +namespace s = sycl; namespace d = s::detail; __SYCL_INLINE_NAMESPACE(cl) { diff --git a/sycl/source/detail/builtins_geometric.cpp b/sycl/source/detail/builtins_geometric.cpp index cebd320e4c116..e22faac55f608 100644 --- a/sycl/source/detail/builtins_geometric.cpp +++ b/sycl/source/detail/builtins_geometric.cpp @@ -14,7 +14,7 @@ #include -namespace s = cl::sycl; +namespace s = sycl; namespace d = s::detail; __SYCL_INLINE_NAMESPACE(cl) { diff --git a/sycl/source/detail/builtins_helper.hpp b/sycl/source/detail/builtins_helper.hpp index 41deb22339a3c..6f59760b45f8d 100644 --- a/sycl/source/detail/builtins_helper.hpp +++ b/sycl/source/detail/builtins_helper.hpp @@ -19,7 +19,7 @@ __SYCL_EXPORT sycl::vec Fun __NOEXC(sycl::vec x) { \ sycl::vec r; \ detail::helper().run_1v( \ - r, [](Arg1 x) { return cl::__host_std::Call(x); }, x); \ + r, [](Arg1 x) { return __host_std::Call(x); }, x); \ return r; \ } @@ -28,7 +28,7 @@ sycl::vec y) { \ sycl::vec r; \ detail::helper().run_1v_2v( \ - r, [](Arg1 x, Arg2 y) { return cl::__host_std::Call(x, y); }, x, y); \ + r, [](Arg1 x, Arg2 y) { return __host_std::Call(x, y); }, x, y); \ return r; \ } @@ -36,8 +36,7 @@ __SYCL_EXPORT Ret Fun __NOEXC(sycl::vec x, sycl::vec y) { \ Ret r = Ret(); \ detail::helper().run_1v_2v_rs( \ - r, \ - [](Ret &r, Arg1 x, Arg2 y) { return cl::__host_std::Call(r, x, y); }, \ + r, [](Ret &r, Arg1 x, Arg2 y) { return __host_std::Call(r, x, y); }, \ x, y); \ return r; \ } @@ -46,7 +45,7 @@ __SYCL_EXPORT Ret Fun __NOEXC(sycl::vec x) { \ Ret r = Ret(); \ detail::helper().run_1v_rs( \ - r, [](Ret &r, Arg1 x) { return cl::__host_std::Call(r, x); }, x); \ + r, [](Ret &r, Arg1 x) { return __host_std::Call(r, x); }, x); \ return r; \ } @@ -55,8 +54,7 @@ sycl::vec x, sycl::vec y, sycl::vec z) { \ sycl::vec r; \ detail::helper().run_1v_2v_3v( \ - r, \ - [](Arg1 x, Arg2 y, Arg3 z) { return cl::__host_std::Call(x, y, z); }, \ + r, [](Arg1 x, Arg2 y, Arg3 z) { return __host_std::Call(x, y, z); }, \ x, y, z); \ return r; \ } @@ -66,9 +64,8 @@ Arg3 z) { \ sycl::vec r; \ detail::helper().run_1v_2s_3s( \ - r, \ - [](Arg1 x, Arg2 y, Arg3 z) { return cl::__host_std::Fun(x, y, z); }, \ - x, y, z); \ + r, [](Arg1 x, Arg2 y, Arg3 z) { return __host_std::Fun(x, y, z); }, x, \ + y, z); \ return r; \ } @@ -76,7 +73,7 @@ __SYCL_EXPORT sycl::vec Fun __NOEXC(sycl::vec x, Arg2 y) { \ sycl::vec r; \ detail::helper().run_1v_2s( \ - r, [](Arg1 x, Arg2 y) { return cl::__host_std::Fun(x, y); }, x, y); \ + r, [](Arg1 x, Arg2 y) { return __host_std::Fun(x, y); }, x, y); \ return r; \ } @@ -84,7 +81,7 @@ __SYCL_EXPORT Ret Fun __NOEXC(sycl::vec x) { \ Ret r; \ detail::helper().run_1v_sr_and( \ - r, [](Arg1 x) { return cl::__host_std::Call(x); }, x); \ + r, [](Arg1 x) { return __host_std::Call(x); }, x); \ return r; \ } @@ -92,7 +89,7 @@ __SYCL_EXPORT Ret Fun __NOEXC(sycl::vec x) { \ Ret r; \ detail::helper().run_1v_sr_or( \ - r, [](Arg1 x) { return cl::__host_std::Call(x); }, x); \ + r, [](Arg1 x) { return __host_std::Call(x); }, x); \ return r; \ } @@ -101,7 +98,7 @@ sycl::vec *y) { \ sycl::vec r; \ detail::helper().run_1v_2p( \ - r, [](Arg1 x, Arg2 *y) { return cl::__host_std::Fun(x, y); }, x, y); \ + r, [](Arg1 x, Arg2 *y) { return __host_std::Fun(x, y); }, x, y); \ return r; \ } @@ -110,8 +107,7 @@ sycl::vec x, sycl::vec y, sycl::vec *z) { \ sycl::vec r; \ detail::helper().run_1v_2v_3p( \ - r, \ - [](Arg1 x, Arg2 y, Arg3 *z) { return cl::__host_std::Fun(x, y, z); }, \ + r, [](Arg1 x, Arg2 y, Arg3 *z) { return __host_std::Fun(x, y, z); }, \ x, y, z); \ return r; \ } diff --git a/sycl/source/detail/builtins_integer.cpp b/sycl/source/detail/builtins_integer.cpp index f8040f6106f01..e64e5179b7f01 100644 --- a/sycl/source/detail/builtins_integer.cpp +++ b/sycl/source/detail/builtins_integer.cpp @@ -15,7 +15,7 @@ #include #include -namespace s = cl::sycl; +namespace s = sycl; namespace d = s::detail; __SYCL_INLINE_NAMESPACE(cl) { diff --git a/sycl/source/detail/builtins_math.cpp b/sycl/source/detail/builtins_math.cpp index e2c52d761ff89..0678bcad896a4 100644 --- a/sycl/source/detail/builtins_math.cpp +++ b/sycl/source/detail/builtins_math.cpp @@ -20,7 +20,7 @@ #include -namespace s = cl::sycl; +namespace s = sycl; namespace d = s::detail; __SYCL_INLINE_NAMESPACE(cl) { diff --git a/sycl/source/detail/builtins_relational.cpp b/sycl/source/detail/builtins_relational.cpp index 03f5617616eb7..d2de0b3a0eafc 100644 --- a/sycl/source/detail/builtins_relational.cpp +++ b/sycl/source/detail/builtins_relational.cpp @@ -14,7 +14,7 @@ #include -namespace s = cl::sycl; +namespace s = sycl; namespace d = s::detail; __SYCL_INLINE_NAMESPACE(cl) { diff --git a/sycl/source/detail/context_impl.cpp b/sycl/source/detail/context_impl.cpp index 1a0997d7a4461..bea2ec2424f89 100644 --- a/sycl/source/detail/context_impl.cpp +++ b/sycl/source/detail/context_impl.cpp @@ -33,7 +33,7 @@ context_impl::context_impl(const device &Device, async_handler AsyncHandler, MKernelProgramCache.setContextPtr(this); } -context_impl::context_impl(const std::vector Devices, +context_impl::context_impl(const std::vector Devices, async_handler AsyncHandler, const property_list &PropList) : MAsyncHandler(AsyncHandler), MDevices(Devices), MContext(nullptr), @@ -97,7 +97,7 @@ context_impl::context_impl(RT::PiContext PiContext, async_handler AsyncHandler, // // TODO: Move this backend-specific retain of the context to SYCL-2020 style // make_context interop, when that is created. - if (getPlugin().getBackend() == cl::sycl::backend::opencl) { + if (getPlugin().getBackend() == sycl::backend::opencl) { getPlugin().call(MContext); } MKernelProgramCache.setContextPtr(this); @@ -144,18 +144,18 @@ template <> platform context_impl::get_info() const { return createSyclObjFromImpl(MPlatform); } template <> -std::vector +std::vector context_impl::get_info() const { return MDevices; } template <> -std::vector +std::vector context_impl::get_info() const { if (is_host()) - return {cl::sycl::memory_order::relaxed, cl::sycl::memory_order::acquire, - cl::sycl::memory_order::release, cl::sycl::memory_order::acq_rel, - cl::sycl::memory_order::seq_cst}; + return {sycl::memory_order::relaxed, sycl::memory_order::acquire, + sycl::memory_order::release, sycl::memory_order::acq_rel, + sycl::memory_order::seq_cst}; pi_memory_order_capabilities Result; getPlugin().call( @@ -166,14 +166,13 @@ context_impl::get_info() return readMemoryOrderBitfield(Result); } template <> -std::vector +std::vector context_impl::get_info() const { if (is_host()) - return {cl::sycl::memory_scope::work_item, - cl::sycl::memory_scope::sub_group, - cl::sycl::memory_scope::work_group, cl::sycl::memory_scope::device, - cl::sycl::memory_scope::system}; + return {sycl::memory_scope::work_item, sycl::memory_scope::sub_group, + sycl::memory_scope::work_group, sycl::memory_scope::device, + sycl::memory_scope::system}; pi_memory_scope_capabilities Result; getPlugin().call( diff --git a/sycl/source/detail/context_impl.hpp b/sycl/source/detail/context_impl.hpp index da5b40b80ce1a..c8375f3085c22 100644 --- a/sycl/source/detail/context_impl.hpp +++ b/sycl/source/detail/context_impl.hpp @@ -54,7 +54,7 @@ class context_impl { /// \param DeviceList is a list of SYCL device instances. /// \param AsyncHandler is an instance of async_handler. /// \param PropList is an instance of property_list. - context_impl(const std::vector DeviceList, + context_impl(const std::vector DeviceList, async_handler AsyncHandler, const property_list &PropList); /// Construct a context_impl using plug-in interoperability handle. diff --git a/sycl/source/detail/device_filter.cpp b/sycl/source/detail/device_filter.cpp index e0001e47a68b6..148eda8782932 100644 --- a/sycl/source/detail/device_filter.cpp +++ b/sycl/source/detail/device_filter.cpp @@ -94,7 +94,7 @@ device_filter::device_filter(const std::string &FilterString) { "{host,opencl,level_zero,cuda,hip,esimd_emulator,*}.\n" "Possible device types are {host,cpu,gpu,acc,*}.\n" "Device number should be an non-negative integer.\n"; - throw cl::sycl::invalid_parameter_error(Message, PI_ERROR_INVALID_VALUE); + throw sycl::invalid_parameter_error(Message, PI_ERROR_INVALID_VALUE); } } } diff --git a/sycl/source/detail/device_impl.cpp b/sycl/source/detail/device_impl.cpp index d47682f11cd22..53dcc0e718b49 100644 --- a/sycl/source/detail/device_impl.cpp +++ b/sycl/source/detail/device_impl.cpp @@ -161,7 +161,7 @@ std::vector device_impl::create_sub_devices(size_t ComputeUnits) const { PI_ERROR_INVALID_DEVICE); if (!is_partition_supported(info::partition_property::partition_equally)) { - throw cl::sycl::feature_not_supported(); + throw sycl::feature_not_supported(); } // If count exceeds the total number of compute units in the device, an // exception with the errc::invalid error code must be thrown. @@ -187,7 +187,7 @@ device_impl::create_sub_devices(const std::vector &Counts) const { PI_ERROR_INVALID_DEVICE); if (!is_partition_supported(info::partition_property::partition_by_counts)) { - throw cl::sycl::feature_not_supported(); + throw sycl::feature_not_supported(); } static const pi_device_partition_property P[] = { PI_DEVICE_PARTITION_BY_COUNTS, PI_DEVICE_PARTITION_BY_COUNTS_LIST_END, 0}; @@ -234,7 +234,7 @@ std::vector device_impl::create_sub_devices( if (!is_partition_supported( info::partition_property::partition_by_affinity_domain) || !is_affinity_supported(AffinityDomain)) { - throw cl::sycl::feature_not_supported(); + throw sycl::feature_not_supported(); } const pi_device_partition_property Properties[3] = { PI_DEVICE_PARTITION_BY_AFFINITY_DOMAIN, diff --git a/sycl/source/detail/device_info.hpp b/sycl/source/detail/device_info.hpp index 0d7afa3660b14..6baa80c3afb9a 100644 --- a/sycl/source/detail/device_info.hpp +++ b/sycl/source/detail/device_info.hpp @@ -78,10 +78,18 @@ read_execution_bitfield(pi_device_exec_capabilities bits) { } // Mapping expected SYCL return types to those returned by PI calls -template struct sycl_to_pi { using type = T; }; -template <> struct sycl_to_pi { using type = pi_bool; }; -template <> struct sycl_to_pi { using type = RT::PiDevice; }; -template <> struct sycl_to_pi { using type = RT::PiPlatform; }; +template struct sycl_to_pi { + using type = T; +}; +template <> struct sycl_to_pi { + using type = pi_bool; +}; +template <> struct sycl_to_pi { + using type = RT::PiDevice; +}; +template <> struct sycl_to_pi { + using type = RT::PiPlatform; +}; // Mapping fp_config device info types to the values used to check fp support template struct check_fp_support {}; diff --git a/sycl/source/detail/error_handling/enqueue_kernel.cpp b/sycl/source/detail/error_handling/enqueue_kernel.cpp index e82723434b15b..1cd0713db22ba 100644 --- a/sycl/source/detail/error_handling/enqueue_kernel.cpp +++ b/sycl/source/detail/error_handling/enqueue_kernel.cpp @@ -28,7 +28,7 @@ void handleInvalidWorkGroupSize(const device_impl &DeviceImpl, pi_kernel Kernel, const plugin &Plugin = DeviceImpl.getPlugin(); RT::PiDevice Device = DeviceImpl.getHandleRef(); - cl::sycl::platform Platform = DeviceImpl.get_platform(); + sycl::platform Platform = DeviceImpl.get_platform(); if (HasLocalSize) { size_t MaxThreadsPerBlock[3] = {}; @@ -54,7 +54,7 @@ void handleInvalidWorkGroupSize(const device_impl &DeviceImpl, pi_kernel Kernel, bool IsOpenCL = false; // Backend is any OpenCL version bool IsOpenCLV1x = false; // Backend is OpenCL 1.x bool IsOpenCLV20 = false; // Backend is OpenCL 2.0 - if (Platform.get_backend() == cl::sycl::backend::opencl) { + if (Platform.get_backend() == sycl::backend::opencl) { std::string VersionString = DeviceImpl.get_info(); IsOpenCL = true; IsOpenCLV1x = (VersionString.find("1.") == 0); diff --git a/sycl/source/detail/event_impl.cpp b/sycl/source/detail/event_impl.cpp index c6cba3816cdd7..8f8a9af9931e7 100644 --- a/sycl/source/detail/event_impl.cpp +++ b/sycl/source/detail/event_impl.cpp @@ -138,7 +138,7 @@ event_impl::event_impl(RT::PiEvent Event, const context &SyclContext) MHostEvent(false), MIsFlushed(true), MState(HES_Complete) { if (MContext->is_host()) { - throw cl::sycl::invalid_parameter_error( + throw sycl::invalid_parameter_error( "The syclContext must match the OpenCL context associated with the " "clEvent.", PI_ERROR_INVALID_CONTEXT); @@ -149,7 +149,7 @@ event_impl::event_impl(RT::PiEvent Event, const context &SyclContext) sizeof(RT::PiContext), &TempContext, nullptr); if (MContext->getHandleRef() != TempContext) { - throw cl::sycl::invalid_parameter_error( + throw sycl::invalid_parameter_error( "The syclContext must match the OpenCL context associated with the " "clEvent.", PI_ERROR_INVALID_CONTEXT); @@ -223,7 +223,7 @@ void event_impl::instrumentationEpilog(void *TelemetryEvent, #endif } -void event_impl::wait(std::shared_ptr Self) { +void event_impl::wait(std::shared_ptr Self) { if (MState == HES_Discarded) throw sycl::exception(make_error_code(errc::invalid), "wait method cannot be used for a discarded event."); @@ -250,7 +250,7 @@ void event_impl::wait(std::shared_ptr Self) { } void event_impl::wait_and_throw( - std::shared_ptr Self) { + std::shared_ptr Self) { Scheduler &Sched = Scheduler::getInstance(); QueueImplPtr submittedQueue = nullptr; @@ -275,7 +275,7 @@ void event_impl::wait_and_throw( } void event_impl::cleanupCommand( - std::shared_ptr Self) const { + std::shared_ptr Self) const { if (MCommand && !SYCLConfig::get()) detail::Scheduler::getInstance().cleanupFinishedCommands(std::move(Self)); } diff --git a/sycl/source/detail/event_impl.hpp b/sycl/source/detail/event_impl.hpp index 4dec3b7d7b5ab..b55e71bfc0e48 100644 --- a/sycl/source/detail/event_impl.hpp +++ b/sycl/source/detail/event_impl.hpp @@ -27,11 +27,11 @@ class context; namespace detail { class plugin; class context_impl; -using ContextImplPtr = std::shared_ptr; +using ContextImplPtr = std::shared_ptr; class queue_impl; -using QueueImplPtr = std::shared_ptr; +using QueueImplPtr = std::shared_ptr; class event_impl; -using EventImplPtr = std::shared_ptr; +using EventImplPtr = std::shared_ptr; class event_impl { public: @@ -76,7 +76,7 @@ class event_impl { /// Self is needed in order to pass shared_ptr to Scheduler. /// /// \param Self is a pointer to this event. - void wait(std::shared_ptr Self); + void wait(std::shared_ptr Self); /// Waits for the event. /// @@ -86,13 +86,13 @@ class event_impl { /// pass shared_ptr to Scheduler. /// /// \param Self is a pointer to this event. - void wait_and_throw(std::shared_ptr Self); + void wait_and_throw(std::shared_ptr Self); /// Clean up the command associated with the event. Assumes that the task this /// event is associated with has been completed. /// /// \param Self is a pointer to this event. - void cleanupCommand(std::shared_ptr Self) const; + void cleanupCommand(std::shared_ptr Self) const; /// Queries this event for profiling information. /// @@ -264,8 +264,8 @@ class event_impl { std::condition_variable cv; friend std::vector - getOrWaitEvents(std::vector DepEvents, - std::shared_ptr Context); + getOrWaitEvents(std::vector DepEvents, + std::shared_ptr Context); }; } // namespace detail diff --git a/sycl/source/detail/force_device.cpp b/sycl/source/detail/force_device.cpp index 742bc3431d165..a7470c36bf27e 100644 --- a/sycl/source/detail/force_device.cpp +++ b/sycl/source/detail/force_device.cpp @@ -38,9 +38,9 @@ info::device_type get_forced_type() { if (type == "host") { return info::device_type::host; } - throw cl::sycl::runtime_error("SYCL_DEVICE_TYPE is not recognized. Must " - "be GPU, CPU, ACC or HOST.", - PI_ERROR_INVALID_VALUE); + throw sycl::runtime_error("SYCL_DEVICE_TYPE is not recognized. Must " + "be GPU, CPU, ACC or HOST.", + PI_ERROR_INVALID_VALUE); } return info::device_type::all; } diff --git a/sycl/source/detail/helpers.cpp b/sycl/source/detail/helpers.cpp index fea60a2d1579b..e240b9260a621 100644 --- a/sycl/source/detail/helpers.cpp +++ b/sycl/source/detail/helpers.cpp @@ -16,9 +16,9 @@ __SYCL_INLINE_NAMESPACE(cl) { namespace sycl { -using ContextImplPtr = std::shared_ptr; +using ContextImplPtr = std::shared_ptr; namespace detail { -std::vector getOrWaitEvents(std::vector DepEvents, +std::vector getOrWaitEvents(std::vector DepEvents, ContextImplPtr Context) { std::vector Events; for (auto SyclEvent : DepEvents) { @@ -40,7 +40,7 @@ std::vector getOrWaitEvents(std::vector DepEvents, return Events; } -void waitEvents(std::vector DepEvents) { +void waitEvents(std::vector DepEvents) { for (auto SyclEvent : DepEvents) { detail::getSyclObjImpl(SyclEvent)->waitInternal(); } diff --git a/sycl/source/detail/image_accessor_util.cpp b/sycl/source/detail/image_accessor_util.cpp index 8d07b3d1546e7..c3203d36899ca 100644 --- a/sycl/source/detail/image_accessor_util.cpp +++ b/sycl/source/detail/image_accessor_util.cpp @@ -23,12 +23,12 @@ cl_int4 getPixelCoordNearestFiltMode(cl_float4 Coorduvw, switch (SmplAddrMode) { case addressing_mode::mirrored_repeat: { cl_float4 Tempuvw(0); - Tempuvw = 2.0f * cl::sycl::rint(0.5f * Coorduvw); - Tempuvw = cl::sycl::fabs(Coorduvw - Tempuvw); + Tempuvw = 2.0f * sycl::rint(0.5f * Coorduvw); + Tempuvw = sycl::fabs(Coorduvw - Tempuvw); Tempuvw = Tempuvw * (Rangewhd.convert()); - Tempuvw = (cl::sycl::floor(Tempuvw)); + Tempuvw = (sycl::floor(Tempuvw)); Coordijk = Tempuvw.convert(); - Coordijk = cl::sycl::min(Coordijk, (Rangewhd - 1)); + Coordijk = sycl::min(Coordijk, (Rangewhd - 1)); // Eg: // u,v,w = {2.3,1.7,0.5} // normalized coordinates. // w,h,d = {9,9,9} @@ -47,12 +47,10 @@ cl_int4 getPixelCoordNearestFiltMode(cl_float4 Coorduvw, case addressing_mode::repeat: { cl_float4 Tempuvw(0); - Tempuvw = - (Coorduvw - cl::sycl::floor(Coorduvw)) * Rangewhd.convert(); - Coordijk = (cl::sycl::floor(Tempuvw)).convert(); + Tempuvw = (Coorduvw - sycl::floor(Coorduvw)) * Rangewhd.convert(); + Coordijk = (sycl::floor(Tempuvw)).convert(); cl_int4 GreaterThanEqual = (Coordijk >= Rangewhd); - Coordijk = - cl::sycl::select(Coordijk, (Coordijk - Rangewhd), GreaterThanEqual); + Coordijk = sycl::select(Coordijk, (Coordijk - Rangewhd), GreaterThanEqual); // Eg: // u = 2.3; v = 1.5; w = 0.5; // normalized coordinates. // w,h,d = {9,9,9}; @@ -70,15 +68,15 @@ cl_int4 getPixelCoordNearestFiltMode(cl_float4 Coorduvw, // i = 2; j = 4; k = 4; } break; case addressing_mode::clamp_to_edge: - Coordijk = (cl::sycl::floor(Coorduvw)).convert(); - Coordijk = cl::sycl::clamp(Coordijk, cl_int4(0), (Rangewhd - 1)); + Coordijk = (sycl::floor(Coorduvw)).convert(); + Coordijk = sycl::clamp(Coordijk, cl_int4(0), (Rangewhd - 1)); break; case addressing_mode::clamp: - Coordijk = (cl::sycl::floor(Coorduvw)).convert(); - Coordijk = cl::sycl::clamp(Coordijk, cl_int4(-1), Rangewhd); + Coordijk = (sycl::floor(Coorduvw)).convert(); + Coordijk = sycl::clamp(Coordijk, cl_int4(-1), Rangewhd); break; case addressing_mode::none: - Coordijk = (cl::sycl::floor(Coorduvw)).convert(); + Coordijk = (sycl::floor(Coorduvw)).convert(); break; } return Coordijk; @@ -92,49 +90,48 @@ cl_int4 getPixelCoordNearestFiltMode(cl_float4 Coorduvw, // coordinates and multiplication coefficients. cl_int8 getPixelCoordLinearFiltMode(cl_float4 Coorduvw, const addressing_mode SmplAddrMode, - const range<3> ImgRange, cl_float4 &Retabc) { + const range<3> ImgRange, + cl_float4 &Retabc) { cl_int4 Rangewhd(ImgRange[0], ImgRange[1], ImgRange[2], 0); cl_int4 Ci0j0k0(0); cl_int4 Ci1j1k1(0); - cl_int4 Int_uvwsubhalf = cl::sycl::floor(Coorduvw - 0.5f).convert(); + cl_int4 Int_uvwsubhalf = sycl::floor(Coorduvw - 0.5f).convert(); switch (SmplAddrMode) { case addressing_mode::mirrored_repeat: { cl_float4 Temp; - Temp = (cl::sycl::rint(Coorduvw * 0.5f)) * 2.0f; - Temp = cl::sycl::fabs(Coorduvw - Temp); + Temp = (sycl::rint(Coorduvw * 0.5f)) * 2.0f; + Temp = sycl::fabs(Coorduvw - Temp); Coorduvw = Temp * Rangewhd.convert(); - Int_uvwsubhalf = cl::sycl::floor(Coorduvw - 0.5f).convert(); + Int_uvwsubhalf = sycl::floor(Coorduvw - 0.5f).convert(); Ci0j0k0 = Int_uvwsubhalf; Ci1j1k1 = Ci0j0k0 + 1; - Ci0j0k0 = cl::sycl::max(Ci0j0k0, 0); - Ci1j1k1 = cl::sycl::min(Ci1j1k1, (Rangewhd - 1)); + Ci0j0k0 = sycl::max(Ci0j0k0, 0); + Ci1j1k1 = sycl::min(Ci1j1k1, (Rangewhd - 1)); } break; case addressing_mode::repeat: { Coorduvw = - (Coorduvw - cl::sycl::floor(Coorduvw)) * Rangewhd.convert(); - Int_uvwsubhalf = cl::sycl::floor(Coorduvw - 0.5f).convert(); + (Coorduvw - sycl::floor(Coorduvw)) * Rangewhd.convert(); + Int_uvwsubhalf = sycl::floor(Coorduvw - 0.5f).convert(); Ci0j0k0 = Int_uvwsubhalf; Ci1j1k1 = Ci0j0k0 + 1; - Ci0j0k0 = - cl::sycl::select(Ci0j0k0, (Ci0j0k0 + Rangewhd), Ci0j0k0 < cl_int4(0)); - Ci1j1k1 = - cl::sycl::select(Ci1j1k1, (Ci1j1k1 - Rangewhd), Ci1j1k1 >= Rangewhd); + Ci0j0k0 = sycl::select(Ci0j0k0, (Ci0j0k0 + Rangewhd), Ci0j0k0 < cl_int4(0)); + Ci1j1k1 = sycl::select(Ci1j1k1, (Ci1j1k1 - Rangewhd), Ci1j1k1 >= Rangewhd); } break; case addressing_mode::clamp_to_edge: { - Ci0j0k0 = cl::sycl::clamp(Int_uvwsubhalf, cl_int4(0), (Rangewhd - 1)); - Ci1j1k1 = cl::sycl::clamp((Int_uvwsubhalf + 1), cl_int4(0), (Rangewhd - 1)); + Ci0j0k0 = sycl::clamp(Int_uvwsubhalf, cl_int4(0), (Rangewhd - 1)); + Ci1j1k1 = sycl::clamp((Int_uvwsubhalf + 1), cl_int4(0), (Rangewhd - 1)); break; } case addressing_mode::clamp: { - Ci0j0k0 = cl::sycl::clamp(Int_uvwsubhalf, cl_int4(-1), Rangewhd); - Ci1j1k1 = cl::sycl::clamp((Int_uvwsubhalf + 1), cl_int4(-1), Rangewhd); + Ci0j0k0 = sycl::clamp(Int_uvwsubhalf, cl_int4(-1), Rangewhd); + Ci1j1k1 = sycl::clamp((Int_uvwsubhalf + 1), cl_int4(-1), Rangewhd); break; } case addressing_mode::none: { diff --git a/sycl/source/detail/kernel_impl.cpp b/sycl/source/detail/kernel_impl.cpp index 8d981e37f0fd5..5a24b6ab03b3d 100644 --- a/sycl/source/detail/kernel_impl.cpp +++ b/sycl/source/detail/kernel_impl.cpp @@ -48,7 +48,7 @@ kernel_impl::kernel_impl(RT::PiKernel Kernel, ContextImplPtr ContextImpl, getPlugin().call( MKernel, PI_KERNEL_INFO_CONTEXT, sizeof(Context), &Context, nullptr); if (ContextImpl->getHandleRef() != Context) - throw cl::sycl::invalid_parameter_error( + throw sycl::invalid_parameter_error( "Input context must be the same as the context of cl_kernel", PI_ERROR_INVALID_CONTEXT); diff --git a/sycl/source/detail/kernel_info.hpp b/sycl/source/detail/kernel_info.hpp index ad13edd693fd8..57eccb0be804e 100644 --- a/sycl/source/detail/kernel_info.hpp +++ b/sycl/source/detail/kernel_info.hpp @@ -94,69 +94,66 @@ struct get_kernel_device_specific_info { }; template -struct get_kernel_device_specific_info, Param> { - static cl::sycl::range<3> get(RT::PiKernel Kernel, RT::PiDevice Device, - const plugin &Plugin) { +struct get_kernel_device_specific_info, Param> { + static sycl::range<3> get(RT::PiKernel Kernel, RT::PiDevice Device, + const plugin &Plugin) { size_t Result[3]; // TODO catch an exception and put it to list of asynchronous exceptions Plugin.call( Kernel, Device, pi::cast(Param), sizeof(size_t) * 3, Result, nullptr); - return cl::sycl::range<3>(Result[0], Result[1], Result[2]); + return sycl::range<3>(Result[0], Result[1], Result[2]); } }; template inline typename info::param_traits::return_type -get_kernel_device_specific_info_host(const cl::sycl::device &Device); +get_kernel_device_specific_info_host(const sycl::device &Device); template <> -inline cl::sycl::range<3> get_kernel_device_specific_info_host< - info::kernel_device_specific::global_work_size>(const cl::sycl::device &) { +inline sycl::range<3> get_kernel_device_specific_info_host< + info::kernel_device_specific::global_work_size>(const sycl::device &) { throw invalid_object_error("This instance of kernel is a host instance", PI_ERROR_INVALID_KERNEL); } template <> inline size_t get_kernel_device_specific_info_host< - info::kernel_device_specific::work_group_size>( - const cl::sycl::device &Dev) { + info::kernel_device_specific::work_group_size>(const sycl::device &Dev) { return Dev.get_info(); } template <> -inline cl::sycl::range<3> get_kernel_device_specific_info_host< +inline sycl::range<3> get_kernel_device_specific_info_host< info::kernel_device_specific::compile_work_group_size>( - const cl::sycl::device &) { + const sycl::device &) { return {0, 0, 0}; } template <> inline size_t get_kernel_device_specific_info_host< info::kernel_device_specific::preferred_work_group_size_multiple>( - const cl::sycl::device &Dev) { + const sycl::device &Dev) { return get_kernel_device_specific_info_host< info::kernel_device_specific::work_group_size>(Dev); } template <> inline size_t get_kernel_device_specific_info_host< - info::kernel_device_specific::private_mem_size>(const cl::sycl::device &) { + info::kernel_device_specific::private_mem_size>(const sycl::device &) { return 0; } template <> inline uint32_t get_kernel_device_specific_info_host< - info::kernel_device_specific::ext_codeplay_num_regs>( - const cl::sycl::device &) { + info::kernel_device_specific::ext_codeplay_num_regs>(const sycl::device &) { return 0; } template <> inline uint32_t get_kernel_device_specific_info_host< - info::kernel_device_specific::max_num_sub_groups>( - const cl::sycl::device &) { + info::kernel_device_specific::max_num_sub_groups>(const sycl::device &) { throw invalid_object_error("This instance of kernel is a host instance", PI_ERROR_INVALID_KERNEL); } @@ -164,7 +161,7 @@ inline uint32_t get_kernel_device_specific_info_host< template <> inline uint32_t get_kernel_device_specific_info_host< info::kernel_device_specific::compile_num_sub_groups>( - const cl::sycl::device &) { + const sycl::device &) { throw invalid_object_error("This instance of kernel is a host instance", PI_ERROR_INVALID_KERNEL); } @@ -172,7 +169,7 @@ inline uint32_t get_kernel_device_specific_info_host< template <> inline uint32_t get_kernel_device_specific_info_host< info::kernel_device_specific::compile_sub_group_size>( - const cl::sycl::device &) { + const sycl::device &) { throw invalid_object_error("This instance of kernel is a host instance", PI_ERROR_INVALID_KERNEL); } @@ -180,7 +177,7 @@ inline uint32_t get_kernel_device_specific_info_host< template struct get_kernel_device_specific_info_with_input { static uint32_t get(RT::PiKernel Kernel, RT::PiDevice Device, - cl::sycl::range<3> In, const plugin &Plugin) { + sycl::range<3> In, const plugin &Plugin) { size_t Input[3] = {In[0], In[1], In[2]}; uint32_t Result; // TODO catch an exception and put it to list of asynchronous exceptions diff --git a/sycl/source/detail/pi.cpp b/sycl/source/detail/pi.cpp index 71cf9a53421b0..fdc1f5d6d52e7 100644 --- a/sycl/source/detail/pi.cpp +++ b/sycl/source/detail/pi.cpp @@ -61,20 +61,18 @@ constexpr uint32_t GMinVer = __LIBSYCL_MINOR_VERSION; constexpr const char *GVerStr = SYCL_VERSION_STR; #endif // XPTI_ENABLE_INSTRUMENTATION -template -void *getPluginOpaqueData(void *OpaqueDataParam) { +template void *getPluginOpaqueData(void *OpaqueDataParam) { void *ReturnOpaqueData = nullptr; - const cl::sycl::detail::plugin &Plugin = - cl::sycl::detail::pi::getPlugin(); + const sycl::detail::plugin &Plugin = sycl::detail::pi::getPlugin(); - Plugin.call( + Plugin.call( OpaqueDataParam, &ReturnOpaqueData); return ReturnOpaqueData; } template __SYCL_EXPORT void * -getPluginOpaqueData(void *); +getPluginOpaqueData(void *); namespace pi { @@ -180,7 +178,7 @@ void emitFunctionWithArgsEndTrace(uint64_t CorrelationID, uint32_t FuncID, #endif } -void contextSetExtendedDeleter(const cl::sycl::context &context, +void contextSetExtendedDeleter(const sycl::context &context, pi_context_extended_deleter func, void *user_data) { auto impl = getSyclObjImpl(context); @@ -204,7 +202,7 @@ std::string platformInfoToString(pi_platform_info info) { return "PI_PLATFORM_INFO_EXTENSIONS"; } die("Unknown pi_platform_info value passed to " - "cl::sycl::detail::pi::platformInfoToString"); + "sycl::detail::pi::platformInfoToString"); } std::string memFlagToString(pi_mem_flags Flag) { diff --git a/sycl/source/detail/plugin.hpp b/sycl/source/detail/plugin.hpp index c8a21dee24297..c316a31b1b73d 100644 --- a/sycl/source/detail/plugin.hpp +++ b/sycl/source/detail/plugin.hpp @@ -112,7 +112,7 @@ class plugin { /// Checks return value from PI calls. /// /// \throw Exception if pi_result is not a PI_SUCCESS. - template + template void checkPiResult(RT::PiResult pi_result) const { char *message = nullptr; if (pi_result == PI_ERROR_PLUGIN_SPECIFIC_ERROR) { @@ -148,10 +148,10 @@ class plugin { void reportPiError(RT::PiResult pi_result, const char *context) const { if (pi_result != PI_SUCCESS) { - throw cl::sycl::runtime_error( - std::string(context) + " API failed with error: " + - cl::sycl::detail::codeToString(pi_result), - pi_result); + throw sycl::runtime_error(std::string(context) + + " API failed with error: " + + sycl::detail::codeToString(pi_result), + pi_result); } } @@ -212,7 +212,7 @@ class plugin { /// Calls the API, traces the call, checks the result /// - /// \throw cl::sycl::runtime_exception if the call was not successful. + /// \throw sycl::runtime_exception if the call was not successful. template void call(ArgsT... Args) const { RT::PiResult Err = call_nocheck(Args...); diff --git a/sycl/source/detail/program_impl.cpp b/sycl/source/detail/program_impl.cpp index 980ee4c4c7089..329b585fe02a0 100644 --- a/sycl/source/detail/program_impl.cpp +++ b/sycl/source/detail/program_impl.cpp @@ -530,7 +530,7 @@ std::vector program_impl::get_info() const { void program_impl::set_spec_constant_impl(const char *Name, const void *ValAddr, size_t ValSize) { if (MState != program_state::none) - throw cl::sycl::ext::oneapi::experimental::spec_const_error( + throw sycl::ext::oneapi::experimental::spec_const_error( "Invalid program state", PI_ERROR_INVALID_PROGRAM); // Reuse cached programs lock as opposed to introducing a new lock. auto LockGuard = MContext->getKernelProgramCache().acquireCachedPrograms(); diff --git a/sycl/source/detail/program_manager/program_manager.cpp b/sycl/source/detail/program_manager/program_manager.cpp index 5106cc744a08a..98e98767cc0ca 100644 --- a/sycl/source/detail/program_manager/program_manager.cpp +++ b/sycl/source/detail/program_manager/program_manager.cpp @@ -41,7 +41,7 @@ __SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { -using ContextImplPtr = std::shared_ptr; +using ContextImplPtr = std::shared_ptr; static constexpr int DbgProgMgr = 0; @@ -2050,7 +2050,7 @@ std::pair ProgramManager::getOrCreateKernel( } // __SYCL_INLINE_NAMESPACE(cl) extern "C" void __sycl_register_lib(pi_device_binaries desc) { - cl::sycl::detail::ProgramManager::getInstance().addImages(desc); + sycl::detail::ProgramManager::getInstance().addImages(desc); } // Executed as a part of current module's (.exe, .dll) static initialization diff --git a/sycl/source/detail/reduction.cpp b/sycl/source/detail/reduction.cpp index 508600b796e83..1cfa650313261 100644 --- a/sycl/source/detail/reduction.cpp +++ b/sycl/source/detail/reduction.cpp @@ -115,21 +115,20 @@ reduGetMaxWGSize(std::shared_ptr Queue, } // namespace ext namespace __SYCL2020_DEPRECATED("use 'ext::oneapi' instead") ONEAPI { - using namespace ext::oneapi; - namespace detail { - __SYCL_EXPORT size_t reduComputeWGSize(size_t NWorkItems, size_t MaxWGSize, - size_t &NWorkGroups) { - return ext::oneapi::detail::reduComputeWGSize(NWorkItems, MaxWGSize, - NWorkGroups); - } +using namespace ext::oneapi; +namespace detail { +__SYCL_EXPORT size_t reduComputeWGSize(size_t NWorkItems, size_t MaxWGSize, + size_t &NWorkGroups) { + return ext::oneapi::detail::reduComputeWGSize(NWorkItems, MaxWGSize, + NWorkGroups); +} - __SYCL_EXPORT size_t - reduGetMaxWGSize(std::shared_ptr Queue, - size_t LocalMemBytesPerWorkItem) { - return ext::oneapi::detail::reduGetMaxWGSize(Queue, - LocalMemBytesPerWorkItem); - } - } // namespace detail -} // namespace ONEAPI +__SYCL_EXPORT size_t +reduGetMaxWGSize(std::shared_ptr Queue, + size_t LocalMemBytesPerWorkItem) { + return ext::oneapi::detail::reduGetMaxWGSize(Queue, LocalMemBytesPerWorkItem); +} +} // namespace detail +} // namespace __SYCL2020_DEPRECATED("use 'ext::oneapi' instead")ONEAPI } // namespace sycl } // __SYCL_INLINE_NAMESPACE(cl) diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index 98eaa72a08e8c..8c35ec397a603 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -1946,8 +1946,7 @@ static void adjustNDRangePerKernel(NDRDescT &NDR, RT::PiKernel Kernel, // TODO might be good to cache this info together with the kernel info to // avoid get_kernel_work_group_info on every kernel run range<3> WGSize = get_kernel_device_specific_info< - range<3>, - cl::sycl::info::kernel_device_specific::compile_work_group_size>:: + range<3>, sycl::info::kernel_device_specific::compile_work_group_size>:: get(Kernel, DeviceImpl.getHandleRef(), DeviceImpl.getPlugin()); if (WGSize[0] == 0) { @@ -2024,7 +2023,7 @@ static pi_result SetKernelParamsAndLaunch( } case kernel_param_kind_t::kind_specialization_constants_buffer: { if (Queue->is_host()) { - throw cl::sycl::feature_not_supported( + throw sycl::feature_not_supported( "SYCL2020 specialization constants are not yet supported on host " "device", PI_ERROR_INVALID_OPERATION); @@ -2350,13 +2349,13 @@ pi_int32 ExecCGCommand::enqueueImp() { switch (Error) { case PI_ERROR_INVALID_OPERATION: - throw cl::sycl::runtime_error( + throw sycl::runtime_error( "Device doesn't support run_on_host_intel tasks.", Error); case PI_SUCCESS: return Error; default: - throw cl::sycl::runtime_error( - "Enqueueing run_on_host_intel task has failed.", Error); + throw sycl::runtime_error("Enqueueing run_on_host_intel task has failed.", + Error); } } case CG::CGTYPE::Kernel: { diff --git a/sycl/source/detail/scheduler/leaves_collection.cpp b/sycl/source/detail/scheduler/leaves_collection.cpp index 0ae0bcfbb9c0e..90c1df8b619e5 100644 --- a/sycl/source/detail/scheduler/leaves_collection.cpp +++ b/sycl/source/detail/scheduler/leaves_collection.cpp @@ -81,7 +81,7 @@ bool LeavesCollection::addHostAccessorCommand(EmptyCommand *Cmd, // HACK we believe here that read accessors never overlap as it doesn't add // any real dependency (e.g. data copy to device) except for blocking. - if (Cmd->getRequirement()->MAccessMode == cl::sycl::access::mode::read) + if (Cmd->getRequirement()->MAccessMode == sycl::access::mode::read) OldCmdIt = MHostAccessorCommands.end(); else OldCmdIt = std::find_if( diff --git a/sycl/source/detail/scheduler/scheduler.hpp b/sycl/source/detail/scheduler/scheduler.hpp index 928b41354c065..657db109b5f18 100644 --- a/sycl/source/detail/scheduler/scheduler.hpp +++ b/sycl/source/detail/scheduler/scheduler.hpp @@ -64,8 +64,8 @@ /// \code{.cpp} /// { /// // Creating SYCL CPU and GPU queues -/// cl::sycl::queue CPU_Queue = ...; -/// cl::sycl::queue GPU_Queue = ...; +/// sycl::queue CPU_Queue = ...; +/// sycl::queue GPU_Queue = ...; /// /// // Creating 3 SYCL buffers /// auto BufferA = ...; // Buffer is initialized with host memory. @@ -514,7 +514,7 @@ class Scheduler { /// (assuming that all its commands have been waited for). void cleanupFinishedCommands( Command *FinishedCmd, - std::vector> &, + std::vector> &, std::vector> &); /// Reschedules the command passed using Queue provided. @@ -541,7 +541,7 @@ class Scheduler { /// Removes commands that use the given MemObjRecord from the graph. void cleanupCommandsForRecord( MemObjRecord *Record, - std::vector> &, + std::vector> &, std::vector> &); /// Removes the MemObjRecord for the memory object passed. diff --git a/sycl/source/detail/stream_impl.cpp b/sycl/source/detail/stream_impl.cpp index d317d8aadb3e6..fdb6137d6d5e4 100644 --- a/sycl/source/detail/stream_impl.cpp +++ b/sycl/source/detail/stream_impl.cpp @@ -41,7 +41,7 @@ stream_impl::stream_impl(size_t BufferSize, size_t MaxStatementSize, GlobalBufAccessorT stream_impl::accessGlobalBuf(handler &CGH) { return detail::Scheduler::getInstance() .StreamBuffersPool.find(this) - ->second->Buf.get_access( + ->second->Buf.get_access( CGH, range<1>(BufferSize_), id<1>(OffsetSize)); } @@ -49,7 +49,7 @@ GlobalBufAccessorT stream_impl::accessGlobalBuf(handler &CGH) { GlobalBufAccessorT stream_impl::accessGlobalFlushBuf(handler &CGH) { return detail::Scheduler::getInstance() .StreamBuffersPool.find(this) - ->second->FlushBuf.get_access( + ->second->FlushBuf.get_access( CGH, range<1>(MaxStatementSize_ + FLUSH_BUF_OFFSET_SIZE), id<1>(0)); } @@ -61,7 +61,7 @@ GlobalOffsetAccessorT stream_impl::accessGlobalOffset(handler &CGH) { ->second->Buf, id<1>(0), range<1>(OffsetSize)); auto ReinterpretedBuf = OffsetSubBuf.reinterpret(range<1>(2)); - return ReinterpretedBuf.get_access( + return ReinterpretedBuf.get_access( CGH, range<1>(2), id<1>(0)); } size_t stream_impl::get_size() const { return BufferSize_; } @@ -73,7 +73,7 @@ void stream_impl::flush() { // host task to print stream buffer. It will fire up as soon as the kernel // finishes execution. auto Q = detail::createSyclObjFromImpl( - cl::sycl::detail::Scheduler::getInstance().getDefaultHostQueue()); + sycl::detail::Scheduler::getInstance().getDefaultHostQueue()); Q.submit([&](handler &cgh) { auto BufHostAcc = detail::Scheduler::getInstance() diff --git a/sycl/source/detail/sycl_mem_obj_t.cpp b/sycl/source/detail/sycl_mem_obj_t.cpp index cac139faccaed..395b82e04b5d8 100644 --- a/sycl/source/detail/sycl_mem_obj_t.cpp +++ b/sycl/source/detail/sycl_mem_obj_t.cpp @@ -38,7 +38,7 @@ SYCLMemObjT::SYCLMemObjT(pi_native_handle MemObject, const context &SyclContext, MUserPtr(nullptr), MShadowCopy(nullptr), MUploadDataFunctor(nullptr), MSharedPtrStorage(nullptr) { if (MInteropContext->is_host()) - throw cl::sycl::invalid_parameter_error( + throw sycl::invalid_parameter_error( "Creation of interoperability memory object using host context is " "not allowed", PI_ERROR_INVALID_CONTEXT); @@ -58,7 +58,7 @@ SYCLMemObjT::SYCLMemObjT(pi_native_handle MemObject, const context &SyclContext, sizeof(Context), &Context, nullptr); if (MInteropContext->getHandleRef() != Context) - throw cl::sycl::invalid_parameter_error( + throw sycl::invalid_parameter_error( "Input context must be the same as the context of cl_mem", PI_ERROR_INVALID_CONTEXT); diff --git a/sycl/source/detail/usm/usm_impl.cpp b/sycl/source/detail/usm/usm_impl.cpp index b642d45c50395..4b2237b51e037 100644 --- a/sycl/source/detail/usm/usm_impl.cpp +++ b/sycl/source/detail/usm/usm_impl.cpp @@ -40,7 +40,7 @@ __SYCL_INLINE_NAMESPACE(cl) { namespace sycl { -using alloc = cl::sycl::usm::alloc; +using alloc = sycl::usm::alloc; namespace detail { namespace usm { @@ -76,13 +76,13 @@ void *alignedAllocHost(size_t Alignment, size_t Size, const context &Ctxt, std::array Props; auto PropsIter = Props.begin(); - if (PropList.has_property() && + if (PropList.has_property() && Ctxt.get_platform().has_extension( "cl_intel_mem_alloc_buffer_location")) { *PropsIter++ = PI_MEM_USM_ALLOC_BUFFER_LOCATION; *PropsIter++ = PropList - .get_property() .get_buffer_location(); } @@ -153,12 +153,12 @@ void *alignedAlloc(size_t Alignment, size_t Size, const context &Ctxt, auto PropsIter = Props.begin(); // Buffer location is only supported on FPGA devices - if (PropList.has_property() && + if (PropList.has_property() && Dev.has_extension("cl_intel_mem_alloc_buffer_location")) { *PropsIter++ = PI_MEM_USM_ALLOC_BUFFER_LOCATION; *PropsIter++ = PropList - .get_property() .get_buffer_location(); } @@ -178,17 +178,17 @@ void *alignedAlloc(size_t Alignment, size_t Size, const context &Ctxt, auto PropsIter = Props.begin(); if (PropList.has_property< - cl::sycl::ext::oneapi::property::usm::device_read_only>()) { + sycl::ext::oneapi::property::usm::device_read_only>()) { *PropsIter++ = PI_MEM_ALLOC_FLAGS; *PropsIter++ = PI_MEM_ALLOC_DEVICE_READ_ONLY; } - if (PropList.has_property() && + if (PropList.has_property() && Dev.has_extension("cl_intel_mem_alloc_buffer_location")) { *PropsIter++ = PI_MEM_USM_ALLOC_BUFFER_LOCATION; *PropsIter++ = PropList - .get_property() .get_buffer_location(); } diff --git a/sycl/source/device.cpp b/sycl/source/device.cpp index 02e2de97e6373..8796cf84e6741 100644 --- a/sycl/source/device.cpp +++ b/sycl/source/device.cpp @@ -23,8 +23,8 @@ void force_type(info::device_type &t, const info::device_type &ft) { if (t == info::device_type::all) { t = ft; } else if (ft != info::device_type::all && t != ft) { - throw cl::sycl::invalid_parameter_error("No device of forced type.", - PI_ERROR_INVALID_OPERATION); + throw sycl::invalid_parameter_error("No device of forced type.", + PI_ERROR_INVALID_OPERATION); } } } // namespace detail diff --git a/sycl/source/device_selector.cpp b/sycl/source/device_selector.cpp index 90ebe93c3bafa..f0e1b99f22214 100644 --- a/sycl/source/device_selector.cpp +++ b/sycl/source/device_selector.cpp @@ -38,7 +38,7 @@ static int getDevicePreference(const device &Device) { return Score; // Strongly prefer devices with available images. - auto &program_manager = cl::sycl::detail::ProgramManager::getInstance(); + auto &program_manager = sycl::detail::ProgramManager::getInstance(); if (program_manager.hasCompatibleImage(Device)) Score += 1000; @@ -103,8 +103,8 @@ device device_selector::select_device() const { return *res; } - throw cl::sycl::runtime_error("No device of requested type available.", - PI_ERROR_DEVICE_NOT_FOUND); + throw sycl::runtime_error("No device of requested type available.", + PI_ERROR_DEVICE_NOT_FOUND); } /// Devices of different kinds are prioritized in the following order: diff --git a/sycl/source/esimd_emulator_device_interface.cpp b/sycl/source/esimd_emulator_device_interface.cpp index 2952c85c9ec87..2d3332d7579ef 100644 --- a/sycl/source/esimd_emulator_device_interface.cpp +++ b/sycl/source/esimd_emulator_device_interface.cpp @@ -30,13 +30,12 @@ __SYCL_EXPORT ESIMDDeviceInterface *getESIMDDeviceInterface() { try { PIOpaqueData = - getPluginOpaqueData( - nullptr); + getPluginOpaqueData(nullptr); } catch (...) { std::cerr << "ESIMD EMU plugin error or not loaded - try setting " "SYCL_DEVICE_FILTER=esimd_emulator:gpu environment variable" << std::endl; - throw cl::sycl::feature_not_supported(); + throw sycl::feature_not_supported(); } ESIMDEmuPluginOpaqueData *OpaqueData = diff --git a/sycl/source/function_pointer.cpp b/sycl/source/function_pointer.cpp index 3af7cc66e51d2..34e8cb674ec93 100644 --- a/sycl/source/function_pointer.cpp +++ b/sycl/source/function_pointer.cpp @@ -19,7 +19,7 @@ getDeviceFunctionPointerImpl(device &D, program &P, const char *FuncName) { const detail::plugin &Plugin = detail::getSyclObjImpl(P)->getPlugin(); pi_result Result = Plugin.call_nocheck< - cl::sycl::detail::PiApiKind::piextGetDeviceFunctionPointer>( + sycl::detail::PiApiKind::piextGetDeviceFunctionPointer>( detail::pi::cast(detail::getSyclObjImpl(D)->getHandleRef()), detail::pi::cast(detail::getSyclObjImpl(P)->getHandleRef()), FuncName, &FPtr); diff --git a/sycl/source/handler.cpp b/sycl/source/handler.cpp index 92abfbd64fe1d..1e9617ffae8d4 100644 --- a/sycl/source/handler.cpp +++ b/sycl/source/handler.cpp @@ -387,8 +387,7 @@ event handler::finalize() { if (detail::pi::trace(detail::pi::TraceLevel::PI_TRACE_ALL)) { std::cout << "WARNING: An empty command group is submitted." << std::endl; } - detail::EventImplPtr Event = - std::make_shared(); + detail::EventImplPtr Event = std::make_shared(); MLastEvent = detail::createSyclObjFromImpl(Event); return MLastEvent; } @@ -576,8 +575,8 @@ void handler::processArg(void *Ptr, const detail::kernel_param_kind_t &Kind, } case access::target::host_image: case access::target::host_buffer: { - throw cl::sycl::invalid_parameter_error( - "Unsupported accessor target case.", PI_ERROR_INVALID_OPERATION); + throw sycl::invalid_parameter_error("Unsupported accessor target case.", + PI_ERROR_INVALID_OPERATION); break; } } diff --git a/sycl/source/spirv_ops.cpp b/sycl/source/spirv_ops.cpp index df78b95f6a45c..a635dea89d955 100644 --- a/sycl/source/spirv_ops.cpp +++ b/sycl/source/spirv_ops.cpp @@ -46,5 +46,5 @@ __SYCL_EXPORT void __spirv_MemoryBarrier(__spv::Scope Memory, __SYCL_EXPORT void __spirv_ocl_prefetch(const char *Ptr, size_t NumBytes) noexcept { - cl::sycl::detail::PlatformUtil::prefetch(Ptr, NumBytes); + sycl::detail::PlatformUtil::prefetch(Ptr, NumBytes); } diff --git a/sycl/test/abi/layout_accessors_device.cpp b/sycl/test/abi/layout_accessors_device.cpp index 0519a7bedb040..22687902ad94d 100644 --- a/sycl/test/abi/layout_accessors_device.cpp +++ b/sycl/test/abi/layout_accessors_device.cpp @@ -6,7 +6,7 @@ #include -using namespace cl::sycl; +using namespace sycl; //----------------------------------------------------------------------------// // Global buffer accessor. diff --git a/sycl/test/abi/layout_accessors_host.cpp b/sycl/test/abi/layout_accessors_host.cpp index 2110cd565cccf..1461e6a68a13c 100644 --- a/sycl/test/abi/layout_accessors_host.cpp +++ b/sycl/test/abi/layout_accessors_host.cpp @@ -6,7 +6,7 @@ #include -using namespace cl::sycl; +using namespace sycl; // CHECK: 0 | class sycl::detail::AccessorImplHost // CHECK-NEXT: 0 | class sycl::id<3> MOffset diff --git a/sycl/test/abi/symbol_size_alignment.cpp b/sycl/test/abi/symbol_size_alignment.cpp index 26e50df0d09ff..da25385ad1aa2 100644 --- a/sycl/test/abi/symbol_size_alignment.cpp +++ b/sycl/test/abi/symbol_size_alignment.cpp @@ -24,7 +24,7 @@ #include #include -using namespace cl::sycl; +using namespace sycl; template void check_size() { static_assert(newSize == oldSize, "Symbol size has changed."); diff --git a/sycl/test/basic_tests/accessor/addrspace_exposure.cpp b/sycl/test/basic_tests/accessor/addrspace_exposure.cpp index 4f2be337a71a1..073af07c4619b 100644 --- a/sycl/test/basic_tests/accessor/addrspace_exposure.cpp +++ b/sycl/test/basic_tests/accessor/addrspace_exposure.cpp @@ -11,10 +11,10 @@ #include // This test checks that concrete address spaces are not exposed in device code -using namespace cl::sycl; +using namespace sycl; -using cl::sycl::access::mode; -using cl::sycl::access::target; +using sycl::access::mode; +using sycl::access::target; int main() { range<1> Range(1); diff --git a/sycl/test/basic_tests/address_space_traits.cpp b/sycl/test/basic_tests/address_space_traits.cpp index 5aa7b60a8754d..c00d6ee619590 100644 --- a/sycl/test/basic_tests/address_space_traits.cpp +++ b/sycl/test/basic_tests/address_space_traits.cpp @@ -3,7 +3,7 @@ #include #include -using namespace cl::sycl; +using namespace sycl; int main() { queue myQueue; diff --git a/sycl/test/basic_tests/aliases.cpp b/sycl/test/basic_tests/aliases.cpp index e9f168c7fcba1..ebd499efa995e 100644 --- a/sycl/test/basic_tests/aliases.cpp +++ b/sycl/test/basic_tests/aliases.cpp @@ -12,7 +12,7 @@ #include using std::is_same; -namespace s = cl::sycl; +namespace s = sycl; // Test to verify requirements from 4.10.2.2 Aliases diff --git a/sycl/test/basic_tests/buffer/buffer_ctad.cpp b/sycl/test/basic_tests/buffer/buffer_ctad.cpp index a0c6038ad226c..7239190a80e22 100644 --- a/sycl/test/basic_tests/buffer/buffer_ctad.cpp +++ b/sycl/test/basic_tests/buffer/buffer_ctad.cpp @@ -5,7 +5,7 @@ #include #include -using namespace cl::sycl; +using namespace sycl; int main() { std::vector v(5, 1); diff --git a/sycl/test/basic_tests/built-ins.cpp b/sycl/test/basic_tests/built-ins.cpp index b3d3d6437963d..9b13464678e51 100644 --- a/sycl/test/basic_tests/built-ins.cpp +++ b/sycl/test/basic_tests/built-ins.cpp @@ -11,7 +11,7 @@ #include -namespace s = cl::sycl; +namespace s = sycl; // According to OpenCL C spec, the format string must be in constant address // space diff --git a/sycl/test/basic_tests/context.cpp b/sycl/test/basic_tests/context.cpp index 913fd52e4a8d1..38b8dcbab5d1f 100644 --- a/sycl/test/basic_tests/context.cpp +++ b/sycl/test/basic_tests/context.cpp @@ -6,7 +6,7 @@ #include #include -using namespace cl::sycl; +using namespace sycl; int main() { try { diff --git a/sycl/test/basic_tests/device.cpp b/sycl/test/basic_tests/device.cpp index 46f4b61ee7888..b313fcf8c173c 100644 --- a/sycl/test/basic_tests/device.cpp +++ b/sycl/test/basic_tests/device.cpp @@ -8,7 +8,7 @@ #include #include -using namespace cl::sycl; +using namespace sycl; std::string get_type(const device &dev) { if (dev.is_host()) { diff --git a/sycl/test/basic_tests/event_async_exception.cpp b/sycl/test/basic_tests/event_async_exception.cpp index fd1605346743e..5064952341261 100644 --- a/sycl/test/basic_tests/event_async_exception.cpp +++ b/sycl/test/basic_tests/event_async_exception.cpp @@ -14,7 +14,7 @@ // This test checks that if there is a submit failure, the asynchronous // exception is associated with the returned event. -using namespace cl::sycl; +using namespace sycl; class KernelName; diff --git a/sycl/test/basic_tests/exceptions-SYCL-2020.cpp b/sycl/test/basic_tests/exceptions-SYCL-2020.cpp index 23244f812ee0b..6821fde06eefd 100644 --- a/sycl/test/basic_tests/exceptions-SYCL-2020.cpp +++ b/sycl/test/basic_tests/exceptions-SYCL-2020.cpp @@ -3,7 +3,7 @@ #include -using namespace cl::sycl; +using namespace sycl; int main() { // Test new constructors, initially each with empty string messages. diff --git a/sycl/test/basic_tests/generic_type_traits.cpp b/sycl/test/basic_tests/generic_type_traits.cpp index 8fc72d90ad797..7fd86d67924cc 100644 --- a/sycl/test/basic_tests/generic_type_traits.cpp +++ b/sycl/test/basic_tests/generic_type_traits.cpp @@ -6,8 +6,8 @@ #include #include -namespace s = cl::sycl; -namespace d = cl::sycl::detail; +namespace s = sycl; +namespace d = sycl::detail; using i_t = int; using f_t = float; diff --git a/sycl/test/basic_tests/group.cpp b/sycl/test/basic_tests/group.cpp index bb5209a18caac..06872cbfc2d2f 100644 --- a/sycl/test/basic_tests/group.cpp +++ b/sycl/test/basic_tests/group.cpp @@ -13,19 +13,19 @@ #include using namespace std; -using cl::sycl::detail::Builder; +using sycl::detail::Builder; int main() { - cl::sycl::group<1> one = Builder::createGroup<1>({8}, {4}, {1}); + sycl::group<1> one = Builder::createGroup<1>({8}, {4}, {1}); // one dimension group - cl::sycl::group<1> one_dim = Builder::createGroup<1>({8}, {4}, {1}); - assert(one_dim.get_id() == cl::sycl::id<1>{1}); + sycl::group<1> one_dim = Builder::createGroup<1>({8}, {4}, {1}); + assert(one_dim.get_id() == sycl::id<1>{1}); assert(one_dim.get_id(0) == 1); - assert((one_dim.get_global_range() == cl::sycl::range<1>{8})); + assert((one_dim.get_global_range() == sycl::range<1>{8})); assert(one_dim.get_global_range(0) == 8); - assert((one_dim.get_local_range() == cl::sycl::range<1>{4})); + assert((one_dim.get_local_range() == sycl::range<1>{4})); assert(one_dim.get_local_range(0) == 4); - assert((one_dim.get_group_range() == cl::sycl::range<1>{2})); + assert((one_dim.get_group_range() == sycl::range<1>{2})); assert(one_dim.get_group_range(0) == 2); assert(one_dim[0] == 1); assert(one_dim.get_linear_id() == 1); @@ -35,27 +35,27 @@ int main() { one_dim.get_local_id(); assert(one_dim.get_local_id(0) == one_dim.get_local_id()[0]); assert(0); // get_local_id() is not implemented on host device - } catch (cl::sycl::runtime_error) { + } catch (sycl::runtime_error) { } try { one_dim.get_local_linear_id(); assert(0); // get_local_id() is not implemented on host device - } catch (cl::sycl::runtime_error) { + } catch (sycl::runtime_error) { } // two dimension group - cl::sycl::group<2> two_dim = Builder::createGroup<2>({8, 4}, {4, 2}, {1, 1}); - assert((two_dim.get_id() == cl::sycl::id<2>{1, 1})); + sycl::group<2> two_dim = Builder::createGroup<2>({8, 4}, {4, 2}, {1, 1}); + assert((two_dim.get_id() == sycl::id<2>{1, 1})); assert(two_dim.get_id(0) == 1); assert(two_dim.get_id(1) == 1); - assert((two_dim.get_global_range() == cl::sycl::range<2>{8, 4})); + assert((two_dim.get_global_range() == sycl::range<2>{8, 4})); assert(two_dim.get_global_range(0) == 8); assert(two_dim.get_global_range(1) == 4); - assert((two_dim.get_local_range() == cl::sycl::range<2>{4, 2})); + assert((two_dim.get_local_range() == sycl::range<2>{4, 2})); assert(two_dim.get_local_range(0) == 4); assert(two_dim.get_local_range(1) == 2); - assert((two_dim.get_group_range() == cl::sycl::range<2>{2, 2})); + assert((two_dim.get_group_range() == sycl::range<2>{2, 2})); assert(two_dim.get_group_range(0) == 2); assert(two_dim.get_group_range(1) == 2); assert(two_dim[0] == 1); @@ -68,31 +68,31 @@ int main() { assert(two_dim.get_local_id(0) == two_dim.get_local_id()[0]); assert(two_dim.get_local_id(1) == two_dim.get_local_id()[1]); assert(0); // get_local_id() is not implemented on host device - } catch (cl::sycl::runtime_error) { + } catch (sycl::runtime_error) { } try { two_dim.get_local_linear_id(); assert(0); // get_local_id() is not implemented on host device - } catch (cl::sycl::runtime_error) { + } catch (sycl::runtime_error) { } // three dimension group - cl::sycl::group<3> three_dim = + sycl::group<3> three_dim = Builder::createGroup<3>({16, 8, 4}, {8, 4, 2}, {1, 1, 1}); - assert((three_dim.get_id() == cl::sycl::id<3>{1, 1, 1})); + assert((three_dim.get_id() == sycl::id<3>{1, 1, 1})); assert(three_dim.get_id(0) == 1); assert(three_dim.get_id(1) == 1); assert(three_dim.get_id(2) == 1); - assert((three_dim.get_global_range() == cl::sycl::range<3>{16, 8, 4})); + assert((three_dim.get_global_range() == sycl::range<3>{16, 8, 4})); assert(three_dim.get_global_range(0) == 16); assert(three_dim.get_global_range(1) == 8); assert(three_dim.get_global_range(2) == 4); - assert((three_dim.get_local_range() == cl::sycl::range<3>{8, 4, 2})); + assert((three_dim.get_local_range() == sycl::range<3>{8, 4, 2})); assert(three_dim.get_local_range(0) == 8); assert(three_dim.get_local_range(1) == 4); assert(three_dim.get_local_range(2) == 2); - assert((three_dim.get_group_range() == cl::sycl::range<3>{2, 2, 2})); + assert((three_dim.get_group_range() == sycl::range<3>{2, 2, 2})); assert(three_dim.get_group_range(0) == 2); assert(three_dim.get_group_range(1) == 2); assert(three_dim.get_group_range(2) == 2); @@ -108,12 +108,12 @@ int main() { assert(three_dim.get_local_id(1) == three_dim.get_local_id()[1]); assert(three_dim.get_local_id(2) == three_dim.get_local_id()[2]); assert(0); // get_local_id() is not implemented on host device - } catch (cl::sycl::runtime_error) { + } catch (sycl::runtime_error) { } try { three_dim.get_local_linear_id(); assert(0); // get_local_id() is not implemented on host device - } catch (cl::sycl::runtime_error) { + } catch (sycl::runtime_error) { } } diff --git a/sycl/test/basic_tests/handler/handler_generic_lambda_interface.cpp b/sycl/test/basic_tests/handler/handler_generic_lambda_interface.cpp index 3325481da021f..336559ea59e79 100644 --- a/sycl/test/basic_tests/handler/handler_generic_lambda_interface.cpp +++ b/sycl/test/basic_tests/handler/handler_generic_lambda_interface.cpp @@ -16,7 +16,7 @@ template void test_parallel_for(Range r) { sycl::queue q; - q.submit([&](cl::sycl::handler &cgh) { + q.submit([&](sycl::handler &cgh) { cgh.parallel_for(r, [=](auto item) { static_assert(std::is_same::value, "Argument type is unexpected"); @@ -27,7 +27,7 @@ void test_parallel_for(Range r) { template void test_parallel_for_work_group(Range r) { sycl::queue q; - q.submit([&](cl::sycl::handler &cgh) { + q.submit([&](sycl::handler &cgh) { cgh.parallel_for_work_group(r, [=](auto item) { static_assert(std::is_same::value, "Argument type is unexpected"); diff --git a/sycl/test/basic_tests/handler/unnamed-lambda-negative.cpp b/sycl/test/basic_tests/handler/unnamed-lambda-negative.cpp index 90f911b12a3e5..a8bd6c5d29e78 100644 --- a/sycl/test/basic_tests/handler/unnamed-lambda-negative.cpp +++ b/sycl/test/basic_tests/handler/unnamed-lambda-negative.cpp @@ -2,7 +2,7 @@ #include int main() { - cl::sycl::queue q; + sycl::queue q; // expected-error@sycl/kernel.hpp:* {{No kernel name provided without -fsycl-unnamed-lambda enabled!}} // expected-note@+1 {{in instantiation of function template}} @@ -10,19 +10,19 @@ int main() { // expected-error@sycl/kernel.hpp:* {{No kernel name provided without -fsycl-unnamed-lambda enabled!}} // expected-note@+1 {{in instantiation of function template}} - q.parallel_for(cl::sycl::range<1>{1}, [=](cl::sycl::item<1>){}); + q.parallel_for(sycl::range<1>{1}, [=](sycl::item<1>) {}); - q.submit([&](cl::sycl::handler &cgh) { + q.submit([&](sycl::handler &cgh) { // expected-error@sycl/kernel.hpp:* {{No kernel name provided without -fsycl-unnamed-lambda enabled!}} // expected-note@+1 {{in instantiation of function template}} cgh.single_task([=](){}); // expected-error@sycl/kernel.hpp:* {{No kernel name provided without -fsycl-unnamed-lambda enabled!}} // expected-note@+1 {{in instantiation of function template}} - cgh.parallel_for(cl::sycl::range<1>{1}, [=](cl::sycl::item<1>){}); + cgh.parallel_for(sycl::range<1>{1}, [=](sycl::item<1>) {}); // expected-error@sycl/kernel.hpp:* {{No kernel name provided without -fsycl-unnamed-lambda enabled!}} // expected-note@+1 {{in instantiation of function template}} - cgh.parallel_for_work_group(cl::sycl::range<1>{1}, [=](cl::sycl::group<1>){}); + cgh.parallel_for_work_group(sycl::range<1>{1}, [=](sycl::group<1>) {}); }); } diff --git a/sycl/test/basic_tests/host_image_accessor_read.cpp b/sycl/test/basic_tests/host_image_accessor_read.cpp index 134444f91d982..eb53b730dfdcb 100644 --- a/sycl/test/basic_tests/host_image_accessor_read.cpp +++ b/sycl/test/basic_tests/host_image_accessor_read.cpp @@ -16,35 +16,34 @@ int foo(float *image_data) { int result[2]; - const auto channelOrder = cl::sycl::image_channel_order::rgba; - const auto channelType = cl::sycl::image_channel_type::fp32; + const auto channelOrder = sycl::image_channel_order::rgba; + const auto channelType = sycl::image_channel_type::fp32; - cl::sycl::range<3> r(3, 3, 3); + sycl::range<3> r(3, 3, 3); { - cl::sycl::buffer ResultBuf(result, cl::sycl::range<1>(2)); - cl::sycl::queue Q; - cl::sycl::image<3> Image(image_data, channelOrder, channelType, r); + sycl::buffer ResultBuf(result, sycl::range<1>(2)); + sycl::queue Q; + sycl::image<3> Image(image_data, channelOrder, channelType, r); - cl::sycl::range<2> pitch = Image.get_pitch(); + sycl::range<2> pitch = Image.get_pitch(); - cl::sycl::cl_int4 Coords{0, 1, 2, 0}; + sycl::cl_int4 Coords{0, 1, 2, 0}; { auto host_image_acc = - Image.template get_access(); + Image.template get_access(); - auto Sampler = cl::sycl::sampler( - cl::sycl::coordinate_normalization_mode::unnormalized, - cl::sycl::addressing_mode::none, cl::sycl::filtering_mode::nearest); + auto Sampler = sycl::sampler( + sycl::coordinate_normalization_mode::unnormalized, + sycl::addressing_mode::none, sycl::filtering_mode::nearest); // Test image read function. - cl::sycl::cl_float4 Ret_data = host_image_acc.read(Coords); + sycl::cl_float4 Ret_data = host_image_acc.read(Coords); assert((float)Ret_data.x() == 85); assert((float)Ret_data.y() == 86); assert((float)Ret_data.z() == 87); assert((float)Ret_data.w() == 88); // Test image read with sampler. - cl::sycl::cl_float4 Ret_data2 = host_image_acc.read(Coords, Sampler); + sycl::cl_float4 Ret_data2 = host_image_acc.read(Coords, Sampler); assert((float)Ret_data2.x() == 85); assert((float)Ret_data2.y() == 86); assert((float)Ret_data2.z() == 87); @@ -53,30 +52,27 @@ int foo(float *image_data) { { auto host_image_acc = - Image.template get_access(); + Image.template get_access(); // Test image write function. - host_image_acc.write(Coords, cl::sycl::cl_float4{120, 121, 122, 123}); + host_image_acc.write(Coords, sycl::cl_float4{120, 121, 122, 123}); } { auto host_image_acc = - Image.template get_access(); - cl::sycl::cl_float4 Ret_data = host_image_acc.read(Coords); + Image.template get_access(); + sycl::cl_float4 Ret_data = host_image_acc.read(Coords); assert((float)Ret_data.x() == 120); assert((float)Ret_data.y() == 121); assert((float)Ret_data.z() == 122); assert((float)Ret_data.w() == 123); // Test Out-of-bounds access for clamp_to_edge Addressing Mode. - auto Sampler = cl::sycl::sampler( - cl::sycl::coordinate_normalization_mode::unnormalized, - cl::sycl::addressing_mode::clamp_to_edge, - cl::sycl::filtering_mode::nearest); - cl::sycl::cl_int4 OutBnds_Coords{2, 2, 3, 0}; - cl::sycl::cl_float4 OutBnds_RetData = + auto Sampler = sycl::sampler( + sycl::coordinate_normalization_mode::unnormalized, + sycl::addressing_mode::clamp_to_edge, sycl::filtering_mode::nearest); + sycl::cl_int4 OutBnds_Coords{2, 2, 3, 0}; + sycl::cl_float4 OutBnds_RetData = host_image_acc.read(OutBnds_Coords, Sampler); assert((float)OutBnds_RetData.x() == 105); assert((float)OutBnds_RetData.y() == 106); diff --git a/sycl/test/basic_tests/id.cpp b/sycl/test/basic_tests/id.cpp index 23595544e2ff4..b253f462c0eeb 100644 --- a/sycl/test/basic_tests/id.cpp +++ b/sycl/test/basic_tests/id.cpp @@ -14,65 +14,65 @@ #include #include -using cl::sycl::detail::Builder; +using sycl::detail::Builder; using namespace std; int main() { /* id() * Construct a SYCL id with the value 0 for each dimension. */ - cl::sycl::id<1> one_dim_zero_id; + sycl::id<1> one_dim_zero_id; assert(one_dim_zero_id.get(0) == 0); - cl::sycl::id<2> two_dim_zero_id; + sycl::id<2> two_dim_zero_id; assert(two_dim_zero_id.get(0) == 0 && two_dim_zero_id.get(1) == 0); - cl::sycl::id<3> three_dim_zero_id; + sycl::id<3> three_dim_zero_id; assert(three_dim_zero_id.get(0) == 0 && three_dim_zero_id.get(1) == 0 && three_dim_zero_id.get(2) == 0); /* id(size_t dim0) * Construct a 1D id with value dim0. Only valid when the template parameter * dimensions is equal to 1 */ - cl::sycl::id<1> one_dim_id(64); + sycl::id<1> one_dim_id(64); assert(one_dim_id.get(0) == 64); /* id(size_t dim0, size_t dim1) * Construct a 2D id with values dim0, dim1. Only valid when the template * parameter dimensions is equal to 2. */ - cl::sycl::id<2> two_dim_id(128, 256); + sycl::id<2> two_dim_id(128, 256); assert(two_dim_id.get(0) == 128 && two_dim_id.get(1) == 256); /* id(size_t dim0, size_t dim1, size_t dim2) * Construct a 3D id with values dim0, dim1, dim2. Only valid when the * template parameter dimensions is equal to 3. */ - cl::sycl::id<3> three_dim_id(64, 1, 2); + sycl::id<3> three_dim_id(64, 1, 2); assert(three_dim_id.get(0) == 64 && three_dim_id.get(1) == 1 && three_dim_id.get(2) == 2); /* id(const range &range) * Construct an id from the dimensions of r. */ - cl::sycl::range<1> one_dim_range(2); - cl::sycl::id<1> one_dim_id_range(one_dim_range); + sycl::range<1> one_dim_range(2); + sycl::id<1> one_dim_id_range(one_dim_range); assert(one_dim_id_range.get(0) == 2); - cl::sycl::range<2> two_dim_range(4, 8); - cl::sycl::id<2> two_dim_id_range(two_dim_range); + sycl::range<2> two_dim_range(4, 8); + sycl::id<2> two_dim_id_range(two_dim_range); assert(two_dim_id_range.get(0) == 4 && two_dim_id_range.get(1) == 8); - cl::sycl::range<3> three_dim_range(16, 32, 64); - cl::sycl::id<3> three_dim_id_range(three_dim_range); + sycl::range<3> three_dim_range(16, 32, 64); + sycl::id<3> three_dim_id_range(three_dim_range); assert(three_dim_id_range.get(0) == 16 && three_dim_id_range.get(1) == 32 && three_dim_id_range.get(2) == 64); /* id(const item &item) * Construct an id from item.get_id().*/ - cl::sycl::item<1, true> one_dim_item_with_offset = + sycl::item<1, true> one_dim_item_with_offset = Builder::createItem<1, true>({4}, {2}, {1}); - cl::sycl::id<1> one_dim_id_item(one_dim_item_with_offset); + sycl::id<1> one_dim_id_item(one_dim_item_with_offset); assert(one_dim_id_item.get(0) == 2); - cl::sycl::item<2, true> two_dim_item_with_offset = + sycl::item<2, true> two_dim_item_with_offset = Builder::createItem<2, true>({8, 16}, {4, 8}, {1, 1}); - cl::sycl::id<2> two_dim_id_item(two_dim_item_with_offset); + sycl::id<2> two_dim_id_item(two_dim_item_with_offset); assert(two_dim_id_item.get(0) == 4 && two_dim_id_item.get(1) == 8); - cl::sycl::item<3, true> three_dim_item_with_offset = + sycl::item<3, true> three_dim_item_with_offset = Builder::createItem<3, true>({32, 64, 128}, {16, 32, 64}, {1, 1, 1}); - cl::sycl::id<3> three_dim_id_item(three_dim_item_with_offset); + sycl::id<3> three_dim_id_item(three_dim_item_with_offset); assert(three_dim_id_item.get(0) == 16 && three_dim_id_item.get(1) == 32 && three_dim_id_item.get(2) == 64); /* size_t get(int dimension)const @@ -80,11 +80,11 @@ int main() { /* size_t &operator[](int dimension)const * Return a reference to the requested dimension of the id object. */ - cl::sycl::id<1> one_dim_id_brackets(64); + sycl::id<1> one_dim_id_brackets(64); assert(one_dim_id_brackets[0] == 64); - cl::sycl::id<2> two_dim_id_brackets(128, 256); + sycl::id<2> two_dim_id_brackets(128, 256); assert(two_dim_id_brackets[0] == 128 && two_dim_id_brackets[1] == 256); - cl::sycl::id<3> three_dim_id_brackets(64, 1, 2); + sycl::id<3> three_dim_id_brackets(64, 1, 2); assert(three_dim_id_brackets[0] == 64 && three_dim_id_brackets[1] == 1 && three_dim_id_brackets[2] == 2); @@ -108,20 +108,19 @@ int main() { #define firstThreeValue 3 #define secondThreeValue 22 - cl::sycl::id<1> one_dim_op_one(firstOneValue); - cl::sycl::id<1> one_dim_op_two(secondOneValue); - cl::sycl::id<1> one_dim_op_another_one(firstOneValue); + sycl::id<1> one_dim_op_one(firstOneValue); + sycl::id<1> one_dim_op_two(secondOneValue); + sycl::id<1> one_dim_op_another_one(firstOneValue); - cl::sycl::id<2> two_dim_op_one(firstOneValue, firstTwoValue); - cl::sycl::id<2> two_dim_op_two(secondOneValue, secondTwoValue); - cl::sycl::id<2> two_dim_op_another_one(firstOneValue, firstTwoValue); + sycl::id<2> two_dim_op_one(firstOneValue, firstTwoValue); + sycl::id<2> two_dim_op_two(secondOneValue, secondTwoValue); + sycl::id<2> two_dim_op_another_one(firstOneValue, firstTwoValue); - cl::sycl::id<3> three_dim_op_one(firstOneValue, firstTwoValue, - firstThreeValue); - cl::sycl::id<3> three_dim_op_two(secondOneValue, secondTwoValue, - secondThreeValue); - cl::sycl::id<3> three_dim_op_another_one(firstOneValue, firstTwoValue, - firstThreeValue); + sycl::id<3> three_dim_op_one(firstOneValue, firstTwoValue, firstThreeValue); + sycl::id<3> three_dim_op_two(secondOneValue, secondTwoValue, + secondThreeValue); + sycl::id<3> three_dim_op_another_one(firstOneValue, firstTwoValue, + firstThreeValue); // OP : == // id<1> == id<1> @@ -222,20 +221,19 @@ int main() { #define threeLeftValue value_3 #define threeRightValue 9 - cl::sycl::id<1> one_dim_op_left(oneLeftValue); - cl::sycl::id<1> one_dim_op_right(oneRightValue); - cl::sycl::range<1> one_dim_op_range(oneRightValue); + sycl::id<1> one_dim_op_left(oneLeftValue); + sycl::id<1> one_dim_op_right(oneRightValue); + sycl::range<1> one_dim_op_range(oneRightValue); - cl::sycl::id<2> two_dim_op_left(oneLeftValue, twoLeftValue); - cl::sycl::id<2> two_dim_op_right(oneRightValue, twoRightValue); - cl::sycl::range<2> two_dim_op_range(oneRightValue, twoRightValue); + sycl::id<2> two_dim_op_left(oneLeftValue, twoLeftValue); + sycl::id<2> two_dim_op_right(oneRightValue, twoRightValue); + sycl::range<2> two_dim_op_range(oneRightValue, twoRightValue); - cl::sycl::id<3> three_dim_op_left(oneLeftValue, twoLeftValue, - threeLeftValue); - cl::sycl::id<3> three_dim_op_right(oneRightValue, twoRightValue, - threeRightValue); - cl::sycl::range<3> three_dim_op_range(oneRightValue, twoRightValue, - threeRightValue); + sycl::id<3> three_dim_op_left(oneLeftValue, twoLeftValue, threeLeftValue); + sycl::id<3> three_dim_op_right(oneRightValue, twoRightValue, + threeRightValue); + sycl::range<3> three_dim_op_range(oneRightValue, twoRightValue, + threeRightValue); #define OPERATOR_TEST(op) \ assert((one_dim_op_left op one_dim_op_right)[0] == \ (oneLeftValue op oneRightValue)); \ @@ -324,20 +322,19 @@ int main() { #define threeLeftValue value_3 #define threeRightValue 9 - cl::sycl::id<1> one_dim_op_left(oneLeftValue); - cl::sycl::id<1> one_dim_op_right(oneRightValue); - cl::sycl::range<1> one_dim_op_range(oneRightValue); + sycl::id<1> one_dim_op_left(oneLeftValue); + sycl::id<1> one_dim_op_right(oneRightValue); + sycl::range<1> one_dim_op_range(oneRightValue); - cl::sycl::id<2> two_dim_op_left(oneLeftValue, twoLeftValue); - cl::sycl::id<2> two_dim_op_right(oneRightValue, twoRightValue); - cl::sycl::range<2> two_dim_op_range(oneRightValue, twoRightValue); + sycl::id<2> two_dim_op_left(oneLeftValue, twoLeftValue); + sycl::id<2> two_dim_op_right(oneRightValue, twoRightValue); + sycl::range<2> two_dim_op_range(oneRightValue, twoRightValue); - cl::sycl::id<3> three_dim_op_left(oneLeftValue, twoLeftValue, - threeLeftValue); - cl::sycl::id<3> three_dim_op_right(oneRightValue, twoRightValue, - threeRightValue); - cl::sycl::range<3> three_dim_op_range(oneRightValue, twoRightValue, - threeRightValue); + sycl::id<3> three_dim_op_left(oneLeftValue, twoLeftValue, threeLeftValue); + sycl::id<3> three_dim_op_right(oneRightValue, twoRightValue, + threeRightValue); + sycl::range<3> three_dim_op_range(oneRightValue, twoRightValue, + threeRightValue); #define OPERATOR_TEST(op) \ one_dim_op_left[0] = oneLeftValue; \ @@ -426,7 +423,7 @@ int main() { * Should fails on cast from id<2> and id<3> */ #define numValue 16 { - cl::sycl::id<1> one_dim_id_cast_to_num(numValue); + sycl::id<1> one_dim_id_cast_to_num(numValue); size_t number_1 = one_dim_id_cast_to_num; int number_2 = one_dim_id_cast_to_num; size_t number_3 = (size_t)one_dim_id_cast_to_num; @@ -441,15 +438,15 @@ int main() { #endif // __SYCL_DISABLE_ID_TO_INT_CONV__ { - cl::sycl::id<1> one_dim_id(64); - cl::sycl::id<1> one_dim_id_neg(-64); - cl::sycl::id<1> one_dim_id_copy(64); - cl::sycl::id<2> two_dim_id(64, 1); - cl::sycl::id<2> two_dim_id_neg(-64, -1); - cl::sycl::id<2> two_dim_id_copy(64, 1); - cl::sycl::id<3> three_dim_id(64, 1, 2); - cl::sycl::id<3> three_dim_id_neg(-64, -1, -2); - cl::sycl::id<3> three_dim_id_copy(64, 1, 2); + sycl::id<1> one_dim_id(64); + sycl::id<1> one_dim_id_neg(-64); + sycl::id<1> one_dim_id_copy(64); + sycl::id<2> two_dim_id(64, 1); + sycl::id<2> two_dim_id_neg(-64, -1); + sycl::id<2> two_dim_id_copy(64, 1); + sycl::id<3> three_dim_id(64, 1, 2); + sycl::id<3> three_dim_id_neg(-64, -1, -2); + sycl::id<3> three_dim_id_copy(64, 1, 2); assert((+one_dim_id) == one_dim_id); assert(-one_dim_id == one_dim_id_neg); diff --git a/sycl/test/basic_tests/id_ctad.cpp b/sycl/test/basic_tests/id_ctad.cpp index 1c18372ed22c4..16427c00c3885 100644 --- a/sycl/test/basic_tests/id_ctad.cpp +++ b/sycl/test/basic_tests/id_ctad.cpp @@ -11,10 +11,10 @@ using namespace std; int main() { - cl::sycl::id one_dim_id(64); - cl::sycl::id two_dim_id(64, 1); - cl::sycl::id three_dim_id(64, 1, 2); - static_assert(std::is_same>::value); - static_assert(std::is_same>::value); - static_assert(std::is_same>::value); + sycl::id one_dim_id(64); + sycl::id two_dim_id(64, 1); + sycl::id three_dim_id(64, 1, 2); + static_assert(std::is_same>::value); + static_assert(std::is_same>::value); + static_assert(std::is_same>::value); } diff --git a/sycl/test/basic_tests/image_accessor_types.cpp b/sycl/test/basic_tests/image_accessor_types.cpp index 168aff07f0d8f..480a084736e6c 100644 --- a/sycl/test/basic_tests/image_accessor_types.cpp +++ b/sycl/test/basic_tests/image_accessor_types.cpp @@ -3,7 +3,7 @@ #include #include -using namespace cl::sycl; +using namespace sycl; class mod_image; int main() { half4 src[16]; diff --git a/sycl/test/basic_tests/implicit_conversion_error.cpp b/sycl/test/basic_tests/implicit_conversion_error.cpp index 24f57239b2d0d..8acd29d28002b 100644 --- a/sycl/test/basic_tests/implicit_conversion_error.cpp +++ b/sycl/test/basic_tests/implicit_conversion_error.cpp @@ -3,13 +3,15 @@ #include int main() { - cl::sycl::queue q; - cl::sycl::context cxt = q.get_context(); - cl::sycl::device dev = q.get_device(); + sycl::queue q; + sycl::context cxt = q.get_context(); + sycl::device dev = q.get_device(); - cl::sycl::context cxt2{dev}; - cl::sycl::context cxt3 = dev; // expected-error {{no viable conversion from 'cl::sycl::device' to 'cl::sycl::context'}} + // clang-format off + sycl::context cxt2{dev}; + sycl::context cxt3 = dev; // expected-error {{no viable conversion from 'sycl::device' to 'sycl::context'}} - cl::sycl::queue q2{dev}; - cl::sycl::queue q3 = dev; // expected-error {{no viable conversion from 'cl::sycl::device' to 'cl::sycl::queue'}} + sycl::queue q2{dev}; + sycl::queue q3 = dev; // expected-error {{no viable conversion from 'sycl::device' to 'sycl::queue'}} + // clang-format on } diff --git a/sycl/test/basic_tests/is_device_copyable.cpp b/sycl/test/basic_tests/is_device_copyable.cpp index d695f2634b118..1c4199e954530 100644 --- a/sycl/test/basic_tests/is_device_copyable.cpp +++ b/sycl/test/basic_tests/is_device_copyable.cpp @@ -11,7 +11,7 @@ #include -using namespace cl::sycl; +using namespace sycl; // Trivially copyable type. struct A { diff --git a/sycl/test/basic_tests/item.cpp b/sycl/test/basic_tests/item.cpp index 9c0d9c99a1005..2952628976b9a 100644 --- a/sycl/test/basic_tests/item.cpp +++ b/sycl/test/basic_tests/item.cpp @@ -11,104 +11,103 @@ #include #include -using cl::sycl::detail::Builder; +using sycl::detail::Builder; int main() { // one dimension item with offset - cl::sycl::item<1, true> one_dim_with_offset = + sycl::item<1, true> one_dim_with_offset = Builder::createItem<1, true>({4}, {2}, {1}); - assert(one_dim_with_offset.get_id() == cl::sycl::id<1>{2}); + assert(one_dim_with_offset.get_id() == sycl::id<1>{2}); assert(one_dim_with_offset.get_id(0) == 2); assert(one_dim_with_offset[0] == 2); - assert(one_dim_with_offset.get_range() == cl::sycl::range<1>{4}); + assert(one_dim_with_offset.get_range() == sycl::range<1>{4}); assert(one_dim_with_offset.get_range(0) == 4); - assert(one_dim_with_offset.get_offset() == cl::sycl::id<1>{1}); + assert(one_dim_with_offset.get_offset() == sycl::id<1>{1}); assert(one_dim_with_offset.get_linear_id() == 1); // two dimension item with offset - cl::sycl::item<2, true> two_dim_with_offset = + sycl::item<2, true> two_dim_with_offset = Builder::createItem<2, true>({4, 8}, {2, 4}, {1, 1}); - assert((two_dim_with_offset.get_id() == cl::sycl::id<2>{2, 4})); + assert((two_dim_with_offset.get_id() == sycl::id<2>{2, 4})); assert(two_dim_with_offset.get_id(0) == 2); assert(two_dim_with_offset.get_id(1) == 4); assert(two_dim_with_offset[0] == 2); assert(two_dim_with_offset[1] == 4); - assert((two_dim_with_offset.get_range() == cl::sycl::range<2>{4, 8})); + assert((two_dim_with_offset.get_range() == sycl::range<2>{4, 8})); assert((two_dim_with_offset.get_range(0) == 4)); assert((two_dim_with_offset.get_range(1) == 8)); - assert((two_dim_with_offset.get_offset() == cl::sycl::id<2>{1, 1})); + assert((two_dim_with_offset.get_offset() == sycl::id<2>{1, 1})); assert(two_dim_with_offset.get_linear_id() == 11); // three dimension item with offset - cl::sycl::item<3, true> three_dim_with_offset = + sycl::item<3, true> three_dim_with_offset = Builder::createItem<3, true>({4, 8, 16}, {2, 4, 8}, {1, 1, 1}); - assert((three_dim_with_offset.get_id() == cl::sycl::id<3>{2, 4, 8})); + assert((three_dim_with_offset.get_id() == sycl::id<3>{2, 4, 8})); assert(three_dim_with_offset.get_id(0) == 2); assert(three_dim_with_offset.get_id(1) == 4); assert(three_dim_with_offset.get_id(2) == 8); assert(three_dim_with_offset[0] == 2); assert(three_dim_with_offset[1] == 4); assert(three_dim_with_offset[2] == 8); - assert((three_dim_with_offset.get_range() == cl::sycl::range<3>{4, 8, 16})); + assert((three_dim_with_offset.get_range() == sycl::range<3>{4, 8, 16})); assert((three_dim_with_offset.get_range(0) == 4)); assert((three_dim_with_offset.get_range(1) == 8)); assert((three_dim_with_offset.get_range(2) == 16)); - assert((three_dim_with_offset.get_offset() == cl::sycl::id<3>{1, 1, 1})); + assert((three_dim_with_offset.get_offset() == sycl::id<3>{1, 1, 1})); assert(three_dim_with_offset.get_linear_id() == 183); // one dimension item without offset - cl::sycl::item<1, false> one_dim = Builder::createItem<1, false>({4}, {2}); - assert(one_dim.get_id() == cl::sycl::id<1>{2}); + sycl::item<1, false> one_dim = Builder::createItem<1, false>({4}, {2}); + assert(one_dim.get_id() == sycl::id<1>{2}); assert(one_dim.get_id(0) == 2); assert(one_dim[0] == 2); - assert(one_dim.get_range() == cl::sycl::range<1>{4}); + assert(one_dim.get_range() == sycl::range<1>{4}); assert(one_dim.get_range(0) == 4); assert(one_dim.get_linear_id() == 2); // two dimension item without offset - cl::sycl::item<2, false> two_dim = - Builder::createItem<2, false>({4, 8}, {2, 4}); - assert((two_dim.get_id() == cl::sycl::id<2>{2, 4})); + sycl::item<2, false> two_dim = Builder::createItem<2, false>({4, 8}, {2, 4}); + assert((two_dim.get_id() == sycl::id<2>{2, 4})); assert(two_dim.get_id(0) == 2); assert(two_dim.get_id(1) == 4); assert(two_dim[0] == 2); assert(two_dim[1] == 4); - assert((two_dim.get_range() == cl::sycl::range<2>{4, 8})); + assert((two_dim.get_range() == sycl::range<2>{4, 8})); assert((two_dim.get_range(0) == 4)); assert((two_dim.get_range(1) == 8)); assert(two_dim.get_linear_id() == 20); // three dimension item without offset - cl::sycl::item<3, false> three_dim = + sycl::item<3, false> three_dim = Builder::createItem<3, false>({4, 8, 16}, {2, 4, 8}); - assert((three_dim.get_id() == cl::sycl::id<3>{2, 4, 8})); + assert((three_dim.get_id() == sycl::id<3>{2, 4, 8})); assert(three_dim.get_id(0) == 2); assert(three_dim.get_id(1) == 4); assert(three_dim.get_id(2) == 8); assert(three_dim[0] == 2); assert(three_dim[1] == 4); assert(three_dim[2] == 8); - assert((three_dim.get_range() == cl::sycl::range<3>{4, 8, 16})); + assert((three_dim.get_range() == sycl::range<3>{4, 8, 16})); assert((three_dim.get_range(0) == 4)); assert((three_dim.get_range(1) == 8)); assert((three_dim.get_range(2) == 16)); assert(three_dim.get_linear_id() == 328); // A conversion to item with offset - cl::sycl::item<1, true> one_dim_transformed = one_dim; - cl::sycl::item<1, true> one_dim_check = + sycl::item<1, true> one_dim_transformed = one_dim; + sycl::item<1, true> one_dim_check = Builder::createItem<1, true>({4}, {2}, {0}); assert(one_dim_transformed == one_dim_check); - cl::sycl::item<2, true> two_dim_transformed = two_dim; - cl::sycl::item<2, true> two_dim_check = + sycl::item<2, true> two_dim_transformed = two_dim; + sycl::item<2, true> two_dim_check = Builder::createItem<2, true>({4, 8}, {2, 4}, {0, 0}); assert(two_dim_transformed == two_dim_check); - cl::sycl::item<3, true> three_dim_transformed = three_dim; - cl::sycl::item<3, true> three_dim_check = + sycl::item<3, true> three_dim_transformed = three_dim; + sycl::item<3, true> three_dim_check = Builder::createItem<3, true>({4, 8, 16}, {2, 4, 8}, {0, 0, 0}); assert((three_dim_transformed == three_dim_check)); - using value_type = decltype(std::declval>()[0]); + using value_type = decltype(std::declval>()[0]); static_assert(!std::is_reference::value, "Expected a non-reference type"); } diff --git a/sycl/test/basic_tests/known_identity.cpp b/sycl/test/basic_tests/known_identity.cpp index dd231a35dbe47..edfc8810eb33a 100644 --- a/sycl/test/basic_tests/known_identity.cpp +++ b/sycl/test/basic_tests/known_identity.cpp @@ -9,7 +9,7 @@ #include #include -using namespace cl::sycl; +using namespace sycl; template void checkCommonKnownIdentity() { static_assert(has_known_identity, T>::value); diff --git a/sycl/test/basic_tests/library_loading.cpp b/sycl/test/basic_tests/library_loading.cpp index f05d24a441d74..228bbe8371b9f 100644 --- a/sycl/test/basic_tests/library_loading.cpp +++ b/sycl/test/basic_tests/library_loading.cpp @@ -5,7 +5,7 @@ // Checks pi traces on library loading #include -using namespace cl::sycl; +using namespace sycl; int main() { // CHECK: {{(SYCL_PI_TRACE\[-1\]: dlopen\(libpi_cuda.so\) failed with)|(SYCL_PI_TRACE\[basic\]: Plugin found and successfully loaded: libpi_cuda.so)}} diff --git a/sycl/test/basic_tests/linear-host-dev.cpp b/sycl/test/basic_tests/linear-host-dev.cpp index a0e620c3db512..75e80c3461ef6 100644 --- a/sycl/test/basic_tests/linear-host-dev.cpp +++ b/sycl/test/basic_tests/linear-host-dev.cpp @@ -16,7 +16,7 @@ // is somehow changed so it's no longer possible to run this test reliable // it can be removed. -namespace s = cl::sycl; +namespace s = sycl; int main(int argc, char *argv[]) { s::queue q; @@ -35,7 +35,7 @@ int main(int argc, char *argv[]) { // CHECK-NEXT: 3 // CHECK-NEXT: 4 // CHECK-NEXT: 5 - out << item.get_linear_id() << cl::sycl::endl; + out << item.get_linear_id() << sycl::endl; }); }); q.wait(); diff --git a/sycl/test/basic_tests/nd_item.cpp b/sycl/test/basic_tests/nd_item.cpp index 1ae8ad8db9b41..a7ada667a4db6 100644 --- a/sycl/test/basic_tests/nd_item.cpp +++ b/sycl/test/basic_tests/nd_item.cpp @@ -12,42 +12,42 @@ #include using namespace std; -using cl::sycl::detail::Builder; +using sycl::detail::Builder; int main() { // one dimension nd_item - cl::sycl::nd_item<1> one_dim = + sycl::nd_item<1> one_dim = Builder::createNDItem<1>(Builder::createItem<1, true>({4}, {2}, {0}), Builder::createItem<1, false>({2}, {0}), Builder::createGroup<1>({4}, {2}, {1})); - assert((one_dim.get_global_id() == cl::sycl::id<1>{2})); + assert((one_dim.get_global_id() == sycl::id<1>{2})); assert(one_dim.get_global_id(0) == 2); assert(one_dim.get_global_linear_id() == 2); - assert((one_dim.get_local_id() == cl::sycl::id<1>{0})); + assert((one_dim.get_local_id() == sycl::id<1>{0})); assert(one_dim.get_local_id(0) == 0); assert(one_dim.get_local_linear_id() == 0); assert((one_dim.get_group() == Builder::createGroup<1>({4}, {2}, {1}))); assert(one_dim.get_group(0) == 1); assert(one_dim.get_group_linear_id() == 1); - assert((one_dim.get_group_range() == cl::sycl::id<1>{2})); + assert((one_dim.get_group_range() == sycl::id<1>{2})); assert(one_dim.get_group_range(0) == 2); - assert((one_dim.get_global_range() == cl::sycl::range<1>{4})); + assert((one_dim.get_global_range() == sycl::range<1>{4})); assert((one_dim.get_global_range(0) == 4)); - assert((one_dim.get_local_range() == cl::sycl::range<1>{2})); + assert((one_dim.get_local_range() == sycl::range<1>{2})); assert((one_dim.get_local_range(0) == 2)); - assert((one_dim.get_offset() == cl::sycl::id<1>{0})); - assert((one_dim.get_nd_range() == cl::sycl::nd_range<1>({4}, {2}, {0}))); + assert((one_dim.get_offset() == sycl::id<1>{0})); + assert((one_dim.get_nd_range() == sycl::nd_range<1>({4}, {2}, {0}))); // two dimension nd_item - cl::sycl::nd_item<2> two_dim = Builder::createNDItem<2>( + sycl::nd_item<2> two_dim = Builder::createNDItem<2>( Builder::createItem<2, true>({4, 4}, {2, 2}, {0, 0}), Builder::createItem<2, false>({2, 2}, {0, 0}), Builder::createGroup<2>({4, 4}, {2, 2}, {1, 1})); - assert((two_dim.get_global_id() == cl::sycl::id<2>{2, 2})); + assert((two_dim.get_global_id() == sycl::id<2>{2, 2})); assert(two_dim.get_global_id(0) == 2); assert(two_dim.get_global_id(1) == 2); assert(two_dim.get_global_linear_id() == 10); - assert((two_dim.get_local_id() == cl::sycl::id<2>{0, 0})); + assert((two_dim.get_local_id() == sycl::id<2>{0, 0})); assert(two_dim.get_local_id(0) == 0); assert(two_dim.get_local_id(1) == 0); assert(two_dim.get_local_linear_id() == 0); @@ -56,30 +56,29 @@ int main() { assert(two_dim.get_group(0) == 1); assert(two_dim.get_group(1) == 1); assert(two_dim.get_group_linear_id() == 3); - assert((two_dim.get_group_range() == cl::sycl::id<2>{2, 2})); + assert((two_dim.get_group_range() == sycl::id<2>{2, 2})); assert(two_dim.get_group_range(0) == 2); assert(two_dim.get_group_range(1) == 2); - assert((two_dim.get_global_range() == cl::sycl::range<2>{4, 4})); + assert((two_dim.get_global_range() == sycl::range<2>{4, 4})); assert((two_dim.get_global_range(0) == 4 && two_dim.get_global_range(1) == 4)); - assert((two_dim.get_local_range() == cl::sycl::range<2>{2, 2})); + assert((two_dim.get_local_range() == sycl::range<2>{2, 2})); assert((two_dim.get_local_range(0) == 2 && two_dim.get_local_range(1) == 2)); - assert((two_dim.get_offset() == cl::sycl::id<2>{0, 0})); - assert((two_dim.get_nd_range() == - cl::sycl::nd_range<2>({4, 4}, {2, 2}, {0, 0}))); + assert((two_dim.get_offset() == sycl::id<2>{0, 0})); + assert((two_dim.get_nd_range() == sycl::nd_range<2>({4, 4}, {2, 2}, {0, 0}))); // three dimension nd_item - cl::sycl::nd_item<3> three_dim = Builder::createNDItem<3>( + sycl::nd_item<3> three_dim = Builder::createNDItem<3>( Builder::createItem<3, true>({4, 4, 4}, {2, 2, 2}, {0, 0, 0}), Builder::createItem<3, false>({2, 2, 2}, {0, 0, 0}), Builder::createGroup<3>({4, 4, 4}, {2, 2, 2}, {1, 1, 1})); - assert((three_dim.get_global_id() == cl::sycl::id<3>{2, 2, 2})); + assert((three_dim.get_global_id() == sycl::id<3>{2, 2, 2})); assert(three_dim.get_global_id(0) == 2); assert(three_dim.get_global_id(1) == 2); assert(three_dim.get_global_id(2) == 2); assert(three_dim.get_global_linear_id() == 42); - assert((three_dim.get_local_id() == cl::sycl::id<3>{0, 0, 0})); + assert((three_dim.get_local_id() == sycl::id<3>{0, 0, 0})); assert(three_dim.get_local_id(0) == 0); assert(three_dim.get_local_id(1) == 0); assert(three_dim.get_local_id(2) == 0); @@ -90,19 +89,19 @@ int main() { assert(three_dim.get_group(1) == 1); assert(three_dim.get_group(2) == 1); assert(three_dim.get_group_linear_id() == 7); - assert((three_dim.get_group_range() == cl::sycl::id<3>{2, 2, 2})); + assert((three_dim.get_group_range() == sycl::id<3>{2, 2, 2})); assert(three_dim.get_group_range(0) == 2); assert(three_dim.get_group_range(1) == 2); assert(three_dim.get_group_range(2) == 2); - assert((three_dim.get_global_range() == cl::sycl::range<3>{4, 4, 4})); + assert((three_dim.get_global_range() == sycl::range<3>{4, 4, 4})); assert((three_dim.get_global_range(0) == 4 && three_dim.get_global_range(1) == 4 && three_dim.get_global_range(2) == 4)); - assert((three_dim.get_local_range() == cl::sycl::range<3>{2, 2, 2})); + assert((three_dim.get_local_range() == sycl::range<3>{2, 2, 2})); assert((three_dim.get_local_range(0) == 2 && three_dim.get_local_range(1) == 2 && three_dim.get_local_range(2) == 2)); - assert((three_dim.get_offset() == cl::sycl::id<3>{0, 0, 0})); + assert((three_dim.get_offset() == sycl::id<3>{0, 0, 0})); assert((three_dim.get_nd_range() == - cl::sycl::nd_range<3>({4, 4, 4}, {2, 2, 2}, {0, 0, 0}))); + sycl::nd_range<3>({4, 4, 4}, {2, 2, 2}, {0, 0, 0}))); } diff --git a/sycl/test/basic_tests/nd_range.cpp b/sycl/test/basic_tests/nd_range.cpp index 592f2998db2d3..39e1479f31481 100644 --- a/sycl/test/basic_tests/nd_range.cpp +++ b/sycl/test/basic_tests/nd_range.cpp @@ -13,48 +13,49 @@ using namespace std; int main() { - cl::sycl::nd_range<1> one_dim_nd_range_offset({4}, {2}, {1}); - assert(one_dim_nd_range_offset.get_global_range() == cl::sycl::range<1>(4)); - assert(one_dim_nd_range_offset.get_local_range() == cl::sycl::range<1>(2)); - assert(one_dim_nd_range_offset.get_group_range() == cl::sycl::range<1>(2)); - assert(one_dim_nd_range_offset.get_offset() == cl::sycl::id<1>(1)); + sycl::nd_range<1> one_dim_nd_range_offset({4}, {2}, {1}); + assert(one_dim_nd_range_offset.get_global_range() == sycl::range<1>(4)); + assert(one_dim_nd_range_offset.get_local_range() == sycl::range<1>(2)); + assert(one_dim_nd_range_offset.get_group_range() == sycl::range<1>(2)); + assert(one_dim_nd_range_offset.get_offset() == sycl::id<1>(1)); cout << "one_dim_nd_range_offset passed " << endl; - cl::sycl::nd_range<2> two_dim_nd_range_offset({8, 16}, {4, 8}, {1, 1}); - assert(two_dim_nd_range_offset.get_global_range() == cl::sycl::range<2>(8, 16)); - assert(two_dim_nd_range_offset.get_local_range() == cl::sycl::range<2>(4, 8)); - assert(two_dim_nd_range_offset.get_group_range() == cl::sycl::range<2>(2, 2)); - assert(two_dim_nd_range_offset.get_offset() == cl::sycl::id<2>(1, 1)); + sycl::nd_range<2> two_dim_nd_range_offset({8, 16}, {4, 8}, {1, 1}); + assert(two_dim_nd_range_offset.get_global_range() == sycl::range<2>(8, 16)); + assert(two_dim_nd_range_offset.get_local_range() == sycl::range<2>(4, 8)); + assert(two_dim_nd_range_offset.get_group_range() == sycl::range<2>(2, 2)); + assert(two_dim_nd_range_offset.get_offset() == sycl::id<2>(1, 1)); cout << "two_dim_nd_range_offset passed " << endl; - cl::sycl::nd_range<3> three_dim_nd_range_offset({32, 64, 128}, {16, 32, 64}, - {1, 1, 1}); + sycl::nd_range<3> three_dim_nd_range_offset({32, 64, 128}, {16, 32, 64}, + {1, 1, 1}); assert(three_dim_nd_range_offset.get_global_range() == - cl::sycl::range<3>(32, 64, 128)); + sycl::range<3>(32, 64, 128)); assert(three_dim_nd_range_offset.get_local_range() == - cl::sycl::range<3>(16, 32, 64)); - assert(three_dim_nd_range_offset.get_group_range() == cl::sycl::range<3>(2, 2, 2)); - assert(three_dim_nd_range_offset.get_offset() == cl::sycl::id<3>(1, 1, 1)); + sycl::range<3>(16, 32, 64)); + assert(three_dim_nd_range_offset.get_group_range() == + sycl::range<3>(2, 2, 2)); + assert(three_dim_nd_range_offset.get_offset() == sycl::id<3>(1, 1, 1)); cout << "three_dim_nd_range_offset passed " << endl; - cl::sycl::nd_range<1> one_dim_nd_range({4}, {2}); - assert(one_dim_nd_range.get_global_range() == cl::sycl::range<1>(4)); - assert(one_dim_nd_range.get_local_range() == cl::sycl::range<1>(2)); - assert(one_dim_nd_range.get_group_range() == cl::sycl::range<1>(2)); - assert(one_dim_nd_range.get_offset() == cl::sycl::id<1>(0)); + sycl::nd_range<1> one_dim_nd_range({4}, {2}); + assert(one_dim_nd_range.get_global_range() == sycl::range<1>(4)); + assert(one_dim_nd_range.get_local_range() == sycl::range<1>(2)); + assert(one_dim_nd_range.get_group_range() == sycl::range<1>(2)); + assert(one_dim_nd_range.get_offset() == sycl::id<1>(0)); cout << "one_dim_nd_range passed " << endl; - cl::sycl::nd_range<2> two_dim_nd_range({8, 16}, {4, 8}); - assert(two_dim_nd_range.get_global_range() == cl::sycl::range<2>(8, 16)); - assert(two_dim_nd_range.get_local_range() == cl::sycl::range<2>(4, 8)); - assert(two_dim_nd_range.get_group_range() == cl::sycl::range<2>(2, 2)); - assert(two_dim_nd_range.get_offset() == cl::sycl::id<2>(0, 0)); + sycl::nd_range<2> two_dim_nd_range({8, 16}, {4, 8}); + assert(two_dim_nd_range.get_global_range() == sycl::range<2>(8, 16)); + assert(two_dim_nd_range.get_local_range() == sycl::range<2>(4, 8)); + assert(two_dim_nd_range.get_group_range() == sycl::range<2>(2, 2)); + assert(two_dim_nd_range.get_offset() == sycl::id<2>(0, 0)); cout << "two_dim_nd_range passed " << endl; - cl::sycl::nd_range<3> three_dim_nd_range({32, 64, 128}, {16, 32, 64} ); - assert(three_dim_nd_range.get_global_range() == cl::sycl::range<3>(32, 64, 128)); - assert(three_dim_nd_range.get_local_range() == cl::sycl::range<3>(16, 32, 64)); - assert(three_dim_nd_range.get_group_range() == cl::sycl::range<3>(2, 2, 2)); - assert(three_dim_nd_range.get_offset() == cl::sycl::id<3>(0, 0, 0)); + sycl::nd_range<3> three_dim_nd_range({32, 64, 128}, {16, 32, 64}); + assert(three_dim_nd_range.get_global_range() == sycl::range<3>(32, 64, 128)); + assert(three_dim_nd_range.get_local_range() == sycl::range<3>(16, 32, 64)); + assert(three_dim_nd_range.get_group_range() == sycl::range<3>(2, 2, 2)); + assert(three_dim_nd_range.get_offset() == sycl::id<3>(0, 0, 0)); cout << "three_dim_nd_range passed " << endl; } diff --git a/sycl/test/basic_tests/offset-accessor-get_pointer.cpp b/sycl/test/basic_tests/offset-accessor-get_pointer.cpp index 392f9cb1b2c91..e0b6941e4787e 100644 --- a/sycl/test/basic_tests/offset-accessor-get_pointer.cpp +++ b/sycl/test/basic_tests/offset-accessor-get_pointer.cpp @@ -13,7 +13,7 @@ #include #include -using namespace cl::sycl; +using namespace sycl; void test_across_ranges() { constexpr auto r_w = access::mode::read_write; @@ -110,4 +110,4 @@ int main() { std::cout << "OK!" << std::endl; return 0; -} \ No newline at end of file +} diff --git a/sycl/test/basic_tests/parallel_for_range_host.cpp b/sycl/test/basic_tests/parallel_for_range_host.cpp index 1f30952adfc5a..81f14ec55920a 100644 --- a/sycl/test/basic_tests/parallel_for_range_host.cpp +++ b/sycl/test/basic_tests/parallel_for_range_host.cpp @@ -5,7 +5,7 @@ #include -using namespace cl::sycl; +using namespace sycl; int main() { auto AsyncHandler = [](exception_list ES) { diff --git a/sycl/test/basic_tests/property_list.cpp b/sycl/test/basic_tests/property_list.cpp index 718343c15e057..d28b98cca9d2d 100644 --- a/sycl/test/basic_tests/property_list.cpp +++ b/sycl/test/basic_tests/property_list.cpp @@ -8,13 +8,13 @@ #include #include -namespace sycl_property = cl::sycl::property; +namespace sycl_property = sycl::property; int main() { bool Failed = false; { - cl::sycl::property_list Empty{}; + sycl::property_list Empty{}; if (Empty.has_property()) { std::cerr << "Error: empty property list has property." << std::endl; Failed = true; @@ -22,13 +22,13 @@ int main() { } { - cl::sycl::context SYCLContext; + sycl::context SYCLContext; sycl_property::buffer::context_bound ContextBound(SYCLContext); - cl::sycl::property_list SeveralProps{sycl_property::image::use_host_ptr(), - sycl_property::buffer::use_host_ptr(), - sycl_property::image::use_host_ptr(), - ContextBound}; + sycl::property_list SeveralProps{sycl_property::image::use_host_ptr(), + sycl_property::buffer::use_host_ptr(), + sycl_property::image::use_host_ptr(), + ContextBound}; if (!SeveralProps.has_property()) { std::cerr << "Error: property list has no property while should have." @@ -52,7 +52,7 @@ int main() { Failed = true; } - } catch (cl::sycl::invalid_object_error &Error) { + } catch (sycl::invalid_object_error &Error) { Error.what(); std::cerr << "Error: exception was thrown in get_property method." << std::endl; @@ -61,8 +61,7 @@ int main() { } { - cl::sycl::property_list MemChannelProp{ - sycl_property::buffer::mem_channel(2)}; + sycl::property_list MemChannelProp{sycl_property::buffer::mem_channel(2)}; if (!MemChannelProp.has_property()) { std::cerr << "Error: property list has no property while should have." << std::endl; diff --git a/sycl/test/basic_tests/property_traits.cpp b/sycl/test/basic_tests/property_traits.cpp index 9837aaa70ea5c..26e68a6df482b 100644 --- a/sycl/test/basic_tests/property_traits.cpp +++ b/sycl/test/basic_tests/property_traits.cpp @@ -43,7 +43,7 @@ class NotAProperty {}; class NotASYCLObject {}; -using namespace cl::sycl; +using namespace sycl; int main() { //---------------------------------------------------------------------------- diff --git a/sycl/test/basic_tests/range.cpp b/sycl/test/basic_tests/range.cpp index badb8c6406262..802a8cae92ac5 100644 --- a/sycl/test/basic_tests/range.cpp +++ b/sycl/test/basic_tests/range.cpp @@ -13,9 +13,9 @@ using namespace std; int main() { - cl::sycl::range<1> one_dim_range(64); - cl::sycl::range<2> two_dim_range(64, 1); - cl::sycl::range<3> three_dim_range(64, 1, 2); + sycl::range<1> one_dim_range(64); + sycl::range<2> two_dim_range(64, 1); + sycl::range<3> three_dim_range(64, 1, 2); assert(one_dim_range.size() ==64); assert(one_dim_range.get(0) ==64); assert(one_dim_range[0] ==64); @@ -35,12 +35,12 @@ int main() { assert(three_dim_range[2] ==2); cout << "three_dim_range passed " << endl; - cl::sycl::range<1> one_dim_range_neg(-64); - cl::sycl::range<1> one_dim_range_copy(64); - cl::sycl::range<2> two_dim_range_neg(-64, -1); - cl::sycl::range<2> two_dim_range_copy(64, 1); - cl::sycl::range<3> three_dim_range_copy(64, 1, 2); - cl::sycl::range<3> three_dim_range_neg(-64, -1, -2); + sycl::range<1> one_dim_range_neg(-64); + sycl::range<1> one_dim_range_copy(64); + sycl::range<2> two_dim_range_neg(-64, -1); + sycl::range<2> two_dim_range_copy(64, 1); + sycl::range<3> three_dim_range_copy(64, 1, 2); + sycl::range<3> three_dim_range_neg(-64, -1, -2); assert((+one_dim_range) == one_dim_range); assert(-one_dim_range == one_dim_range_neg); diff --git a/sycl/test/basic_tests/range_ctad.cpp b/sycl/test/basic_tests/range_ctad.cpp index 3014a5eaa9540..1bae49d49b589 100644 --- a/sycl/test/basic_tests/range_ctad.cpp +++ b/sycl/test/basic_tests/range_ctad.cpp @@ -11,22 +11,19 @@ using namespace std; int main() { - cl::sycl::range one_dim_range(64); - cl::sycl::range two_dim_range(64, 1); - cl::sycl::range three_dim_range(64, 1, 2); + sycl::range one_dim_range(64); + sycl::range two_dim_range(64, 1); + sycl::range three_dim_range(64, 1, 2); + static_assert(std::is_same>::value); + static_assert(std::is_same>::value); + static_assert(std::is_same>::value); + sycl::nd_range one_dim_ndrange(one_dim_range, one_dim_range); + sycl::nd_range two_dim_ndrange(two_dim_range, two_dim_range); + sycl::nd_range three_dim_ndrange(three_dim_range, three_dim_range); static_assert( - std::is_same>::value); + std::is_same>::value); static_assert( - std::is_same>::value); + std::is_same>::value); static_assert( - std::is_same>::value); - cl::sycl::nd_range one_dim_ndrange(one_dim_range, one_dim_range); - cl::sycl::nd_range two_dim_ndrange(two_dim_range, two_dim_range); - cl::sycl::nd_range three_dim_ndrange(three_dim_range, three_dim_range); - static_assert( - std::is_same>::value); - static_assert( - std::is_same>::value); - static_assert( - std::is_same>::value); + std::is_same>::value); } diff --git a/sycl/test/basic_tests/range_error.cpp b/sycl/test/basic_tests/range_error.cpp index 7efd1c6e2cb6d..283e7f7079aa0 100644 --- a/sycl/test/basic_tests/range_error.cpp +++ b/sycl/test/basic_tests/range_error.cpp @@ -5,9 +5,9 @@ using namespace std; int main() { - cl::sycl::range<1> one_dim_range(64); - cl::sycl::range<2> two_dim_range(64, 1); - cl::sycl::range<3> three_dim_range(64, 1, 2); + sycl::range<1> one_dim_range(64); + sycl::range<2> two_dim_range(64, 1); + sycl::range<3> three_dim_range(64, 1, 2); assert(one_dim_range.size() ==64); assert(one_dim_range.get(0) ==64); assert(one_dim_range[0] ==64); @@ -26,8 +26,8 @@ int main() { assert(three_dim_range.get(2) ==2); assert(three_dim_range[2] ==2); cout << "three_dim_range passed " << endl; - // expected-error@+1 {{no matching constructor for initialization of 'cl::sycl::range<1>'}} - cl::sycl::range<1> one_dim_range_f1(64, 2, 4); - // expected-error@+1 {{no matching constructor for initialization of 'cl::sycl::range<2>'}} - cl::sycl::range<2> two_dim_range_f1(64); + // expected-error@+1 {{no matching constructor for initialization of 'sycl::range<1>'}} + sycl::range<1> one_dim_range_f1(64, 2, 4); + // expected-error@+1 {{no matching constructor for initialization of 'sycl::range<2>'}} + sycl::range<2> two_dim_range_f1(64); } diff --git a/sycl/test/basic_tests/reduction_ctor.cpp b/sycl/test/basic_tests/reduction_ctor.cpp index 29dd1429d3270..cc564b0294467 100644 --- a/sycl/test/basic_tests/reduction_ctor.cpp +++ b/sycl/test/basic_tests/reduction_ctor.cpp @@ -8,7 +8,7 @@ #include #include -using namespace cl::sycl; +using namespace sycl; bool toBool(bool V) { return V; } bool toBool(vec V) { return V.x() && V.y(); } diff --git a/sycl/test/basic_tests/reduction_utils.hpp b/sycl/test/basic_tests/reduction_utils.hpp index f335262b4b639..88198d6cb146b 100644 --- a/sycl/test/basic_tests/reduction_utils.hpp +++ b/sycl/test/basic_tests/reduction_utils.hpp @@ -1,6 +1,6 @@ #include -using namespace cl::sycl; +using namespace sycl; // Initializes 'InBuf' buffer with pseudo-random values, computes the reduction // value for the buffer and writes it to 'ExpectedOut'. diff --git a/sycl/test/basic_tests/set_arg_error.cpp b/sycl/test/basic_tests/set_arg_error.cpp index 01c271687633c..90bda90bf0b6d 100644 --- a/sycl/test/basic_tests/set_arg_error.cpp +++ b/sycl/test/basic_tests/set_arg_error.cpp @@ -23,15 +23,15 @@ struct NonStdLayout { int main() { constexpr size_t size = 1; - cl::sycl::buffer buf(size); - cl::sycl::queue q; - q.submit([&](cl::sycl::handler &h) { - auto global_acc = buf.get_access(h); - cl::sycl::sampler samp(cl::sycl::coordinate_normalization_mode::normalized, - cl::sycl::addressing_mode::clamp, - cl::sycl::filtering_mode::nearest); - cl::sycl::accessor + sycl::buffer buf(size); + sycl::queue q; + q.submit([&](sycl::handler &h) { + auto global_acc = buf.get_access(h); + sycl::sampler samp(sycl::coordinate_normalization_mode::normalized, + sycl::addressing_mode::clamp, + sycl::filtering_mode::nearest); + sycl::accessor local_acc({size}, h); TriviallyCopyable tc{1, 2}; NonTriviallyCopyable ntc; diff --git a/sycl/test/basic_tests/spec_const_types.cpp b/sycl/test/basic_tests/spec_const_types.cpp index 481f930a8a5e7..add47f35bf1ca 100644 --- a/sycl/test/basic_tests/spec_const_types.cpp +++ b/sycl/test/basic_tests/spec_const_types.cpp @@ -38,65 +38,64 @@ class MyDoubleConst; int8_t get_value(); int main() { - cl::sycl::queue queue; - cl::sycl::program program(queue.get_context()); + sycl::queue queue; + sycl::program program(queue.get_context()); // Create specialization constants. - cl::sycl::ext::oneapi::experimental::spec_constant i1 = + sycl::ext::oneapi::experimental::spec_constant i1 = program.set_spec_constant((bool)get_value()); // CHECK-DAG: _ZTS11MyBoolConst=2| - cl::sycl::ext::oneapi::experimental::spec_constant i8 = + sycl::ext::oneapi::experimental::spec_constant i8 = program.set_spec_constant((int8_t)get_value()); // CHECK-DAG: _ZTS11MyInt8Const=2| - cl::sycl::ext::oneapi::experimental::spec_constant - ui8 = program.set_spec_constant((uint8_t)get_value()); + sycl::ext::oneapi::experimental::spec_constant ui8 = + program.set_spec_constant((uint8_t)get_value()); // CHECK-DAG: _ZTS12MyUInt8Const=2| - cl::sycl::ext::oneapi::experimental::spec_constant - i16 = program.set_spec_constant((int16_t)get_value()); + sycl::ext::oneapi::experimental::spec_constant i16 = + program.set_spec_constant((int16_t)get_value()); // CHECK-DAG: _ZTS12MyInt16Const=2| - cl::sycl::ext::oneapi::experimental::spec_constant - ui16 = program.set_spec_constant((uint16_t)get_value()); + sycl::ext::oneapi::experimental::spec_constant ui16 = + program.set_spec_constant((uint16_t)get_value()); // CHECK-DAG: _ZTS13MyUInt16Const=2| - cl::sycl::ext::oneapi::experimental::spec_constant - i32 = program.set_spec_constant((int32_t)get_value()); + sycl::ext::oneapi::experimental::spec_constant i32 = + program.set_spec_constant((int32_t)get_value()); // CHECK-DAG: _ZTS12MyInt32Const=2| - cl::sycl::ext::oneapi::experimental::spec_constant - ui32 = program.set_spec_constant((uint32_t)get_value()); + sycl::ext::oneapi::experimental::spec_constant ui32 = + program.set_spec_constant((uint32_t)get_value()); // CHECK-DAG: _ZTS13MyUInt32Const=2| - cl::sycl::ext::oneapi::experimental::spec_constant - i64 = program.set_spec_constant((int64_t)get_value()); + sycl::ext::oneapi::experimental::spec_constant i64 = + program.set_spec_constant((int64_t)get_value()); // CHECK-DAG: _ZTS12MyInt64Const=2| - cl::sycl::ext::oneapi::experimental::spec_constant - ui64 = program.set_spec_constant((uint64_t)get_value()); + sycl::ext::oneapi::experimental::spec_constant ui64 = + program.set_spec_constant((uint64_t)get_value()); // CHECK-DAG: _ZTS13MyUInt64Const=2| #define HALF 0 // TODO not yet supported #if HALF - cl::sycl::ext::oneapi::experimental::spec_constant - f16 = program.set_spec_constant((cl::sycl::half)get_value()); + sycl::ext::oneapi::experimental::spec_constant f16 = + program.set_spec_constant((sycl::half)get_value()); #endif - cl::sycl::ext::oneapi::experimental::spec_constant f32 = + sycl::ext::oneapi::experimental::spec_constant f32 = program.set_spec_constant((float)get_value()); // CHECK-DAG: _ZTS12MyFloatConst=2| - cl::sycl::ext::oneapi::experimental::spec_constant - f64 = program.set_spec_constant((double)get_value()); + sycl::ext::oneapi::experimental::spec_constant f64 = + program.set_spec_constant((double)get_value()); // CHECK-DAG: _ZTS13MyDoubleConst=2| program.build_with_kernel_type(); std::vector vec(1); { - cl::sycl::buffer buf(vec.data(), vec.size()); + sycl::buffer buf(vec.data(), vec.size()); - queue.submit([&](cl::sycl::handler &cgh) { - auto acc = buf.get_access(cgh); + queue.submit([&](sycl::handler &cgh) { + auto acc = buf.get_access(cgh); cgh.single_task( program.get_kernel(), [=]() { acc[0] = i1.get() + i8.get() + ui8.get() + i16.get() + ui16.get() + diff --git a/sycl/test/basic_tests/stdcpp_compat.cpp b/sycl/test/basic_tests/stdcpp_compat.cpp index d397028589327..754294503fc5e 100644 --- a/sycl/test/basic_tests/stdcpp_compat.cpp +++ b/sycl/test/basic_tests/stdcpp_compat.cpp @@ -28,7 +28,7 @@ int main() { sycl::queue Q; Q.submit([&](sycl::handler &CGH) { - auto Acc = Buf.get_access(CGH); + auto Acc = Buf.get_access(CGH); CGH.parallel_for(sycl::range<1>{42}, [=](sycl::id<1> ID) { (void)Acc; }); diff --git a/sycl/test/basic_tests/stream/no_intrinsic.cpp b/sycl/test/basic_tests/stream/no_intrinsic.cpp index e221b3409a586..41a3d36e233a0 100644 --- a/sycl/test/basic_tests/stream/no_intrinsic.cpp +++ b/sycl/test/basic_tests/stream/no_intrinsic.cpp @@ -15,7 +15,7 @@ #include -using namespace cl::sycl; +using namespace sycl; int main() { { diff --git a/sycl/test/basic_tests/sycl-kernel-save-user-names.cpp b/sycl/test/basic_tests/sycl-kernel-save-user-names.cpp index 0f021f16888e6..fa321447f0b67 100644 --- a/sycl/test/basic_tests/sycl-kernel-save-user-names.cpp +++ b/sycl/test/basic_tests/sycl-kernel-save-user-names.cpp @@ -16,31 +16,31 @@ struct NestedSimple { struct NestedComplex { int NestedComplexField; - cl::sycl::accessor NestedAccField; + sycl::accessor NestedAccField; }; struct KernelFunctor { int IntField; - cl::sycl::accessor AccField1; - cl::sycl::accessor AccField2; + sycl::accessor AccField1; + sycl::accessor AccField2; NestedSimple NestedSimpleObj; NestedComplex NestedComplexObj; void operator()() const {} }; int main() { - cl::sycl::queue q; + sycl::queue q; - q.submit([&](cl::sycl::handler &cgh) { + q.submit([&](sycl::handler &cgh) { KernelFunctor FunctorObj; cgh.single_task(FunctorObj); }); - q.submit([&](cl::sycl::handler &cgh) { + q.submit([&](sycl::handler &cgh) { int Data; NestedSimple NestedSimpleObj; NestedComplex NestedComplexObj; - cl::sycl::accessor CapturedAcc1, + sycl::accessor CapturedAcc1, CapturedAcc2; cgh.single_task([=]() { Data; diff --git a/sycl/test/basic_tests/types.cpp b/sycl/test/basic_tests/types.cpp index d4a65322b3687..8ff93f677574d 100644 --- a/sycl/test/basic_tests/types.cpp +++ b/sycl/test/basic_tests/types.cpp @@ -14,7 +14,7 @@ #include using namespace std; -namespace s = cl::sycl; +namespace s = sycl; template inline void checkVectorSizeAndAlignment() { using VectorT = s::vec; diff --git a/sycl/test/basic_tests/valid_kernel_args.cpp b/sycl/test/basic_tests/valid_kernel_args.cpp index f00d14c544ec7..12f280df56bf1 100644 --- a/sycl/test/basic_tests/valid_kernel_args.cpp +++ b/sycl/test/basic_tests/valid_kernel_args.cpp @@ -24,18 +24,18 @@ struct SomeStructure { }; struct SomeMarrayStructure { - cl::sycl::marray points; + sycl::marray points; }; #define CHECK_PASSING_TO_KERNEL_BY_VALUE(Type) \ static_assert(std::is_standard_layout::value, \ - "Is not standard layouti type."); \ + "Is not standard layouti type."); \ static_assert(std::is_trivially_copyable::value, \ "Is not trivially copyable type."); #ifdef __SYCL_DEVICE_ONLY__ CHECK_PASSING_TO_KERNEL_BY_VALUE(int) -CHECK_PASSING_TO_KERNEL_BY_VALUE(cl::sycl::cl_uchar4) +CHECK_PASSING_TO_KERNEL_BY_VALUE(sycl::cl_uchar4) CHECK_PASSING_TO_KERNEL_BY_VALUE(SomeStructure) #endif CHECK_PASSING_TO_KERNEL_BY_VALUE(SomeMarrayStructure) diff --git a/sycl/test/basic_tests/vector_cross.cpp b/sycl/test/basic_tests/vector_cross.cpp index 5bef47fa19457..e6938f2618528 100644 --- a/sycl/test/basic_tests/vector_cross.cpp +++ b/sycl/test/basic_tests/vector_cross.cpp @@ -10,21 +10,21 @@ bool isEqualTo(double x, double y, double epsilon = 0.001) { } int main(int argc, const char **argv) { - cl::sycl::cl_double4 r{0}; + sycl::cl_double4 r{0}; { - cl::sycl::buffer BufR(&r, cl::sycl::range<1>(1)); - cl::sycl::queue myQueue; - myQueue.submit([&](cl::sycl::handler &cgh) { - auto AccR = BufR.get_access(cgh); + sycl::buffer BufR(&r, sycl::range<1>(1)); + sycl::queue myQueue; + myQueue.submit([&](sycl::handler &cgh) { + auto AccR = BufR.get_access(cgh); cgh.single_task([=]() { - AccR[0] = cl::sycl::cross( - cl::sycl::cl_double4{ + AccR[0] = sycl::cross( + sycl::cl_double4{ 2.5, 3.0, 4.0, 0.0, }, - cl::sycl::cl_double4{ + sycl::cl_double4{ 5.2, 6.0, 7.0, @@ -33,10 +33,10 @@ int main(int argc, const char **argv) { }); }); } - cl::sycl::cl_double r1 = r.x(); - cl::sycl::cl_double r2 = r.y(); - cl::sycl::cl_double r3 = r.z(); - cl::sycl::cl_double r4 = r.w(); + sycl::cl_double r1 = r.x(); + sycl::cl_double r2 = r.y(); + sycl::cl_double r3 = r.z(); + sycl::cl_double r4 = r.w(); assert(isEqualTo(r1, -3.0)); assert(isEqualTo(r2, 3.3)); diff --git a/sycl/test/basic_tests/vectors/ctad.cpp b/sycl/test/basic_tests/vectors/ctad.cpp index dcfa6805a09f1..c98fad77656a6 100644 --- a/sycl/test/basic_tests/vectors/ctad.cpp +++ b/sycl/test/basic_tests/vectors/ctad.cpp @@ -9,8 +9,6 @@ //===----------------------------------------------------------------------===// #include -namespace sycl = cl::sycl; - int main() { sycl::vec v1(1); static_assert(std::is_same>::value); diff --git a/sycl/test/check_device_code/buffer_location_codegen.cpp b/sycl/test/check_device_code/buffer_location_codegen.cpp index d52515d0ee566..facb2277adeb7 100644 --- a/sycl/test/check_device_code/buffer_location_codegen.cpp +++ b/sycl/test/check_device_code/buffer_location_codegen.cpp @@ -7,32 +7,31 @@ struct Base { int A, B; - cl::sycl::accessor< - char, 1, cl::sycl::access::mode::read, cl::sycl::access::target::device, - cl::sycl::access::placeholder::false_t, - cl::sycl::ext::oneapi::accessor_property_list< - cl::sycl::ext::intel::property::buffer_location::instance<2>>> + sycl::accessor>> AccField; }; struct Captured : Base, - cl::sycl::accessor< - char, 1, cl::sycl::access::mode::read, - cl::sycl::access::target::device, - cl::sycl::access::placeholder::false_t, - cl::sycl::ext::oneapi::accessor_property_list< - cl::sycl::ext::intel::property::buffer_location::instance<2>>> { + sycl::accessor< + char, 1, sycl::access::mode::read, sycl::access::target::device, + sycl::access::placeholder::false_t, + sycl::ext::oneapi::accessor_property_list< + sycl::ext::intel::property::buffer_location::instance<2>>> { int C; }; int main() { Captured Obj; - cl::sycl::accessor< - int, 1, cl::sycl::access::mode::read_write, - cl::sycl::access::target::device, cl::sycl::access::placeholder::false_t, - cl::sycl::ext::oneapi::accessor_property_list< - cl::sycl::ext::intel::property::buffer_location::instance<3>>> + sycl::accessor>> accessorA; sycl::queue Queue; Queue.submit([&](sycl::handler &CGH) { diff --git a/sycl/test/check_device_code/kernel_arguments_as.cpp b/sycl/test/check_device_code/kernel_arguments_as.cpp index 7bb342827db77..7674ccaddf63c 100644 --- a/sycl/test/check_device_code/kernel_arguments_as.cpp +++ b/sycl/test/check_device_code/kernel_arguments_as.cpp @@ -18,26 +18,26 @@ #include -using namespace cl::sycl; +using namespace sycl; template struct AccWrapper { Acc accessor; }; int main() { - cl::sycl::queue queue; + sycl::queue queue; int array[10] = {0}; { - cl::sycl::buffer buf((int *)array, cl::sycl::range<1>(10), - {cl::sycl::property::buffer::use_host_ptr()}); - queue.submit([&](cl::sycl::handler &cgh) { - auto acc = buf.get_access(cgh); - cl::sycl::accessor - local_acc(cl::sycl::range<1>(10), cgh); + sycl::buffer buf((int *)array, sycl::range<1>(10), + {sycl::property::buffer::use_host_ptr()}); + queue.submit([&](sycl::handler &cgh) { + auto acc = buf.get_access(cgh); + sycl::accessor + local_acc(sycl::range<1>(10), cgh); auto acc_wrapped = AccWrapper{acc}; auto local_acc_wrapped = AccWrapper{local_acc}; cgh.parallel_for( - cl::sycl::range<1>(buf.size()), [=](cl::sycl::item<1> it) { + sycl::range<1>(buf.size()), [=](sycl::item<1> it) { auto idx = it.get_linear_id(); acc_wrapped.accessor[idx] = local_acc_wrapped.accessor[idx]; }); diff --git a/sycl/test/check_device_code/usm_pointers.cpp b/sycl/test/check_device_code/usm_pointers.cpp index 7a597fc2e4e9b..fbd005f47afb1 100644 --- a/sycl/test/check_device_code/usm_pointers.cpp +++ b/sycl/test/check_device_code/usm_pointers.cpp @@ -28,12 +28,12 @@ #include -using namespace cl::sycl; +using namespace sycl; int main() { - cl::sycl::queue queue; + sycl::queue queue; { - queue.submit([&](cl::sycl::handler &cgh) { + queue.submit([&](sycl::handler &cgh) { cgh.single_task([=]() { void *Ptr = nullptr; device_ptr DevPtr(Ptr); diff --git a/sycl/test/esimd/block_load_store.cpp b/sycl/test/esimd/block_load_store.cpp index fbd529c15b183..2e4f3608d557f 100644 --- a/sycl/test/esimd/block_load_store.cpp +++ b/sycl/test/esimd/block_load_store.cpp @@ -8,7 +8,7 @@ #include using namespace sycl::ext::intel::esimd; -using namespace cl::sycl; +using namespace sycl; SYCL_EXTERNAL void kernel1(accessor &buf) diff --git a/sycl/test/esimd/check_lsc.cpp b/sycl/test/esimd/check_lsc.cpp index e5898829e4c6d..3277de9a38a05 100644 --- a/sycl/test/esimd/check_lsc.cpp +++ b/sycl/test/esimd/check_lsc.cpp @@ -13,7 +13,7 @@ using namespace sycl::ext::intel::esimd; using namespace sycl::ext::intel::experimental::esimd; -using namespace cl::sycl; +using namespace sycl; // --- Postive tests. diff --git a/sycl/test/esimd/esimd_merge.cpp b/sycl/test/esimd/esimd_merge.cpp index a2f4841d9e12a..dc3662a5fdb82 100644 --- a/sycl/test/esimd/esimd_merge.cpp +++ b/sycl/test/esimd/esimd_merge.cpp @@ -5,7 +5,7 @@ using namespace sycl::ext::intel::esimd; using namespace sycl::ext::intel; -using namespace cl::sycl; +using namespace sycl; using simd_mask_elem_t = simd_mask<1>::element_type; diff --git a/sycl/test/esimd/esimd_verify.cpp b/sycl/test/esimd/esimd_verify.cpp index 1e27959fd9722..405bef6a2e309 100644 --- a/sycl/test/esimd/esimd_verify.cpp +++ b/sycl/test/esimd/esimd_verify.cpp @@ -4,7 +4,7 @@ #include #include -using namespace cl::sycl; +using namespace sycl; using namespace sycl::ext::intel::esimd; // CHECK-DAG: error: function 'cl::sycl::multi_ptr<{{.+}}> cl::sycl::accessor<{{.+}}>::get_pointer<{{.+}}>() const' is not supported in ESIMD context diff --git a/sycl/test/esimd/flat_atomic.cpp b/sycl/test/esimd/flat_atomic.cpp index 78f0cf7845ef7..410625bcf8cac 100644 --- a/sycl/test/esimd/flat_atomic.cpp +++ b/sycl/test/esimd/flat_atomic.cpp @@ -8,7 +8,7 @@ #include using namespace sycl::ext::intel::esimd; -using namespace cl::sycl; +using namespace sycl; void kernel0(uint32_t *ptr) SYCL_ESIMD_FUNCTION { simd offsets(0, 1); diff --git a/sycl/test/esimd/gather_scatter.cpp b/sycl/test/esimd/gather_scatter.cpp index e3a93fc7d3291..2fcf887def97e 100644 --- a/sycl/test/esimd/gather_scatter.cpp +++ b/sycl/test/esimd/gather_scatter.cpp @@ -7,7 +7,7 @@ #include using namespace sycl::ext::intel::esimd; -using namespace cl::sycl; +using namespace sycl; void kernel( accessor &buf) diff --git a/sycl/test/esimd/gather_scatter_rgba.cpp b/sycl/test/esimd/gather_scatter_rgba.cpp index e481b2d5b1d76..155500c49f788 100644 --- a/sycl/test/esimd/gather_scatter_rgba.cpp +++ b/sycl/test/esimd/gather_scatter_rgba.cpp @@ -11,7 +11,7 @@ #include using namespace sycl::ext::intel::esimd; -using namespace cl::sycl; +using namespace sycl; void kernel(int *ptr) SYCL_ESIMD_FUNCTION { simd offsets(0, sizeof(int) * 4); diff --git a/sycl/test/esimd/global_var.cpp b/sycl/test/esimd/global_var.cpp index c24439ff7bdc8..7c10f04c8a618 100644 --- a/sycl/test/esimd/global_var.cpp +++ b/sycl/test/esimd/global_var.cpp @@ -3,7 +3,7 @@ #include #include -using namespace cl::sycl; +using namespace sycl; // This test checks usage of an ESIMD global in ESIMD(positive) and // SYCL(negative) contexts. @@ -30,7 +30,7 @@ SYCL_EXTERNAL void init_vc_sycl(int x) { void kernel_call() { queue q; - q.submit([&](cl::sycl::handler &cgh) { + q.submit([&](sycl::handler &cgh) { cgh.parallel_for(nd_range<1>(1, 1), [=](nd_item<1> ndi) SYCL_ESIMD_KERNEL { // ESIMD kernel is allowed to use ESIMD @@ -40,7 +40,7 @@ void kernel_call() { }); }); - q.submit([&](cl::sycl::handler &cgh) { + q.submit([&](sycl::handler &cgh) { cgh.parallel_for(nd_range<1>(1, 1), [=](nd_item<1> ndi) { //expected-note@sycl/handler.hpp:* 2{{called by 'kernel_parallel_for}} //expected-error@+1{{ESIMD globals cannot be used in a SYCL context}} diff --git a/sycl/test/esimd/hw_compile.cpp b/sycl/test/esimd/hw_compile.cpp index cc52edc60299c..c0c4720cfcdde 100644 --- a/sycl/test/esimd/hw_compile.cpp +++ b/sycl/test/esimd/hw_compile.cpp @@ -12,15 +12,15 @@ int main(void) { int C[Size]; { - cl::sycl::range<1> UnitRange{1}; - cl::sycl::buffer bufA(A, UnitRange); - cl::sycl::buffer bufB(B, UnitRange); - cl::sycl::buffer bufC(C, UnitRange); + sycl::range<1> UnitRange{1}; + sycl::buffer bufA(A, UnitRange); + sycl::buffer bufB(B, UnitRange); + sycl::buffer bufC(C, UnitRange); - cl::sycl::queue().submit([&](cl::sycl::handler &cgh) { - auto accA = bufA.get_access(cgh); - auto accB = bufB.get_access(cgh); - auto accC = bufC.get_access(cgh); + sycl::queue().submit([&](sycl::handler &cgh) { + auto accA = bufA.get_access(cgh); + auto accB = bufB.get_access(cgh); + auto accC = bufC.get_access(cgh); cgh.parallel_for( UnitRange * UnitRange, [=](sycl::id<1> i) SYCL_ESIMD_KERNEL { @@ -28,11 +28,9 @@ int main(void) { // those operations below would normally be // represented as a single vector operation // through ESIMD vector - cl::sycl::ext::intel::esimd::simd A(accA, - off * sizeof(int)); - cl::sycl::ext::intel::esimd::simd B(accB, - off * sizeof(int)); - cl::sycl::ext::intel::esimd::simd C = A + B; + sycl::ext::intel::esimd::simd A(accA, off * sizeof(int)); + sycl::ext::intel::esimd::simd B(accB, off * sizeof(int)); + sycl::ext::intel::esimd::simd C = A + B; C.copy_to(accC, off * sizeof(int)); }); }); diff --git a/sycl/test/esimd/intrins_trans.cpp b/sycl/test/esimd/intrins_trans.cpp index 13c238aaacfbb..2a7bc6600171a 100644 --- a/sycl/test/esimd/intrins_trans.cpp +++ b/sycl/test/esimd/intrins_trans.cpp @@ -84,13 +84,13 @@ SYCL_ESIMD_FUNCTION SYCL_EXTERNAL simd foo() { simd c(0.0f); - using PH = cl::sycl::access::placeholder; + using PH = sycl::access::placeholder; - cl::sycl::accessor + sycl::accessor pA; - cl::sycl::accessor + sycl::accessor pB; auto d = __esimd_wrregion #include -using namespace cl::sycl; +using namespace sycl; using namespace sycl::ext::intel::esimd; // Wrapper for designating a scalar region of code that will be diff --git a/sycl/test/esimd/lower-external-funcs.cpp b/sycl/test/esimd/lower-external-funcs.cpp index 2ed2767320e7b..b8f553c9e8d00 100644 --- a/sycl/test/esimd/lower-external-funcs.cpp +++ b/sycl/test/esimd/lower-external-funcs.cpp @@ -10,7 +10,7 @@ #include constexpr unsigned VL = 8; -using namespace cl::sycl; +using namespace sycl; using namespace sycl::ext::intel::esimd; extern "C" SYCL_EXTERNAL SYCL_ESIMD_FUNCTION void vmult2(simd a) { int i = __spirv_GlobalInvocationId_x(); diff --git a/sycl/test/esimd/math_impl.cpp b/sycl/test/esimd/math_impl.cpp index 6bd3a8101f712..44901f7d04195 100644 --- a/sycl/test/esimd/math_impl.cpp +++ b/sycl/test/esimd/math_impl.cpp @@ -7,7 +7,7 @@ #include #include -using namespace cl::sycl; +using namespace sycl; using namespace sycl::ext::intel; using namespace sycl::ext::intel::esimd; diff --git a/sycl/test/esimd/odr.cpp b/sycl/test/esimd/odr.cpp index c857ef276a349..334b2c8b37ae3 100644 --- a/sycl/test/esimd/odr.cpp +++ b/sycl/test/esimd/odr.cpp @@ -15,7 +15,7 @@ #include #include -using namespace cl::sycl; +using namespace sycl; using namespace sycl::ext::intel; using namespace sycl::ext::intel::esimd; @@ -43,7 +43,7 @@ int main() { }); q.wait(); run_kernel2(q, data); - } catch (cl::sycl::exception const &e) { + } catch (sycl::exception const &e) { std::cout << "SYCL exception caught: " << e.what() << '\n'; return 2; } @@ -73,7 +73,7 @@ void run_kernel2(queue &q, int *data) { }); }); q.wait(); - } catch (cl::sycl::exception const &e) { + } catch (sycl::exception const &e) { std::cout << "SYCL exception caught: " << e.what() << '\n'; } } diff --git a/sycl/test/esimd/simd_copy_align_flags.cpp b/sycl/test/esimd/simd_copy_align_flags.cpp index 86e708b1fe1fa..efd1c9646e9ec 100644 --- a/sycl/test/esimd/simd_copy_align_flags.cpp +++ b/sycl/test/esimd/simd_copy_align_flags.cpp @@ -7,7 +7,7 @@ #include using namespace sycl::ext::intel::esimd; -using namespace cl::sycl; +using namespace sycl; // simd constructor template diff --git a/sycl/test/esimd/simd_copy_to_copy_from.cpp b/sycl/test/esimd/simd_copy_to_copy_from.cpp index 8a8f4b3d835cb..d79b825c2fa6f 100644 --- a/sycl/test/esimd/simd_copy_to_copy_from.cpp +++ b/sycl/test/esimd/simd_copy_to_copy_from.cpp @@ -12,7 +12,7 @@ #include using namespace sycl::ext::intel::esimd; -using namespace cl::sycl; +using namespace sycl; // --- Postive tests. diff --git a/sycl/test/esimd/simd_mask.cpp b/sycl/test/esimd/simd_mask.cpp index 07a4594bf7a11..dad3e47d0a6f7 100644 --- a/sycl/test/esimd/simd_mask.cpp +++ b/sycl/test/esimd/simd_mask.cpp @@ -11,7 +11,7 @@ #include using namespace sycl::ext::intel::esimd; -using namespace cl::sycl; +using namespace sycl; #define DEFINE_BIN_OP_TEST(op, name) \ template \ diff --git a/sycl/test/esimd/slm_atomic.cpp b/sycl/test/esimd/slm_atomic.cpp index f8e778d97b50b..6b1e335382741 100644 --- a/sycl/test/esimd/slm_atomic.cpp +++ b/sycl/test/esimd/slm_atomic.cpp @@ -8,7 +8,7 @@ #include using namespace sycl::ext::intel::esimd; -using namespace cl::sycl; +using namespace sycl; void kernel0() SYCL_ESIMD_FUNCTION { simd offsets(0, 1); diff --git a/sycl/test/esimd/slm_block.cpp b/sycl/test/esimd/slm_block.cpp index 35a8964b77f2d..13a470cdd6678 100644 --- a/sycl/test/esimd/slm_block.cpp +++ b/sycl/test/esimd/slm_block.cpp @@ -7,7 +7,7 @@ #include using namespace sycl::ext::intel::esimd; -using namespace cl::sycl; +using namespace sycl; void kernel() __attribute__((sycl_device)) { simd v1(0, 1); diff --git a/sycl/test/esimd/slm_gather_scatter.cpp b/sycl/test/esimd/slm_gather_scatter.cpp index 6d565a8407e66..d711dd4fc2e6c 100644 --- a/sycl/test/esimd/slm_gather_scatter.cpp +++ b/sycl/test/esimd/slm_gather_scatter.cpp @@ -8,7 +8,7 @@ using namespace sycl::ext::intel; using namespace sycl::ext::intel::esimd; -using namespace cl::sycl; +using namespace sycl; void kernel() __attribute__((sycl_device)) { simd offsets(0, sizeof(int)); diff --git a/sycl/test/esimd/slm_gather_scatter_rgba.cpp b/sycl/test/esimd/slm_gather_scatter_rgba.cpp index 4274d0ec48295..3050b2cf4d27a 100644 --- a/sycl/test/esimd/slm_gather_scatter_rgba.cpp +++ b/sycl/test/esimd/slm_gather_scatter_rgba.cpp @@ -5,7 +5,7 @@ #include using namespace sycl::ext::intel::esimd; -using namespace cl::sycl; +using namespace sycl; void caller() SYCL_ESIMD_FUNCTION { simd offsets(0, sizeof(int) * 4); diff --git a/sycl/test/esimd/spirv_intrins_trans.cpp b/sycl/test/esimd/spirv_intrins_trans.cpp index 7d976611971ef..e5edd5ddb2cab 100644 --- a/sycl/test/esimd/spirv_intrins_trans.cpp +++ b/sycl/test/esimd/spirv_intrins_trans.cpp @@ -20,7 +20,7 @@ size_t caller() { uint32_t DoNotOpt32[1]; size_t DoNotOptXYZ[3]; - cl::sycl::queue().submit([&](cl::sycl::handler &cgh) { + sycl::queue().submit([&](sycl::handler &cgh) { auto DoNotOptimize = &DoNotOpt[0]; auto DoNotOptimize32 = &DoNotOpt32[0]; diff --git a/sycl/test/esimd/vadd.cpp b/sycl/test/esimd/vadd.cpp index 0b97aabe75be0..af8c82c4020d2 100644 --- a/sycl/test/esimd/vadd.cpp +++ b/sycl/test/esimd/vadd.cpp @@ -15,7 +15,7 @@ #include #include -using namespace cl::sycl; +using namespace sycl; class ESIMDSelector : public device_selector { // Require GPU device unless HOST is requested in SYCL_DEVICE_FILTER env @@ -41,7 +41,7 @@ auto exception_handler = [](exception_list l) { for (auto ep : l) { try { std::rethrow_exception(ep); - } catch (cl::sycl::exception &e0) { + } catch (sycl::exception &e0) { std::cout << "sycl::exception: " << e0.what() << std::endl; } catch (std::exception &e) { std::cout << "std::exception: " << e.what() << std::endl; @@ -84,14 +84,14 @@ int main(void) { { // We need that many task groups - cl::sycl::range<1> GroupRange{Size / VL}; + sycl::range<1> GroupRange{Size / VL}; // We need that many tasks in each group - cl::sycl::range<1> TaskRange{GroupSize}; + sycl::range<1> TaskRange{GroupSize}; - cl::sycl::nd_range<1> Range{GroupRange, TaskRange}; + sycl::nd_range<1> Range{GroupRange, TaskRange}; - q.submit([&](cl::sycl::handler &cgh) { + q.submit([&](sycl::handler &cgh) { cgh.parallel_for( Range, [=](nd_item<1> ndi) SYCL_ESIMD_KERNEL { using namespace sycl::ext::intel::esimd; diff --git a/sycl/test/extensions/bfloat16.cpp b/sycl/test/extensions/bfloat16.cpp index 847be9508bdb5..3666b32177116 100644 --- a/sycl/test/extensions/bfloat16.cpp +++ b/sycl/test/extensions/bfloat16.cpp @@ -53,11 +53,11 @@ __attribute__((noinline)) float op(float a, float b) { int main(int argc, char *argv[]) { float data[3] = {7.0, 8.1, 0.0}; - cl::sycl::queue deviceQueue; - cl::sycl::buffer buf{data, cl::sycl::range<1>{3}}; + sycl::queue deviceQueue; + sycl::buffer buf{data, sycl::range<1>{3}}; - deviceQueue.submit([&](cl::sycl::handler &cgh) { - auto numbers = buf.get_access(cgh); + deviceQueue.submit([&](sycl::handler &cgh) { + auto numbers = buf.get_access(cgh); cgh.single_task( [=]() { numbers[2] = op(numbers[0], numbers[1]); }); }); diff --git a/sycl/test/extensions/fpga.cpp b/sycl/test/extensions/fpga.cpp index be9963f45847c..14f2ca09de8aa 100644 --- a/sycl/test/extensions/fpga.cpp +++ b/sycl/test/extensions/fpga.cpp @@ -10,23 +10,23 @@ template struct ethernet_pipe_id { static constexpr unsigned id = ID; }; -template -void lsu_body(cl::sycl::multi_ptr input_ptr, - cl::sycl::multi_ptr output_ptr) { +template +void lsu_body(sycl::multi_ptr input_ptr, + sycl::multi_ptr output_ptr) { using PrefetchingLSU = - cl::sycl::ext::intel::lsu, - cl::sycl::ext::intel::statically_coalesce>; + sycl::ext::intel::lsu, + sycl::ext::intel::statically_coalesce>; using BurstCoalescedLSU = - cl::sycl::ext::intel::lsu, - cl::sycl::ext::intel::statically_coalesce>; + sycl::ext::intel::lsu, + sycl::ext::intel::statically_coalesce>; using CachingLSU = - cl::sycl::ext::intel::lsu, - cl::sycl::ext::intel::cache<1024>, - cl::sycl::ext::intel::statically_coalesce>; + sycl::ext::intel::lsu, + sycl::ext::intel::cache<1024>, + sycl::ext::intel::statically_coalesce>; - using PipelinedLSU = cl::sycl::ext::intel::lsu<>; + using PipelinedLSU = sycl::ext::intel::lsu<>; int X = PrefetchingLSU::load(input_ptr); // int X = input_ptr[0] int Y = CachingLSU::load(input_ptr + 1); // int Y = input_ptr[1] @@ -63,15 +63,15 @@ int main() { /*Check FPGA-related device parameters*/ if (!Queue.get_device() - .get_info()) { + .get_info()) { std::cout << "SYCL_INTEL_data_flow_pipes not supported, skipping" << std::endl; return 0; } /*Check pipes interfaces*/ - Queue.submit([&](cl::sycl::handler &cgh) { - auto write_acc = Buf.get_access(cgh); + Queue.submit([&](sycl::handler &cgh) { + auto write_acc = Buf.get_access(cgh); cgh.single_task([=]() { write_acc[0] = intelfpga::ethernet_read_pipe::read(); @@ -79,9 +79,9 @@ int main() { }); }); - using Pipe = cl::sycl::ext::intel::pipe; - cl::sycl::buffer readBuf(1); - Queue.submit([&](cl::sycl::handler &cgh) { + using Pipe = sycl::ext::intel::pipe; + sycl::buffer readBuf(1); + Queue.submit([&](sycl::handler &cgh) { cgh.single_task([=]() { bool SuccessCode = false; do { @@ -94,39 +94,39 @@ int main() { { { - auto *out_ptr = cl::sycl::malloc_host(1, Queue.get_context()); - auto *in_ptr = cl::sycl::malloc_host(1, Queue.get_context()); + auto *out_ptr = sycl::malloc_host(1, Queue.get_context()); + auto *in_ptr = sycl::malloc_host(1, Queue.get_context()); Queue.submit([&](sycl::handler &cgh) { cgh.single_task([=]() { - cl::sycl::host_ptr input_ptr(in_ptr); - cl::sycl::host_ptr output_ptr(out_ptr); - intelfpga::lsu_body< - int, cl::sycl::access::address_space::global_host_space>( + sycl::host_ptr input_ptr(in_ptr); + sycl::host_ptr output_ptr(out_ptr); + intelfpga::lsu_body( input_ptr, output_ptr); }); }); } { - auto *out_ptr = cl::sycl::malloc_device(1, Queue); - auto *in_ptr = cl::sycl::malloc_device(1, Queue); + auto *out_ptr = sycl::malloc_device(1, Queue); + auto *in_ptr = sycl::malloc_device(1, Queue); Queue.submit([&](sycl::handler &cgh) { cgh.single_task([=]() { - cl::sycl::device_ptr input_ptr(in_ptr); - cl::sycl::device_ptr output_ptr(out_ptr); - intelfpga::lsu_body< - int, cl::sycl::access::address_space::global_device_space>( + sycl::device_ptr input_ptr(in_ptr); + sycl::device_ptr output_ptr(out_ptr); + intelfpga::lsu_body( input_ptr, output_ptr); }); }); } { - cl::sycl::buffer output_buffer(1); - cl::sycl::buffer input_buffer(1); + sycl::buffer output_buffer(1); + sycl::buffer input_buffer(1); Queue.submit([&](sycl::handler &cgh) { auto output_accessor = - output_buffer.get_access(cgh); + output_buffer.get_access(cgh); auto input_accessor = - input_buffer.get_access(cgh); + input_buffer.get_access(cgh); cgh.single_task([=]() { auto input_ptr = input_accessor.get_pointer(); auto output_ptr = output_accessor.get_pointer(); @@ -137,13 +137,13 @@ int main() { } /*Check DSP control interface*/ - cl::sycl::buffer output_buffer(1); - cl::sycl::buffer input_buffer(1); + sycl::buffer output_buffer(1); + sycl::buffer input_buffer(1); Queue.submit([&](sycl::handler &cgh) { auto output_accessor = - output_buffer.get_access(cgh); + output_buffer.get_access(cgh); auto input_accessor = - input_buffer.get_access(cgh); + input_buffer.get_access(cgh); cgh.single_task([=]() { float sum = input_accessor[0]; sycl::ext::intel::math_dsp_control< diff --git a/sycl/test/extensions/sub_group_as.cpp b/sycl/test/extensions/sub_group_as.cpp index 9d836686e8238..ec8fb0a974bae 100644 --- a/sycl/test/extensions/sub_group_as.cpp +++ b/sycl/test/extensions/sub_group_as.cpp @@ -9,9 +9,9 @@ #include int main(int argc, char *argv[]) { - cl::sycl::queue queue; + sycl::queue queue; printf("Device Name = %s\n", - queue.get_device().get_info().c_str()); + queue.get_device().get_info().c_str()); // Initialize some host memory constexpr int N = 64; @@ -22,22 +22,22 @@ int main(int argc, char *argv[]) { // Use the device to transform each value { - cl::sycl::buffer buf(host_mem, N); - queue.submit([&](cl::sycl::handler &cgh) { - auto global = buf.get_access(cgh); + sycl::buffer buf(host_mem, N); + queue.submit([&](sycl::handler &cgh) { + auto global = buf.get_access(cgh); sycl::accessor local(N, cgh); cgh.parallel_for( - cl::sycl::nd_range<1>(N, 32), [=](cl::sycl::nd_item<1> it) { + sycl::nd_range<1>(N, 32), [=](sycl::nd_item<1> it) { int v[N] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}; - cl::sycl::ext::oneapi::sub_group sg = it.get_sub_group(); + sycl::ext::oneapi::sub_group sg = it.get_sub_group(); if (!it.get_local_id(0)) { int end = it.get_global_id(0) + it.get_local_range()[0]; for (int i = it.get_global_id(0); i < end; i++) { diff --git a/sycl/test/extensions/usm/usm_alloc_utility.cpp b/sycl/test/extensions/usm/usm_alloc_utility.cpp index b51dc0543cd52..7c587df097b2b 100644 --- a/sycl/test/extensions/usm/usm_alloc_utility.cpp +++ b/sycl/test/extensions/usm/usm_alloc_utility.cpp @@ -13,7 +13,7 @@ #include -using namespace cl::sycl; +using namespace sycl; constexpr int N = 8; diff --git a/sycl/test/extensions/usm/usm_allocator.cpp b/sycl/test/extensions/usm/usm_allocator.cpp index b372fb6c5c2d7..7890673740809 100644 --- a/sycl/test/extensions/usm/usm_allocator.cpp +++ b/sycl/test/extensions/usm/usm_allocator.cpp @@ -13,7 +13,7 @@ #include -using namespace cl::sycl; +using namespace sycl; int main() { queue q; diff --git a/sycl/test/gdb/accessors-device.cpp b/sycl/test/gdb/accessors-device.cpp index 06b9515d64121..b0aaf7e9d43ff 100644 --- a/sycl/test/gdb/accessors-device.cpp +++ b/sycl/test/gdb/accessors-device.cpp @@ -2,7 +2,7 @@ // UNSUPPORTED: windows #include -typedef cl::sycl::accessor dummy; +typedef sycl::accessor dummy; // AccessorImplDevice must have MemRange and Offset fields diff --git a/sycl/test/gdb/accessors.cpp b/sycl/test/gdb/accessors.cpp index 388a1d20d4cd5..8bb2cb3f67099 100644 --- a/sycl/test/gdb/accessors.cpp +++ b/sycl/test/gdb/accessors.cpp @@ -2,7 +2,7 @@ // UNSUPPORTED: windows #include -typedef cl::sycl::accessor dummy; +typedef sycl::accessor dummy; // AccessorImplHost must have MMemoryRange, MOffset and MData fields diff --git a/sycl/test/gdb/printers.cpp b/sycl/test/gdb/printers.cpp index fca7b68653707..7784f05e648e0 100644 --- a/sycl/test/gdb/printers.cpp +++ b/sycl/test/gdb/printers.cpp @@ -3,8 +3,8 @@ #include #include -typedef cl::sycl::id<1> dummy_id; -typedef cl::sycl::buffer dummy_buffer; +typedef sycl::id<1> dummy_id; +typedef sycl::buffer dummy_buffer; // array must have common_array field diff --git a/sycl/test/gdb/private-memory-device.cpp b/sycl/test/gdb/private-memory-device.cpp index 24f4170cdc81c..5fc476a002363 100644 --- a/sycl/test/gdb/private-memory-device.cpp +++ b/sycl/test/gdb/private-memory-device.cpp @@ -3,7 +3,7 @@ #include #include -typedef cl::sycl::private_memory, 1> dummy; +typedef sycl::private_memory, 1> dummy; // private_memory must have Val field of T type diff --git a/sycl/test/gdb/private-memory.cpp b/sycl/test/gdb/private-memory.cpp index c5784cf0ba226..4bb70f9233978 100644 --- a/sycl/test/gdb/private-memory.cpp +++ b/sycl/test/gdb/private-memory.cpp @@ -3,7 +3,7 @@ #include #include -typedef cl::sycl::private_memory, 1> dummy; +typedef sycl::private_memory, 1> dummy; // private_memory must have Val field of unique_ptr type diff --git a/sycl/test/helpers.hpp b/sycl/test/helpers.hpp index 8073bf5420c99..055a5a4aca70d 100644 --- a/sycl/test/helpers.hpp +++ b/sycl/test/helpers.hpp @@ -8,8 +8,6 @@ #include -using namespace cl; - template class VecPrinter { public: diff --git a/sycl/test/invoke_simd/invoke_simd.cpp b/sycl/test/invoke_simd/invoke_simd.cpp index 37296b453f255..370d53a15ec21 100644 --- a/sycl/test/invoke_simd/invoke_simd.cpp +++ b/sycl/test/invoke_simd/invoke_simd.cpp @@ -17,7 +17,7 @@ #include using namespace sycl::ext::oneapi::experimental; -using namespace cl::sycl; +using namespace sycl; namespace esimd = sycl::ext::intel::esimd; constexpr int VL = 16; @@ -66,7 +66,7 @@ inline auto createExceptionHandler() { for (auto ep : l) { try { std::rethrow_exception(ep); - } catch (cl::sycl::exception &e0) { + } catch (sycl::exception &e0) { std::cout << "sycl::exception: " << e0.what() << std::endl; } catch (std::exception &e) { std::cout << "std::exception: " << e.what() << std::endl; @@ -99,11 +99,11 @@ int main(void) { C[i] = -1; } - cl::sycl::range<1> GlobalRange{Size}; + sycl::range<1> GlobalRange{Size}; // Number of workitems in each workgroup. - cl::sycl::range<1> LocalRange{GroupSize}; + sycl::range<1> LocalRange{GroupSize}; - cl::sycl::nd_range<1> Range(GlobalRange, LocalRange); + sycl::nd_range<1> Range(GlobalRange, LocalRange); try { auto e = q.submit([&](handler &cgh) { @@ -126,7 +126,7 @@ int main(void) { }); }); e.wait(); - } catch (cl::sycl::exception const &e) { + } catch (sycl::exception const &e) { std::cout << "SYCL exception caught: " << e.what() << '\n'; return e.get_cl_code(); } diff --git a/sycl/test/kernel_param/attr.cpp b/sycl/test/kernel_param/attr.cpp index c8f831f376f2e..baa35ce3c2a27 100755 --- a/sycl/test/kernel_param/attr.cpp +++ b/sycl/test/kernel_param/attr.cpp @@ -4,7 +4,7 @@ // Check copying of parallel_for kernel attributes to wrapper kernel. #include -using namespace cl::sycl; +using namespace sycl; int main() { range<1> Size{10}; diff --git a/sycl/test/multi_ptr/ctad.cpp b/sycl/test/multi_ptr/ctad.cpp index 1edaefd04ec30..819cac9a836f3 100644 --- a/sycl/test/multi_ptr/ctad.cpp +++ b/sycl/test/multi_ptr/ctad.cpp @@ -9,8 +9,6 @@ //===----------------------------------------------------------------------===// #include -namespace sycl = cl::sycl; - int main() { using sycl::access::address_space; using sycl::access::mode; diff --git a/sycl/test/regression/async_work_group_copy.cpp b/sycl/test/regression/async_work_group_copy.cpp index e42a644a0fae6..d3804f718b338 100644 --- a/sycl/test/regression/async_work_group_copy.cpp +++ b/sycl/test/regression/async_work_group_copy.cpp @@ -4,7 +4,7 @@ // builtin async_work_group_copy #include -using namespace cl::sycl; +using namespace sycl; // Define the number of work items to enqueue. const size_t NElems = 32; @@ -56,7 +56,7 @@ int main() { test(); test(); test(); - test(); + test(); test(); test(); return 1; diff --git a/sycl/test/regression/buffer_from_rvalue.cpp b/sycl/test/regression/buffer_from_rvalue.cpp index 9054013960819..71e466471cd4f 100644 --- a/sycl/test/regression/buffer_from_rvalue.cpp +++ b/sycl/test/regression/buffer_from_rvalue.cpp @@ -7,6 +7,6 @@ int main() { std::vector v(1); std::move_iterator it1(v.begin()); std::move_iterator it2(v.end()); - cl::sycl::buffer b1(it1, it2); + sycl::buffer b1(it1, it2); return 0; } diff --git a/sycl/test/regression/builtins_vector1.cpp b/sycl/test/regression/builtins_vector1.cpp index 20a52bd1b7c2e..7c42884d14204 100644 --- a/sycl/test/regression/builtins_vector1.cpp +++ b/sycl/test/regression/builtins_vector1.cpp @@ -3,8 +3,6 @@ #include -namespace sycl = cl::sycl; - int main() { sycl::queue().submit([&](sycl::handler &h) { h.single_task([=]() { diff --git a/sycl/test/regression/constexpr-fp16-numeric-limits.cpp b/sycl/test/regression/constexpr-fp16-numeric-limits.cpp index 3ea34ea88917e..9e1bd3b12d127 100644 --- a/sycl/test/regression/constexpr-fp16-numeric-limits.cpp +++ b/sycl/test/regression/constexpr-fp16-numeric-limits.cpp @@ -3,21 +3,16 @@ #include int main() { - constexpr cl::sycl::half L1 = std::numeric_limits::min(); - constexpr cl::sycl::half L2 = std::numeric_limits::max(); - constexpr cl::sycl::half L3 = std::numeric_limits::lowest(); - constexpr cl::sycl::half L4 = std::numeric_limits::epsilon(); - constexpr cl::sycl::half L5 = - std::numeric_limits::round_error(); - constexpr cl::sycl::half L6 = std::numeric_limits::infinity(); - constexpr cl::sycl::half L6n = - -std::numeric_limits::infinity(); - constexpr cl::sycl::half L7 = - std::numeric_limits::quiet_NaN(); - constexpr cl::sycl::half L8 = - std::numeric_limits::signaling_NaN(); - constexpr cl::sycl::half L9 = - std::numeric_limits::denorm_min(); + constexpr sycl::half L1 = std::numeric_limits::min(); + constexpr sycl::half L2 = std::numeric_limits::max(); + constexpr sycl::half L3 = std::numeric_limits::lowest(); + constexpr sycl::half L4 = std::numeric_limits::epsilon(); + constexpr sycl::half L5 = std::numeric_limits::round_error(); + constexpr sycl::half L6 = std::numeric_limits::infinity(); + constexpr sycl::half L6n = -std::numeric_limits::infinity(); + constexpr sycl::half L7 = std::numeric_limits::quiet_NaN(); + constexpr sycl::half L8 = std::numeric_limits::signaling_NaN(); + constexpr sycl::half L9 = std::numeric_limits::denorm_min(); return 0; } diff --git a/sycl/test/regression/copy-with-unnamed-lambda.cpp b/sycl/test/regression/copy-with-unnamed-lambda.cpp index 97b26e806e09c..d5cfc562f41c5 100644 --- a/sycl/test/regression/copy-with-unnamed-lambda.cpp +++ b/sycl/test/regression/copy-with-unnamed-lambda.cpp @@ -6,7 +6,7 @@ #include int main() { - auto AsyncHandler = [](cl::sycl::exception_list EL) { + auto AsyncHandler = [](sycl::exception_list EL) { for (std::exception_ptr const &P : EL) { try { std::rethrow_exception(P); @@ -16,21 +16,21 @@ int main() { } }; - cl::sycl::queue Q(AsyncHandler); + sycl::queue Q(AsyncHandler); constexpr size_t Size = 10; const int ReferenceData[Size] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; - cl::sycl::buffer Buf(Size); + sycl::buffer Buf(Size); - Q.submit([&](cl::sycl::handler &CGH) { - auto Acc = Buf.get_access(CGH); + Q.submit([&](sycl::handler &CGH) { + auto Acc = Buf.get_access(CGH); CGH.copy(ReferenceData, Acc); }); Q.wait_and_throw(); - auto Acc = Buf.get_access(); + auto Acc = Buf.get_access(); for (size_t I = 0; I < Size; ++I) { if (ReferenceData[I] != Acc[I]) { std::cerr << "Incorrect result, got: " << Acc[I] @@ -40,8 +40,8 @@ int main() { } int CopybackData[Size] = { 0 }; - Q.submit([&](cl::sycl::handler &CGH) { - auto Acc = Buf.get_access(CGH); + Q.submit([&](sycl::handler &CGH) { + auto Acc = Buf.get_access(CGH); CGH.copy(Acc, CopybackData); }); diff --git a/sycl/test/regression/fsycl-host-compiler.cpp b/sycl/test/regression/fsycl-host-compiler.cpp index cc45872914b26..d8c51cc3cbfb5 100644 --- a/sycl/test/regression/fsycl-host-compiler.cpp +++ b/sycl/test/regression/fsycl-host-compiler.cpp @@ -17,7 +17,7 @@ #error predefined macro not set #endif // DEFINE_CHECK -using namespace cl::sycl; +using namespace sycl; int main() { int data[] = {0, 0, 0}; diff --git a/sycl/test/regression/fsycl-save-temps.cpp b/sycl/test/regression/fsycl-save-temps.cpp index 91902d7c430a7..41a2b3a2c21a4 100644 --- a/sycl/test/regression/fsycl-save-temps.cpp +++ b/sycl/test/regression/fsycl-save-temps.cpp @@ -14,8 +14,8 @@ void foo() {} int main() { - cl::sycl::queue Q; - Q.submit([](cl::sycl::handler &Cgh) { + sycl::queue Q; + Q.submit([](sycl::handler &Cgh) { Cgh.single_task([]() { foo(); }); }); return 0; diff --git a/sycl/test/regression/half_union.cpp b/sycl/test/regression/half_union.cpp index 006a83d969d42..14790a3b22944 100644 --- a/sycl/test/regression/half_union.cpp +++ b/sycl/test/regression/half_union.cpp @@ -5,7 +5,7 @@ typedef union _u16_to_half { unsigned short u; - cl::sycl::half h; + sycl::half h; } u16_to_sycl_half; int main() { diff --git a/sycl/test/regression/isordered.cpp b/sycl/test/regression/isordered.cpp index a6f892489a500..0005b86a9b2f6 100644 --- a/sycl/test/regression/isordered.cpp +++ b/sycl/test/regression/isordered.cpp @@ -4,26 +4,25 @@ #include int main() { - cl::sycl::range<1> ndRng(3); + sycl::range<1> ndRng(3); int32_t kernelResult[3]; - cl::sycl::queue testQueue; + sycl::queue testQueue; { - cl::sycl::buffer buffer(&kernelResult[0], ndRng); - testQueue.submit([&](cl::sycl::handler &h) { - auto resultPtr = - buffer.template get_access(h); + sycl::buffer buffer(&kernelResult[0], ndRng); + testQueue.submit([&](sycl::handler &h) { + auto resultPtr = buffer.template get_access(h); h.single_task([=]() { float inputData_0F(0.1); float inputData_1F(0.5); - resultPtr[0] = cl::sycl::isordered(inputData_0F, inputData_1F); + resultPtr[0] = sycl::isordered(inputData_0F, inputData_1F); double inputData_0D(0.2); double inputData_1D(0.3); - resultPtr[1] = cl::sycl::isordered(inputData_0D, inputData_1D); + resultPtr[1] = sycl::isordered(inputData_0D, inputData_1D); sycl::half inputData_0H(0.3); sycl::half inputData_1H(0.9); - resultPtr[2] = cl::sycl::isordered(inputData_0H, inputData_1H); + resultPtr[2] = sycl::isordered(inputData_0H, inputData_1H); }); }); } diff --git a/sycl/test/regression/mad_sat.cpp b/sycl/test/regression/mad_sat.cpp index 9c44684eefa99..28a0473ea4359 100644 --- a/sycl/test/regression/mad_sat.cpp +++ b/sycl/test/regression/mad_sat.cpp @@ -4,94 +4,88 @@ #include int main() { - cl::sycl::queue testQueue; + sycl::queue testQueue; { - const cl::sycl::longlong3 verification3( + const sycl::longlong3 verification3( 9223372036854775807LL, 9223372036854775807LL, -9223372036854775808LL); - cl::sycl::longlong3 inputData_0( - 1152105081885725616LL, 8383539663869980295LL, -3013159033463244495LL); - cl::sycl::longlong3 inputData_1(9169239286331099647LL, - 8545168655265359544LL, 69290337040907021LL); - cl::sycl::longlong3 inputData_2( - -5670250901301018333LL, 216462155376518854LL, -7910909987096217335LL); + sycl::longlong3 inputData_0(1152105081885725616LL, 8383539663869980295LL, + -3013159033463244495LL); + sycl::longlong3 inputData_1(9169239286331099647LL, 8545168655265359544LL, + 69290337040907021LL); + sycl::longlong3 inputData_2(-5670250901301018333LL, 216462155376518854LL, + -7910909987096217335LL); - cl::sycl::buffer buffer(1); + sycl::buffer buffer(1); - testQueue.submit([&](cl::sycl::handler &h) { - auto resultPtr = - buffer.template get_access(h); + testQueue.submit([&](sycl::handler &h) { + auto resultPtr = buffer.template get_access(h); h.single_task([=]() { - resultPtr[0] = cl::sycl::mad_sat(inputData_0, inputData_1, inputData_2); + resultPtr[0] = sycl::mad_sat(inputData_0, inputData_1, inputData_2); }); }); - const auto HostAccessor = buffer.get_access(); + const auto HostAccessor = buffer.get_access(); for (int i = 0; i < 3; i++) assert((HostAccessor[0][i] == verification3[i]) && "Incorrect result"); } { - const cl::sycl::longlong4 verification4( + const sycl::longlong4 verification4( 9223372036854775807LL, 9223372036854775807LL, -9223372036854775808LL, 9223372036854775807LL); - cl::sycl::longlong4 inputData_0( - -4713774672458165250LL, 7161321293740295698LL, -7560042360032818022LL, - 1712118953348815386LL); - cl::sycl::longlong4 inputData_1( - -5256951628950351348LL, 3094294642897896981LL, 4183324171724765944LL, - 1726930751531248453LL); - cl::sycl::longlong4 inputData_2( - -614349234816759997LL, -7793620271163345724LL, 5480991826433743823LL, - -3977840325478979484LL); - - cl::sycl::buffer buffer(1); - - testQueue.submit([&](cl::sycl::handler &h) { - auto resultPtr = - buffer.template get_access(h); + sycl::longlong4 inputData_0(-4713774672458165250LL, 7161321293740295698LL, + -7560042360032818022LL, 1712118953348815386LL); + sycl::longlong4 inputData_1(-5256951628950351348LL, 3094294642897896981LL, + 4183324171724765944LL, 1726930751531248453LL); + sycl::longlong4 inputData_2(-614349234816759997LL, -7793620271163345724LL, + 5480991826433743823LL, -3977840325478979484LL); + + sycl::buffer buffer(1); + + testQueue.submit([&](sycl::handler &h) { + auto resultPtr = buffer.template get_access(h); h.single_task([=]() { - resultPtr[0] = cl::sycl::mad_sat(inputData_0, inputData_1, inputData_2); + resultPtr[0] = sycl::mad_sat(inputData_0, inputData_1, inputData_2); }); }); - const auto HostAccessor = buffer.get_access(); + const auto HostAccessor = buffer.get_access(); for (int i = 0; i < 4; i++) assert((HostAccessor[0][i] == verification4[i]) && "Incorrect result"); } { - const cl::sycl::longlong8 verification8( + const sycl::longlong8 verification8( 9223372036854775807LL, 9223372036854775807LL, -9223372036854775808LL, -9223372036854775808LL, 9223372036854775807LL, 9223372036854775807LL, -9223372036854775808LL, -9223372036854775808LL); - cl::sycl::longlong8 inputData_0( - 3002837817109371705LL, -6132505093056073745LL, -2677806413031023542LL, - -3906932152445696896LL, -5966911996430888011LL, 487233493241732294LL, - 8234534527416862935LL, 8302379558520488989LL); - cl::sycl::longlong8 inputData_1( - 3895748400226584336LL, -3171989754828069475LL, 6135091761884568657LL, - 3449810579449494485LL, -5153085649597103327LL, 2036067225828737775LL, - -2456339276147680058LL, -2321401317481120691LL); - cl::sycl::longlong8 inputData_2( - 5847800471474896191LL, 6421268696360310080LL, 426131359031594004LL, - 3388848179800138438LL, 9095634920776267157LL, 3909069092545608647LL, - -6551917618131929798LL, -5283018165188606431LL); - - cl::sycl::buffer buffer(1); - - testQueue.submit([&](cl::sycl::handler &h) { - auto resultPtr = - buffer.template get_access(h); + sycl::longlong8 inputData_0(3002837817109371705LL, -6132505093056073745LL, + -2677806413031023542LL, -3906932152445696896LL, + -5966911996430888011LL, 487233493241732294LL, + 8234534527416862935LL, 8302379558520488989LL); + sycl::longlong8 inputData_1(3895748400226584336LL, -3171989754828069475LL, + 6135091761884568657LL, 3449810579449494485LL, + -5153085649597103327LL, 2036067225828737775LL, + -2456339276147680058LL, -2321401317481120691LL); + sycl::longlong8 inputData_2(5847800471474896191LL, 6421268696360310080LL, + 426131359031594004LL, 3388848179800138438LL, + 9095634920776267157LL, 3909069092545608647LL, + -6551917618131929798LL, -5283018165188606431LL); + + sycl::buffer buffer(1); + + testQueue.submit([&](sycl::handler &h) { + auto resultPtr = buffer.template get_access(h); h.single_task([=]() { - resultPtr[0] = cl::sycl::mad_sat(inputData_0, inputData_1, inputData_2); + resultPtr[0] = sycl::mad_sat(inputData_0, inputData_1, inputData_2); }); }); - const auto HostAccessor = buffer.get_access(); + const auto HostAccessor = buffer.get_access(); for (int i = 0; i < 8; i++) assert((HostAccessor[0][i] == verification8[i]) && "Incorrect result"); } { - const cl::sycl::longlong16 verification16( + const sycl::longlong16 verification16( -9223372036854775808LL, 9223372036854775807LL, 9223372036854775807LL, -9223372036854775808LL, 9223372036854775807LL, 9223372036854775807LL, 9223372036854775807LL, 9223372036854775807LL, 9223372036854775807LL, @@ -99,21 +93,21 @@ int main() { -9223372036854775808LL, 9223372036854775807LL, -9223372036854775808LL, -9223372036854775808LL); - cl::sycl::longlong16 inputData_0( + sycl::longlong16 inputData_0( 4711072418277000515LL, -8205098172692021203LL, -7385016145788992368LL, 5953521028589173909LL, -5219240995491769312LL, 8710496141913755416LL, -6685846261491268433LL, 4193173269411595542LL, -8540195959022520771LL, -4715465363106336895LL, -1020086937442724783LL, 4496316677230042947LL, 1321442475247578017LL, -7374746170855359764LL, -3206370806055241163LL, -2175226063524462053LL); - cl::sycl::longlong16 inputData_1( + sycl::longlong16 inputData_1( -9126728881985856159LL, -8235441378758843293LL, -3529617622861997052LL, -4696495345590499183LL, -2446014787831249326LL, 3966377959819902357LL, -8707315735766590681LL, 4940281453308003965LL, -4008494233289413829LL, -1007875458987895243LL, 8007184939842565626LL, 7006363475270750393LL, -3126435375497361798LL, -2666957213164527889LL, 3425215156535282625LL, 5057359883753713949LL); - cl::sycl::longlong16 inputData_2( + sycl::longlong16 inputData_2( -5792361016316836568LL, 1155364222481085809LL, 7552404711758320408LL, -9123476257323872288LL, -924920183965907175LL, 1921314238201973170LL, 3462681782260196063LL, 7822120358287768333LL, -3130033938219713817LL, @@ -121,17 +115,16 @@ int main() { 4207763935319579681LL, 1564279736903158695LL, 3722632463806041635LL, 939009161285897285LL); - cl::sycl::buffer buffer(1); + sycl::buffer buffer(1); - testQueue.submit([&](cl::sycl::handler &h) { - auto resultPtr = - buffer.template get_access(h); + testQueue.submit([&](sycl::handler &h) { + auto resultPtr = buffer.template get_access(h); h.single_task([=]() { - resultPtr[0] = cl::sycl::mad_sat(inputData_0, inputData_1, inputData_2); + resultPtr[0] = sycl::mad_sat(inputData_0, inputData_1, inputData_2); }); }); - const auto HostAccessor = buffer.get_access(); + const auto HostAccessor = buffer.get_access(); for (int i = 0; i < 16; i++) assert((HostAccessor[0][i] == verification16[i]) && "Incorrect result"); } diff --git a/sycl/test/regression/memcpy-in-vec-as.cpp b/sycl/test/regression/memcpy-in-vec-as.cpp index c2725eafbe297..f6c96d6927c35 100644 --- a/sycl/test/regression/memcpy-in-vec-as.cpp +++ b/sycl/test/regression/memcpy-in-vec-as.cpp @@ -3,18 +3,17 @@ #include int main() { - using res_vec_type = cl::sycl::vec; + using res_vec_type = sycl::vec; res_vec_type res; - cl::sycl::vec RefData(1, 2, 3, 4, 5, 6, 7, 8); + sycl::vec RefData(1, 2, 3, 4, 5, 6, 7, 8); { - cl::sycl::buffer OutBuf(&res, cl::sycl::range<1>(1)); - cl::sycl::buffer InBuf(&RefData, - cl::sycl::range<1>(1)); - cl::sycl::queue Queue; - Queue.submit([&](cl::sycl::handler &cgh) { - auto In = InBuf.get_access(cgh); - auto Out = OutBuf.get_access(cgh); + sycl::buffer OutBuf(&res, sycl::range<1>(1)); + sycl::buffer InBuf(&RefData, sycl::range<1>(1)); + sycl::queue Queue; + Queue.submit([&](sycl::handler &cgh) { + auto In = InBuf.get_access(cgh); + auto Out = OutBuf.get_access(cgh); cgh.single_task( [=]() { Out[0] = In[0].as(); }); }); diff --git a/sycl/test/regression/spec_const_O0.cpp b/sycl/test/regression/spec_const_O0.cpp index f11ceb4423fe2..c7f0ac340dbf2 100644 --- a/sycl/test/regression/spec_const_O0.cpp +++ b/sycl/test/regression/spec_const_O0.cpp @@ -4,7 +4,7 @@ // __sycl_getScalar2020SpecConstantValue gets inlined. #include -using namespace cl::sycl; +using namespace sycl; constexpr specialization_id SPEC_CONST(1024); diff --git a/sycl/test/regression/unnamed-lambda.cpp b/sycl/test/regression/unnamed-lambda.cpp index ebb2636631d51..22db6be8cd890 100644 --- a/sycl/test/regression/unnamed-lambda.cpp +++ b/sycl/test/regression/unnamed-lambda.cpp @@ -9,10 +9,9 @@ // the kernel itself, so this checks that example, which only happens when the // named kernel is inside another lambda. -void foo(cl::sycl::queue queue) { - cl::sycl::event queue_event2 = queue.submit([&](cl::sycl::handler &cgh) { - cgh.parallel_for(cl::sycl::range<1>{1}, - [=](cl::sycl::item<1> id) {}); +void foo(sycl::queue queue) { + sycl::event queue_event2 = queue.submit([&](sycl::handler &cgh) { + cgh.parallel_for(sycl::range<1>{1}, [=](sycl::item<1> id) {}); }); } @@ -24,12 +23,12 @@ void foo(cl::sycl::queue queue) { class Functor { public: - void operator()(cl::sycl::item<2>) const {} + void operator()(sycl::item<2>) const {} }; -void bar(cl::sycl::queue queue) { - queue.submit([&](cl::sycl::handler &cgh) { +void bar(sycl::queue queue) { + queue.submit([&](sycl::handler &cgh) { Functor f; - cgh.parallel_for(cl::sycl::range<2>{1024,768}, f); + cgh.parallel_for(sycl::range<2>{1024, 768}, f); }); } diff --git a/sycl/test/regression/vec-to-half.cpp b/sycl/test/regression/vec-to-half.cpp index 2d9566be56fe6..220f6874f41a2 100644 --- a/sycl/test/regression/vec-to-half.cpp +++ b/sycl/test/regression/vec-to-half.cpp @@ -4,8 +4,8 @@ #include int main() { - cl::sycl::vec V(1.0); - cl::sycl::vec V2 = V.template convert(); + sycl::vec V(1.0); + sycl::vec V2 = V.template convert(); return 0; } diff --git a/sycl/test/scheduler/BasicSchedulerTests.cpp b/sycl/test/scheduler/BasicSchedulerTests.cpp index 556cb22b5da18..9c91161851146 100644 --- a/sycl/test/scheduler/BasicSchedulerTests.cpp +++ b/sycl/test/scheduler/BasicSchedulerTests.cpp @@ -12,8 +12,7 @@ #include -using namespace cl; -using sycl_access_mode = cl::sycl::access::mode; +using sycl_access_mode = sycl::access::mode; // Execute functor provided passing a queue created with default device selector // and async handler then waits for the tasks submitted to queue to finish. If diff --git a/sycl/test/scheduler/DataMovement.cpp b/sycl/test/scheduler/DataMovement.cpp index aeaa31db098ce..6d6368e59b2e5 100644 --- a/sycl/test/scheduler/DataMovement.cpp +++ b/sycl/test/scheduler/DataMovement.cpp @@ -18,8 +18,7 @@ #include "../helpers.hpp" -using namespace cl; -using sycl_access_mode = cl::sycl::access::mode; +using sycl_access_mode = sycl::access::mode; template class CustomAllocator { public: diff --git a/sycl/test/scheduler/GetWaitList.cpp b/sycl/test/scheduler/GetWaitList.cpp index 0d86babd2d8dd..37727c0790868 100644 --- a/sycl/test/scheduler/GetWaitList.cpp +++ b/sycl/test/scheduler/GetWaitList.cpp @@ -11,6 +11,6 @@ #include int main() { - cl::sycl::event start; + sycl::event start; start.wait_and_throw(); } diff --git a/sycl/test/scheduler/HostAcc.cpp b/sycl/test/scheduler/HostAcc.cpp index cf015c4d37647..285c293166083 100644 --- a/sycl/test/scheduler/HostAcc.cpp +++ b/sycl/test/scheduler/HostAcc.cpp @@ -10,8 +10,6 @@ #include -using namespace cl; - int main() { bool Fail = false; diff --git a/sycl/test/scheduler/MultipleDevices.cpp b/sycl/test/scheduler/MultipleDevices.cpp index a52ee3d2883f3..05984bde728d5 100644 --- a/sycl/test/scheduler/MultipleDevices.cpp +++ b/sycl/test/scheduler/MultipleDevices.cpp @@ -13,7 +13,7 @@ #include -using namespace cl::sycl; +using namespace sycl; int multidevice_test(queue MyQueue1, queue MyQueue2) { const size_t N = 100; @@ -99,7 +99,7 @@ int main() { queue MyQueue1(hostSelector); queue MyQueue2(hostSelector); Result &= multidevice_test(MyQueue1, MyQueue2); - } catch(cl::sycl::runtime_error &) { + } catch (sycl::runtime_error &) { std::cout << "Skipping host and host" << std::endl; } diff --git a/sycl/test/scheduler/ReleaseResourcesTest.cpp b/sycl/test/scheduler/ReleaseResourcesTest.cpp index 396dc713e22df..ffed076bccc6f 100644 --- a/sycl/test/scheduler/ReleaseResourcesTest.cpp +++ b/sycl/test/scheduler/ReleaseResourcesTest.cpp @@ -13,15 +13,14 @@ #include "../helpers.hpp" -using namespace cl; -using sycl_access_mode = cl::sycl::access::mode; +using sycl_access_mode = sycl::access::mode; int main() { bool Failed = false; // Checks creating of the second host accessor while first one is alive. try { - cl::sycl::default_selector device_selector; + sycl::default_selector device_selector; sycl::range<1> BufSize{1}; sycl::buffer Buf(BufSize); diff --git a/sycl/test/type_traits/integer_n_bit.cpp b/sycl/test/type_traits/integer_n_bit.cpp index b82140787f4e5..b519f1b1a357a 100644 --- a/sycl/test/type_traits/integer_n_bit.cpp +++ b/sycl/test/type_traits/integer_n_bit.cpp @@ -9,8 +9,8 @@ #include -namespace s = cl::sycl; -namespace d = cl::sycl::detail; +namespace s = sycl; +namespace d = sycl::detail; template using bool_list = d::value_list; diff --git a/sycl/test/type_traits/type_list.cpp b/sycl/test/type_traits/type_list.cpp index 85a970ee4e5e1..aa9b225c142e2 100644 --- a/sycl/test/type_traits/type_list.cpp +++ b/sycl/test/type_traits/type_list.cpp @@ -13,8 +13,8 @@ using namespace std; -namespace s = cl::sycl; -namespace d = cl::sycl::detail; +namespace s = sycl; +namespace d = sycl::detail; template