[llvm] [libsycl] extend sycl::event API with get_wait_list, wait_and_throw and default ctor (PR #205860)

Yury Plyakhin via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 29 16:54:09 PDT 2026


================
@@ -42,9 +43,25 @@ class EventImpl {
   EventImpl(ol_event_handle_t Event, PlatformImpl &Platform, PrivateTag)
       : MOffloadEvent(Event), MPlatform(Platform) {}
 
+  /// Constructs a default, immediately ready event.
+  /// The event is constructed as though it were created from a
+  /// default-constructed queue. Therefore, its backend is the same as the
+  /// backend of the device selected by default_selector_v.
+  /// \throw sycl::exception with errc::runtime if no default device is
+  /// available.
+  EventImpl(PrivateTag);
+
   static std::shared_ptr<EventImpl>
-  createEventWithHandle(ol_event_handle_t Event, PlatformImpl &Platform) {
-    return std::make_shared<EventImpl>(Event, Platform, PrivateTag{});
+  createEventWithHandle(ol_event_handle_t Event, PlatformImpl &Platform,
+                        std::vector<std::shared_ptr<EventImpl>> &&WaitList) {
+    auto E = std::make_shared<EventImpl>(Event, Platform, PrivateTag{});
+    E->MWaitList =
+        std::forward<std::vector<std::shared_ptr<EventImpl>>>(WaitList);
----------------
YuriPlyakhin wrote:

The type is known and not deduced. Will move work?
```suggestion
        std::move(WaitList);
```

https://github.com/llvm/llvm-project/pull/205860


More information about the llvm-commits mailing list