[llvm-branch-commits] [llvm] [libsycl] add sycl::event and wait functionality to event & queue (PR #188793)

Kseniya Tikhomirova via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Mar 30 06:53:32 PDT 2026


================
@@ -0,0 +1,90 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// This file contains the declaration of the SYCL event class (SYCL
+/// 2020 4.6.6.), that represents the status of an operation that is being
+/// executed by the SYCL runtime.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBSYCL___IMPL_EVENT_HPP
+#define _LIBSYCL___IMPL_EVENT_HPP
+
+#include <sycl/__impl/backend.hpp>
+#include <sycl/__impl/detail/config.hpp>
+#include <sycl/__impl/detail/obj_utils.hpp>
+#include <sycl/__impl/info/desc_base.hpp>
+
+#include <memory>
+#include <vector>
+
+_LIBSYCL_BEGIN_NAMESPACE_SYCL
+
+class event;
+
+namespace detail {
+class EventImpl;
+template <typename T>
+using is_event_info_desc_t = typename is_info_desc<T, event>::return_type;
+} // namespace detail
+
+/// SYCL 2020 4.6.6. Event class.
+class _LIBSYCL_EXPORT event {
+public:
+  event(const event &rhs) = default;
+
+  event(event &&rhs) = default;
+
+  event &operator=(const event &rhs) = default;
+
+  event &operator=(event &&rhs) = default;
+
+  friend bool operator==(const event &lhs, const event &rhs) {
+    return lhs.impl == rhs.impl;
+  }
+
+  friend bool operator!=(const event &lhs, const event &rhs) {
+    return !(lhs == rhs);
+  }
+
+  /// \return the backend associated with this platform.
----------------
KseniyaTikhomirova wrote:

https://github.com/llvm/llvm-project/pull/188793/changes/468de5c542a16f81a27980e8f7cfca9d51925240

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


More information about the llvm-branch-commits mailing list