diff --git a/sycl/doc/extensions/EnqueueBarrier/enqueue_barrier.asciidoc b/sycl/doc/extensions/EnqueueBarrier/enqueue_barrier.asciidoc index 880313dae5af3..08ec838ca8ddd 100644 --- a/sycl/doc/extensions/EnqueueBarrier/enqueue_barrier.asciidoc +++ b/sycl/doc/extensions/EnqueueBarrier/enqueue_barrier.asciidoc @@ -88,7 +88,7 @@ two new members to the `queue` class: |======================================== |*handler::ext_oneapi_barrier*|*queue::ext_oneapi_submit_barrier* |`void ext_oneapi_barrier()` | `event ext_oneapi_submit_barrier()` -|`void ext_oneapi_barrier( const vector_class &waitList )` | `event ext_oneapi_submit_barrier( const vector_class &waitList )` +|`void ext_oneapi_barrier( const std::vector &waitList )` | `event ext_oneapi_submit_barrier( const std::vector &waitList )` |======================================== The first variant of the barrier takes no parameters, and waits for all previously submitted commands to the queue to enter the `info::event_command_status::complete` state before any command later submitted to the same queue is allowed to execute. A second variant of the barrier accepts a list of events, with the behavior that no commands submitted to the same queue after barrier submission may execute until all events in the `waitList` have entered the `info::event_command_status::complete` state. Both variants are non-blocking from the host program perspective, in that they do not wait for the barrier conditions to have been met before returning. @@ -171,7 +171,7 @@ auto event_barrier2 = Queue2.submit([&](cl::sycl::handler& cgh) { }); Queue3.submit([&](cl::sycl::handler& cgh) { - cgh.ext_oneapi_barrier( vector_class{event_barrier1, event_barrier2} ); + cgh.ext_oneapi_barrier( std::vector{event_barrier1, event_barrier2} ); }); Queue3.submit([&](cl::sycl::handler& cgh) { @@ -193,7 +193,7 @@ auto event_barrier2 = Queue2.submit([&](cl::sycl::handler& cgh) { // CG2 }); -Queue3.ext_oneapi_submit_barrier( vector_class{event_barrier1, event_barrier2} ); +Queue3.ext_oneapi_submit_barrier( std::vector{event_barrier1, event_barrier2} ); Queue3.submit([&](cl::sycl::handler& cgh) { // CG3 @@ -224,7 +224,7 @@ event submit(T cgf, const queue &secondaryQueue); event ext_oneapi_submit_barrier(); -event ext_oneapi_submit_barrier( const vector_class &waitList ); +event ext_oneapi_submit_barrier( const std::vector &waitList ); void wait(); ... @@ -237,7 +237,7 @@ void wait(); |======================================== |*Member functions*|*Description* |`event ext_oneapi_submit_barrier()` | Same effect as submitting a `handler::ext_oneapi_barrier()` within a command group to this `queue`. The returned event enters the `info::event_command_status::complete` state when all events that the barrier is dependent on (implicitly from all previously submitted commands to the same queue) have entered the `info::event_command_status::complete` state. -|`event ext_oneapi_submit_barrier( const vector_class &waitList )` | Same effect as submitting a `handler:ext_oneapi_barrier( const vector_class &waitList )` within a command group to this `queue`. The returned event enters the `info::event_command_status::complete` state when all events that the barrier is dependent on (explicitly from `waitList`) have entered the `info::event_command_status::complete` state. +|`event ext_oneapi_submit_barrier( const std::vector &waitList )` | Same effect as submitting a `handler:ext_oneapi_barrier( const std::vector &waitList )` within a command group to this `queue`. The returned event enters the `info::event_command_status::complete` state when all events that the barrier is dependent on (explicitly from `waitList`) have entered the `info::event_command_status::complete` state. |======================================== @@ -275,7 +275,7 @@ void fill(void *ptr, const T &pattern, size_t count); void ext_oneapi_barrier(); -void ext_oneapi_barrier( const vector_class &waitList ); +void ext_oneapi_barrier( const std::vector &waitList ); }; ... @@ -287,7 +287,7 @@ void ext_oneapi_barrier( const vector_class &waitList ); Barriers may be submitted to a queue, with the effect that they prevent later operations submitted to the same queue from executing until the barrier wait conditions have been satisfied. The wait conditions can be explicitly described by `waitList` or implicitly from all previously submitted commands to the same queue. There are no constraints on the context from which queues may participate in the `waitList`. Enqueued barriers do not block host program execution, but instead form additional dependence edges with the execution task graph. -Barriers can be created by two members of the `handler` class that force synchronization on the SYCL command queue. The first variant of the `handler` barrier (`handler::barrier()`) takes no parameters, and waits for all previously submitted commands to the queue to enter the `info::event_command_status::complete` state before any command later submitted to the same queue is allowed to execute. The second variant of the `handler` barrier (`handler::barrier( const vector_class &waitList )`) accepts a list of events, with the behavior that no commands submitted to the same queue after barrier submission may execute until all events in the waitList have entered the `info::event_command_status::complete` state. +Barriers can be created by two members of the `handler` class that force synchronization on the SYCL command queue. The first variant of the `handler` barrier (`handler::barrier()`) takes no parameters, and waits for all previously submitted commands to the queue to enter the `info::event_command_status::complete` state before any command later submitted to the same queue is allowed to execute. The second variant of the `handler` barrier (`handler::barrier( const std::vector &waitList )`) accepts a list of events, with the behavior that no commands submitted to the same queue after barrier submission may execute until all events in the waitList have entered the `info::event_command_status::complete` state. === Add a new table in the new section between 4.9.4 and 4.9.5: Member functions of the handler class. @@ -297,7 +297,7 @@ Barriers can be created by two members of the `handler` class that force synchro |======================================== |*Member functions*|*Description* |`void ext_oneapi_barrier()` | Prevents any commands submitted afterward to this queue from executing until all commands previously submitted to this queue have entered the `info::event_command_status::complete` state. -|`void ext_oneapi_barrier( const vector_class &waitList` ) | Prevents any commands submitted afterward to this queue from executing until all events in `waitList` have entered the `info::event_command_status::complete` state. If `waitList` is empty, then the barrier has no effect. +|`void ext_oneapi_barrier( const std::vector &waitList` ) | Prevents any commands submitted afterward to this queue from executing until all events in `waitList` have entered the `info::event_command_status::complete` state. If `waitList` is empty, then the barrier has no effect. |======================================== == Issues diff --git a/sycl/doc/extensions/LevelZeroBackend/LevelZeroBackend.md b/sycl/doc/extensions/LevelZeroBackend/LevelZeroBackend.md index 55ccf83219f1e..78bb5392e0cc6 100644 --- a/sycl/doc/extensions/LevelZeroBackend/LevelZeroBackend.md +++ b/sycl/doc/extensions/LevelZeroBackend/LevelZeroBackend.md @@ -87,7 +87,7 @@ a SYCL object that encapsulates a corresponding Level-Zero object: |-------------|:------------| |``` make(ze_driver_handle_t);```|Constructs a SYCL platform instance from a Level-Zero ```ze_driver_handle_t```.| |``` make(const platform &, ze_device_handle_t);```|Constructs a SYCL device instance from a Level-Zero ```ze_device_handle_t```. The platform argument gives a SYCL platform, encapsulating a Level-Zero driver supporting the passed Level-Zero device.| -|``` make(const vector_class &, ze_context_handle_t, ownership = transfer);```| Constructs a SYCL context instance from a Level-Zero ```ze_context_handle_t```. The context is created against the devices passed in. There must be at least one device given and all the devices must be from the same SYCL platform and thus from the same Level-Zero driver. The ```ownership``` argument specifies if the SYCL runtime should take ownership of the passed native handle. The default behavior is to transfer the ownership to the SYCL runtime. See section 4.4 for details.| +|``` make(const std::vector &, ze_context_handle_t, ownership = transfer);```| Constructs a SYCL context instance from a Level-Zero ```ze_context_handle_t```. The context is created against the devices passed in. There must be at least one device given and all the devices must be from the same SYCL platform and thus from the same Level-Zero driver. The ```ownership``` argument specifies if the SYCL runtime should take ownership of the passed native handle. The default behavior is to transfer the ownership to the SYCL runtime. See section 4.4 for details.| |``` make(const context &, ze_command_queue_handle_t, ownership = transfer);```| Constructs a SYCL queue instance from a Level-Zero ```ze_command_queue_handle_t```. The context argument must be a valid SYCL context encapsulating a Level-Zero context. The queue is attached to the first device in the passed SYCL context. The ```ownership``` argument specifies if the SYCL runtime should take ownership of the passed native handle. The default behavior is to transfer the ownership to the SYCL runtime. See section 4.4 for details.| |``` make(const context &, ze_event_handle_t, ownership = transfer);```| Constructs a SYCL event instance from a Level-Zero ```ze_event_handle_t```. The context argument must be a valid SYCL context encapsulating a Level-Zero context. The Level-Zero event should be allocated from an event pool created in the same context. The ```ownership``` argument specifies if the SYCL runtime should take ownership of the passed native handle. The default behavior is to transfer the ownership to the SYCL runtime. See section 4.4 for details.| |``` make(const context &, ze_module_handle_t);```| Constructs a SYCL program instance from a Level-Zero ```ze_module_handle_t```. The context argument must be a valid SYCL context encapsulating a Level-Zero context. The Level-Zero module must be fully linked (i.e. not require further linking through [```zeModuleDynamicLink```](https://spec.oneapi.com/level-zero/latest/core/api.html?highlight=zemoduledynamiclink#_CPPv419zeModuleDynamicLink8uint32_tP18ze_module_handle_tP28ze_module_build_log_handle_t)), and thus the SYCL program is created in the "linked" state.| diff --git a/sycl/doc/extensions/QueueShortcuts/queue.hpp b/sycl/doc/extensions/QueueShortcuts/queue.hpp index d82fd6256cd01..5639a0bf20b5c 100644 --- a/sycl/doc/extensions/QueueShortcuts/queue.hpp +++ b/sycl/doc/extensions/QueueShortcuts/queue.hpp @@ -8,8 +8,8 @@ class queue { event single_task(event DepEvent, KernelType KernelFunc); // (2) template - event single_task(const vector_class &DepEvents, - KernelType KernelFunc); // (3) + event single_task(const std::vector &DepEvents, + KernelType KernelFunc); // (3) template event parallel_for(range NumWorkItems, KernelType KernelFunc); // (4) @@ -20,8 +20,8 @@ class queue { template event parallel_for(range NumWorkItems, - const vector_class &DepEvents, - KernelType KernelFunc); // (6) + const std::vector &DepEvents, + KernelType KernelFunc); // (6) template event parallel_for(range NumWorkItems, id WorkItemOffset, @@ -33,8 +33,8 @@ class queue { template event parallel_for(range NumWorkItems, id WorkItemOffset, - const vector_class &DepEvents, - KernelType KernelFunc); // (9) + const std::vector &DepEvents, + KernelType KernelFunc); // (9) template event parallel_for(nd_range ExecutionRange, KernelType KernelFunc); // (10) @@ -45,6 +45,6 @@ class queue { template event parallel_for(nd_range ExecutionRange, - const vector_class &DepEvents, - KernelType KernelFunc); // (12) + const std::vector &DepEvents, + KernelType KernelFunc); // (12) }; diff --git a/sycl/doc/extensions/SubGroup/SYCL_INTEL_sub_group.asciidoc b/sycl/doc/extensions/SubGroup/SYCL_INTEL_sub_group.asciidoc index cf4032373be29..ae2b9855428c2 100755 --- a/sycl/doc/extensions/SubGroup/SYCL_INTEL_sub_group.asciidoc +++ b/sycl/doc/extensions/SubGroup/SYCL_INTEL_sub_group.asciidoc @@ -108,8 +108,8 @@ The device descriptors below are added to the +info::device+ enumeration class: |Return a sub-group size supported by this device that is guaranteed to support all core language features for the device. |+info::device::sub_group_sizes+ -|+vector_class+ -|Returns a vector_class of +size_t+ containing the set of sub-group sizes supported by the device. Each sub-group size is a power of 2 in the range [1, 2^31^]. Not all sub-group sizes are guaranteed to be compatible with all core language features; any incompatibilities are implementation-defined. +|+std::vector+ +|Returns a std::vector of +size_t+ containing the set of sub-group sizes supported by the device. Each sub-group size is a power of 2 in the range [1, 2^31^]. Not all sub-group sizes are guaranteed to be compatible with all core language features; any incompatibilities are implementation-defined. |=== An additional query is added to the +kernel+ class, enabling an input value to be passed to `get_info`. The original `get_info` query from the SYCL_INTEL_device_specific_kernel_queries extension should be used for queries that do not specify an input type. diff --git a/sycl/include/CL/sycl/exception.hpp b/sycl/include/CL/sycl/exception.hpp index e512862d336f9..1bb3239969da7 100644 --- a/sycl/include/CL/sycl/exception.hpp +++ b/sycl/include/CL/sycl/exception.hpp @@ -77,7 +77,7 @@ class __SYCL_EXPORT exception : public std::exception { : MMsg(Msg + " " + detail::codeToString(CLErr)), MCLErr(CLErr), MContext(Context) {} - exception(const string_class &Msg) : MMsg(Msg), MContext(nullptr) {} + exception(const std::string &Msg) : MMsg(Msg), MContext(nullptr) {} // base constructor for all SYCL 2020 constructors // exception(context *ctxPtr, std::error_code ec, const std::string diff --git a/sycl/include/CL/sycl/handler.hpp b/sycl/include/CL/sycl/handler.hpp index c0663563f1e90..002865a94deb0 100644 --- a/sycl/include/CL/sycl/handler.hpp +++ b/sycl/include/CL/sycl/handler.hpp @@ -1375,7 +1375,7 @@ class __SYCL_EXPORT handler { int Dims, typename Reduction> void parallel_for(range Range, Reduction Redu, _KERNELFUNCPARAM(KernelFunc)) { - shared_ptr_class QueueCopy = MQueue; + std::shared_ptr QueueCopy = MQueue; // Before running the kernels, check that device has enough local memory // to hold local arrays required for the tree-reduction algorithm. @@ -1461,7 +1461,7 @@ class __SYCL_EXPORT handler { parallel_for(nd_range Range, Reduction Redu, _KERNELFUNCPARAM(KernelFunc)) { - shared_ptr_class QueueCopy = MQueue; + std::shared_ptr QueueCopy = MQueue; device D = detail::getDeviceFromHandler(*this); if (D.has(aspect::atomic64)) { diff --git a/sycl/include/CL/sycl/queue.hpp b/sycl/include/CL/sycl/queue.hpp index 01f6cbc99015e..e9edd5705873a 100644 --- a/sycl/include/CL/sycl/queue.hpp +++ b/sycl/include/CL/sycl/queue.hpp @@ -448,7 +448,7 @@ class __SYCL_EXPORT queue { /// \return an event representing fill operation. template event fill(void *Ptr, const T &Pattern, size_t Count, - const vector_class &DepEvents) { + const std::vector &DepEvents) { return submit([&](handler &CGH) { CGH.depends_on(DepEvents); CGH.fill(Ptr, Pattern, Count); @@ -490,7 +490,7 @@ class __SYCL_EXPORT queue { /// dependencies. /// \return an event representing fill operation. event memset(void *Ptr, int Value, size_t Count, - const vector_class &DepEvents); + const std::vector &DepEvents); /// Copies data from one memory region to another, both pointed by /// USM pointers. @@ -530,7 +530,7 @@ class __SYCL_EXPORT queue { /// dependencies. /// \return an event representing copy operation. event memcpy(void *Dest, const void *Src, size_t Count, - const vector_class &DepEvents); + const std::vector &DepEvents); /// Copies data from one memory region to another, both pointed by /// USM pointers. @@ -575,7 +575,7 @@ class __SYCL_EXPORT queue { /// \return an event representing copy operation. template event copy(const T *Src, T *Dest, size_t Count, - const vector_class &DepEvents) { + const std::vector &DepEvents) { return this->memcpy(Dest, Src, Count * sizeof(T), DepEvents); } @@ -618,7 +618,7 @@ class __SYCL_EXPORT queue { /// dependencies. /// \return an event representing advice operation. event mem_advise(const void *Ptr, size_t Length, int Advice, - const vector_class &DepEvents); + const std::vector &DepEvents); /// Provides hints to the runtime library that data should be made available /// on a device earlier than Unified Shared Memory would normally require it @@ -656,7 +656,7 @@ class __SYCL_EXPORT queue { /// dependencies. /// \return an event representing prefetch operation. event prefetch(const void *Ptr, size_t Count, - const vector_class &DepEvents) { + const std::vector &DepEvents) { return submit([=](handler &CGH) { CGH.depends_on(DepEvents); CGH.prefetch(Ptr, Count); @@ -1061,7 +1061,7 @@ class __SYCL_EXPORT queue { /// \param CodeLoc code location /// /// This method stores additional information within event_impl class instance - event submit_impl_and_postprocess(function_class CGH, + event submit_impl_and_postprocess(std::function CGH, const detail::code_location &CodeLoc, const SubmitPostProcessF &PostProcess); /// A template-free version of submit. @@ -1070,7 +1070,7 @@ class __SYCL_EXPORT queue { /// \param CodeLoc code location /// /// This method stores additional information within event_impl class instance - event submit_impl_and_postprocess(function_class CGH, + event submit_impl_and_postprocess(std::function CGH, queue secondQueue, const detail::code_location &CodeLoc, const SubmitPostProcessF &PostProcess); diff --git a/sycl/include/CL/sycl/stl.hpp b/sycl/include/CL/sycl/stl.hpp index f70ffca13a188..3e0caec81fa6c 100644 --- a/sycl/include/CL/sycl/stl.hpp +++ b/sycl/include/CL/sycl/stl.hpp @@ -47,32 +47,6 @@ namespace sycl { #endif #endif // defined(_WIN32) && !defined(_DLL) && !defined(__SYCL_DEVICE_ONLY__) -// TODO deprecation attribute can not be applied to template alias. Find a way -// to show deprecation warning with those aliases anyway. - -template > -using vector_class = std::vector; - -using string_class - __SYCL2020_DEPRECATED("use STL classes directly") = std::string; - -template using function_class = std::function; - -using mutex_class - __SYCL2020_DEPRECATED("use STL classes directly") = std::mutex; - -template > -using unique_ptr_class = std::unique_ptr; - -template using shared_ptr_class = std::shared_ptr; - -template using weak_ptr_class = std::weak_ptr; - -template using hash_class = std::hash; - -using exception_ptr_class - __SYCL2020_DEPRECATED("use STL classes directly") = std::exception_ptr; - template std::unique_ptr make_unique_ptr(ArgsT &&... Args) { return std::unique_ptr(new T(std::forward(Args)...)); diff --git a/sycl/include/sycl/ext/oneapi/reduction.hpp b/sycl/include/sycl/ext/oneapi/reduction.hpp index f2d47d4781700..7d3974f593f80 100644 --- a/sycl/include/sycl/ext/oneapi/reduction.hpp +++ b/sycl/include/sycl/ext/oneapi/reduction.hpp @@ -2073,7 +2073,7 @@ namespace __SYCL2020_DEPRECATED("use 'ext::oneapi' instead") ONEAPI { using namespace ext::oneapi; namespace detail { using cl::sycl::detail::queue_impl; - __SYCL_EXPORT size_t reduGetMaxWGSize(shared_ptr_class Queue, + __SYCL_EXPORT size_t reduGetMaxWGSize(std::shared_ptr Queue, size_t LocalMemBytesPerWorkItem); __SYCL_EXPORT size_t reduComputeWGSize(size_t NWorkItems, size_t MaxWGSize, size_t &NWorkGroups); diff --git a/sycl/source/detail/program_manager/program_manager.cpp b/sycl/source/detail/program_manager/program_manager.cpp index b916039bda9ee..26722d6eb2c9b 100644 --- a/sycl/source/detail/program_manager/program_manager.cpp +++ b/sycl/source/detail/program_manager/program_manager.cpp @@ -1548,7 +1548,7 @@ ProgramManager::link(const std::vector &DeviceImages, if (Error != PI_SUCCESS) { if (LinkedProg) { - const string_class ErrorMsg = getProgramBuildLog(LinkedProg, ContextImpl); + const std::string ErrorMsg = getProgramBuildLog(LinkedProg, ContextImpl); throw sycl::exception(make_error_code(errc::build), ErrorMsg); } Plugin.reportPiError(Error, "link()"); diff --git a/sycl/source/detail/queue_impl.cpp b/sycl/source/detail/queue_impl.cpp index 41880d4d2870a..44b378e5d03ce 100644 --- a/sycl/source/detail/queue_impl.cpp +++ b/sycl/source/detail/queue_impl.cpp @@ -92,7 +92,7 @@ event queue_impl::memcpy(const std::shared_ptr &Self, event queue_impl::mem_advise(const std::shared_ptr &Self, const void *Ptr, size_t Length, pi_mem_advice Advice, - const vector_class &DepEvents) { + const std::vector &DepEvents) { RT::PiEvent NativeEvent{}; MemoryManager::advise_usm(Ptr, Self, Length, Advice, getOrWaitEvents(DepEvents, MContext), NativeEvent); @@ -260,7 +260,7 @@ void queue_impl::wait(const detail::code_location &CodeLoc) { std::vector> WeakEvents; std::vector SharedEvents; { - std::lock_guard Lock(MMutex); + std::lock_guard Lock(MMutex); WeakEvents.swap(MEventsWeak); SharedEvents.swap(MEventsShared); } diff --git a/sycl/source/detail/reduction.cpp b/sycl/source/detail/reduction.cpp index 6f268f2fb15a6..508600b796e83 100644 --- a/sycl/source/detail/reduction.cpp +++ b/sycl/source/detail/reduction.cpp @@ -124,7 +124,7 @@ namespace __SYCL2020_DEPRECATED("use 'ext::oneapi' instead") ONEAPI { } __SYCL_EXPORT size_t - reduGetMaxWGSize(shared_ptr_class Queue, + reduGetMaxWGSize(std::shared_ptr Queue, size_t LocalMemBytesPerWorkItem) { return ext::oneapi::detail::reduGetMaxWGSize(Queue, LocalMemBytesPerWorkItem); diff --git a/sycl/source/queue.cpp b/sycl/source/queue.cpp index 50031313412a9..d1cf4e25aaec3 100644 --- a/sycl/source/queue.cpp +++ b/sycl/source/queue.cpp @@ -87,7 +87,7 @@ event queue::memset(void *Ptr, int Value, size_t Count, event DepEvent) { } event queue::memset(void *Ptr, int Value, size_t Count, - const vector_class &DepEvents) { + const std::vector &DepEvents) { return impl->memset(impl, Ptr, Value, Count, DepEvents); } @@ -100,7 +100,7 @@ event queue::memcpy(void *Dest, const void *Src, size_t Count, event DepEvent) { } event queue::memcpy(void *Dest, const void *Src, size_t Count, - const vector_class &DepEvents) { + const std::vector &DepEvents) { return impl->memcpy(impl, Dest, Src, Count, DepEvents); } @@ -118,7 +118,7 @@ event queue::mem_advise(const void *Ptr, size_t Length, int Advice, } event queue::mem_advise(const void *Ptr, size_t Length, int Advice, - const vector_class &DepEvents) { + const std::vector &DepEvents) { return impl->mem_advise(impl, Ptr, Length, pi_mem_advice(Advice), DepEvents); } @@ -133,13 +133,13 @@ event queue::submit_impl(std::function CGH, queue SecondQueue, } event queue::submit_impl_and_postprocess( - function_class CGH, const detail::code_location &CodeLoc, + std::function CGH, const detail::code_location &CodeLoc, const SubmitPostProcessF &PostProcess) { return impl->submit(CGH, impl, CodeLoc, &PostProcess); } event queue::submit_impl_and_postprocess( - function_class CGH, queue SecondQueue, + std::function CGH, queue SecondQueue, const detail::code_location &CodeLoc, const SubmitPostProcessF &PostProcess) { return impl->submit(CGH, impl, SecondQueue.impl, CodeLoc, &PostProcess); diff --git a/sycl/test/basic_tests/buffer/buffer_ctad.cpp b/sycl/test/basic_tests/buffer/buffer_ctad.cpp index 858ee6fe21edb..ee38871623307 100644 --- a/sycl/test/basic_tests/buffer/buffer_ctad.cpp +++ b/sycl/test/basic_tests/buffer/buffer_ctad.cpp @@ -35,21 +35,21 @@ int main() { buffer b3a(cv); static_assert(std::is_same>::value); - shared_ptr_class ptr{new int[5], [](int *p) { delete[] p; }}; + std::shared_ptr ptr{new int[5], [](int *p) { delete[] p; }}; buffer b4(ptr, range<1>(5)); static_assert(std::is_same>::value); std::allocator buf_alloc; - shared_ptr_class ptr_alloc{new int[5], [](int *p) { delete[] p; }}; + std::shared_ptr ptr_alloc{new int[5], [](int *p) { delete[] p; }}; buffer b5(ptr_alloc, range<1>(5), buf_alloc); static_assert( std::is_same>>::value); - shared_ptr_class arr_ptr{new int[5]}; + std::shared_ptr arr_ptr{new int[5]}; buffer b6(arr_ptr, range<1>(5)); static_assert(std::is_same>::value); - shared_ptr_class arr_ptr_alloc{new int[5]}; + std::shared_ptr arr_ptr_alloc{new int[5]}; buffer b7(arr_ptr_alloc, range<1>(5), buf_alloc); static_assert( std::is_same>>::value); diff --git a/sycl/test/basic_tests/context.cpp b/sycl/test/basic_tests/context.cpp index fab5335460f23..4d3730dd7338d 100644 --- a/sycl/test/basic_tests/context.cpp +++ b/sycl/test/basic_tests/context.cpp @@ -21,9 +21,9 @@ int main() { { std::cout << "move constructor" << std::endl; context Context(deviceA); - size_t hash = hash_class()(Context); + size_t hash = std::hash()(Context); context MovedContext(std::move(Context)); - assert(hash == hash_class()(MovedContext)); + assert(hash == std::hash()(MovedContext)); assert(deviceA.is_host() == MovedContext.is_host()); if (!deviceA.is_host()) { assert(MovedContext.get() != nullptr); @@ -32,10 +32,10 @@ int main() { { std::cout << "move assignment operator" << std::endl; context Context(deviceA); - size_t hash = hash_class()(Context); + size_t hash = std::hash()(Context); context WillMovedContext(deviceB); WillMovedContext = std::move(Context); - assert(hash == hash_class()(WillMovedContext)); + assert(hash == std::hash()(WillMovedContext)); assert(deviceA.is_host() == WillMovedContext.is_host()); if (!deviceA.is_host()) { assert(WillMovedContext.get() != nullptr); @@ -44,21 +44,21 @@ int main() { { std::cout << "copy constructor" << std::endl; context Context(deviceA); - size_t hash = hash_class()(Context); + size_t hash = std::hash()(Context); context ContextCopy(Context); - assert(hash == hash_class()(Context)); - assert(hash == hash_class()(ContextCopy)); + assert(hash == std::hash()(Context)); + assert(hash == std::hash()(ContextCopy)); assert(Context == ContextCopy); assert(Context.is_host() == ContextCopy.is_host()); } { std::cout << "copy assignment operator" << std::endl; context Context(deviceA); - size_t hash = hash_class()(Context); + size_t hash = std::hash()(Context); context WillContextCopy(deviceB); WillContextCopy = Context; - assert(hash == hash_class()(Context)); - assert(hash == hash_class()(WillContextCopy)); + assert(hash == std::hash()(Context)); + assert(hash == std::hash()(WillContextCopy)); assert(Context == WillContextCopy); assert(Context.is_host() == WillContextCopy.is_host()); } diff --git a/sycl/test/basic_tests/device.cpp b/sycl/test/basic_tests/device.cpp index 06c9f4f343a09..db60824c7bd05 100644 --- a/sycl/test/basic_tests/device.cpp +++ b/sycl/test/basic_tests/device.cpp @@ -10,7 +10,7 @@ using namespace cl::sycl; -string_class get_type(const device &dev) { +std::string get_type(const device &dev) { if (dev.is_host()) { return "host"; } else if (dev.is_gpu()) { @@ -63,9 +63,9 @@ int main() { { std::cout << "move constructor" << std::endl; device Device(deviceA); - size_t hash = hash_class()(Device); + size_t hash = std::hash()(Device); device MovedDevice(std::move(Device)); - assert(hash == hash_class()(MovedDevice)); + assert(hash == std::hash()(MovedDevice)); assert(deviceA.is_host() == MovedDevice.is_host()); if (!deviceA.is_host()) { assert(MovedDevice.get() != nullptr); @@ -74,10 +74,10 @@ int main() { { std::cout << "move assignment operator" << std::endl; device Device(deviceA); - size_t hash = hash_class()(Device); + size_t hash = std::hash()(Device); device WillMovedDevice(deviceB); WillMovedDevice = std::move(Device); - assert(hash == hash_class()(WillMovedDevice)); + assert(hash == std::hash()(WillMovedDevice)); assert(deviceA.is_host() == WillMovedDevice.is_host()); if (!deviceA.is_host()) { assert(WillMovedDevice.get() != nullptr); @@ -86,21 +86,21 @@ int main() { { std::cout << "copy constructor" << std::endl; device Device(deviceA); - size_t hash = hash_class()(Device); + size_t hash = std::hash()(Device); device DeviceCopy(Device); - assert(hash == hash_class()(Device)); - assert(hash == hash_class()(DeviceCopy)); + assert(hash == std::hash()(Device)); + assert(hash == std::hash()(DeviceCopy)); assert(Device == DeviceCopy); assert(Device.is_host() == DeviceCopy.is_host()); } { std::cout << "copy assignment operator" << std::endl; device Device(deviceA); - size_t hash = hash_class()(Device); + size_t hash = std::hash()(Device); device WillDeviceCopy(deviceB); WillDeviceCopy = Device; - assert(hash == hash_class()(Device)); - assert(hash == hash_class()(WillDeviceCopy)); + assert(hash == std::hash()(Device)); + assert(hash == std::hash()(WillDeviceCopy)); assert(Device == WillDeviceCopy); assert(Device.is_host() == WillDeviceCopy.is_host()); } diff --git a/sycl/test/basic_tests/queue/queue_parallel_for_interface.cpp b/sycl/test/basic_tests/queue/queue_parallel_for_interface.cpp index 9ceadb15b06de..709d9aeeb8702 100644 --- a/sycl/test/basic_tests/queue/queue_parallel_for_interface.cpp +++ b/sycl/test/basic_tests/queue/queue_parallel_for_interface.cpp @@ -90,7 +90,8 @@ void test_number_event(sycl::queue q, sycl::event e) { }); } -void test_number_event_vector(sycl::queue q, const sycl::vector_class &events) { +void test_number_event_vector(sycl::queue q, + const std::vector &events) { q.parallel_for(1, events, [=](auto i) { static_assert(std::is_same>::value, "lambda arg type is unexpected"); @@ -130,7 +131,7 @@ int main() { test_number_event_vector(q, {e1, e2}); - sycl::vector_class events{e1, e2}; + std::vector events{e1, e2}; test_braced_init_list_event(q, events); test_braced_init_list_event(q, events); test_braced_init_list_event(q, events); diff --git a/sycl/test/helpers.hpp b/sycl/test/helpers.hpp index e5ca8f768faed..a93bd25645998 100644 --- a/sycl/test/helpers.hpp +++ b/sycl/test/helpers.hpp @@ -58,19 +58,19 @@ class TestQueue : public sycl::queue { public: TestQueue(const sycl::device_selector &DevSelector, const sycl::property_list &PropList = {}) - : sycl::queue(DevSelector, - [](sycl::exception_list ExceptionList) { - for (sycl::exception_ptr_class ExceptionPtr : - ExceptionList) { - try { - std::rethrow_exception(ExceptionPtr); - } catch (sycl::exception &E) { - std::cerr << E.what() << std::endl; - } - } - abort(); - }, - PropList) {} + : sycl::queue( + DevSelector, + [](sycl::exception_list ExceptionList) { + for (std::exception_ptr ExceptionPtr : ExceptionList) { + try { + std::rethrow_exception(ExceptionPtr); + } catch (sycl::exception &E) { + std::cerr << E.what() << std::endl; + } + } + abort(); + }, + PropList) {} ~TestQueue() { wait_and_throw(); } }; diff --git a/sycl/test/scheduler/BasicSchedulerTests.cpp b/sycl/test/scheduler/BasicSchedulerTests.cpp index 8be4042d4a726..e30092d1db467 100644 --- a/sycl/test/scheduler/BasicSchedulerTests.cpp +++ b/sycl/test/scheduler/BasicSchedulerTests.cpp @@ -24,7 +24,7 @@ template void runTest(TestFuncT TestFunc) { sycl::queue Queue([&AsyncException](sycl::exception_list ExceptionList) { AsyncException = true; - for (sycl::exception_ptr_class ExceptionPtr : ExceptionList) { + for (std::exception_ptr ExceptionPtr : ExceptionList) { try { std::rethrow_exception(ExceptionPtr); } catch (sycl::exception &E) { diff --git a/sycl/test/warnings/sycl_2020_deprecations.cpp b/sycl/test/warnings/sycl_2020_deprecations.cpp index 0e155d13a9aa5..ab08b29cf255d 100644 --- a/sycl/test/warnings/sycl_2020_deprecations.cpp +++ b/sycl/test/warnings/sycl_2020_deprecations.cpp @@ -106,12 +106,6 @@ int main() { sycl::profiling_error pre; // expected-warning@+1 {{'feature_not_supported' is deprecated: use sycl::exception with sycl::errc::feature_not_supported instead.}} sycl::feature_not_supported fns; - // expected-warning@+1{{'string_class' is deprecated: use STL classes directly}} - sycl::string_class Str = "abc"; - (void)Str; - // expected-warning@+1{{'mutex_class' is deprecated: use STL classes directly}} - sycl::mutex_class Mtx; - (void)Mtx; // expected-warning@+1{{'exception' is deprecated: The version of an exception constructor which takes no arguments is deprecated.}} sycl::exception ex; // expected-warning@+1{{'get_cl_code' is deprecated: use sycl::exception.code() instead.}} diff --git a/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp b/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp index 326153d47fb6d..4e65983ccf4b5 100644 --- a/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp +++ b/sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp @@ -129,12 +129,12 @@ class PersistenDeviceCodeCache : public ::testing::Test { b.wait(); detail::PersistentDeviceCodeCache::putItemToDisc( Dev, Img, - sycl::vector_class( + std::vector( {'S', 'p', 'e', 'c', 'C', 'o', 'n', 's', 't', ProgramID}), BuildOptions, NativeProg); auto Res = detail::PersistentDeviceCodeCache::getItemFromDisc( Dev, Img, - sycl::vector_class( + std::vector( {'S', 'p', 'e', 'c', 'C', 'o', 'n', 's', 't', ProgramID}), BuildOptions); for (size_t i = 0; i < Res.size(); ++i) { diff --git a/sycl/unittests/program_manager/EliminatedArgMask.cpp b/sycl/unittests/program_manager/EliminatedArgMask.cpp index d64e8c7c0b476..903e48279edee 100644 --- a/sycl/unittests/program_manager/EliminatedArgMask.cpp +++ b/sycl/unittests/program_manager/EliminatedArgMask.cpp @@ -121,12 +121,12 @@ inline pi_result redefinedProgramCreateEAM(pi_context, const void *, size_t, class MockHandler : public sycl::handler { public: - MockHandler(sycl::shared_ptr_class Queue) + MockHandler(std::shared_ptr Queue) : sycl::handler(Queue, /* IsHost */ false) {} - sycl::unique_ptr_class finalize() { + std::unique_ptr finalize() { auto CGH = static_cast(this); - sycl::unique_ptr_class CommandGroup; + std::unique_ptr CommandGroup; switch (getType()) { case sycl::detail::CG::Kernel: { CommandGroup.reset(new sycl::detail::CGExecKernel( @@ -160,7 +160,7 @@ sycl::detail::ProgramManager::KernelArgMask getKernelArgMaskFromBundle( MockCGH.use_kernel_bundle(ExecBundle); MockCGH.single_task([] {}); // Actual kernel does not matter - sycl::unique_ptr_class CmdGroup = MockCGH.finalize(); + std::unique_ptr CmdGroup = MockCGH.finalize(); auto *ExecKernel = static_cast(CmdGroup.get()); const auto &KernelBundleImplPtr = ExecKernel->getKernelBundle(); diff --git a/sycl/unittests/scheduler/LeavesCollection.cpp b/sycl/unittests/scheduler/LeavesCollection.cpp index a731f960c0c4a..19d243388d198 100644 --- a/sycl/unittests/scheduler/LeavesCollection.cpp +++ b/sycl/unittests/scheduler/LeavesCollection.cpp @@ -19,7 +19,7 @@ class LeavesCollectionTest : public ::testing::Test { protected: cl::sycl::async_handler MAsyncHandler = [](cl::sycl::exception_list ExceptionList) { - for (cl::sycl::exception_ptr_class ExceptionPtr : ExceptionList) { + for (std::exception_ptr ExceptionPtr : ExceptionList) { try { std::rethrow_exception(ExceptionPtr); } catch (cl::sycl::exception &E) { diff --git a/sycl/unittests/scheduler/SchedulerTest.hpp b/sycl/unittests/scheduler/SchedulerTest.hpp index 7e905d8a2f91f..6c4cd5f00adda 100644 --- a/sycl/unittests/scheduler/SchedulerTest.hpp +++ b/sycl/unittests/scheduler/SchedulerTest.hpp @@ -15,7 +15,7 @@ class SchedulerTest : public ::testing::Test { protected: cl::sycl::async_handler MAsyncHandler = [](cl::sycl::exception_list ExceptionList) { - for (cl::sycl::exception_ptr_class ExceptionPtr : ExceptionList) { + for (std::exception_ptr ExceptionPtr : ExceptionList) { try { std::rethrow_exception(ExceptionPtr); } catch (cl::sycl::exception &E) { diff --git a/sycl/unittests/scheduler/StreamInitDependencyOnHost.cpp b/sycl/unittests/scheduler/StreamInitDependencyOnHost.cpp index 1455b33260824..395b7e2846f34 100644 --- a/sycl/unittests/scheduler/StreamInitDependencyOnHost.cpp +++ b/sycl/unittests/scheduler/StreamInitDependencyOnHost.cpp @@ -15,7 +15,7 @@ using namespace cl::sycl; class MockHandler : public sycl::handler { public: - MockHandler(shared_ptr_class Queue, bool IsHost) + MockHandler(std::shared_ptr Queue, bool IsHost) : sycl::handler(Queue, IsHost) {} void setType(detail::CG::CGTYPE Type) { @@ -38,9 +38,9 @@ class MockHandler : public sycl::handler { sycl::handler::addStream(Stream); } - unique_ptr_class finalize() { + std::unique_ptr finalize() { auto CGH = static_cast(this); - unique_ptr_class CommandGroup; + std::unique_ptr CommandGroup; switch (CGH->MCGType) { case detail::CG::Kernel: case detail::CG::RunOnHostIntel: { @@ -118,10 +118,10 @@ TEST_F(SchedulerTest, StreamInitDependencyOnHost) { ASSERT_TRUE(!!FlushBufMemObjPtr) << "Memory object for stream flush buffer not initialized"; - unique_ptr_class MainCG = MockCGH.finalize(); + std::unique_ptr MainCG = MockCGH.finalize(); // Emulate call of Scheduler::addCG - vector_class Streams = + std::vector Streams = static_cast(MainCG.get())->getStreams(); ASSERT_EQ(Streams.size(), 1u) << "Invalid number of stream objects";