[llvm-branch-commits] [llvm] [libsycl] add single_task (PR #188797)

Kseniya Tikhomirova via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Mar 30 08:54:08 PDT 2026


================
@@ -0,0 +1,18 @@
+// REQUIRES: any-device
+// RUN: %clangxx -fsycl  %s -o %t.out
+// RUN: %t.out
+
+#include <sycl/sycl.hpp>
+
+class Test;
+
+int main() {
+  sycl::queue q;
+  int *p = sycl::malloc_shared<int>(1, q);
+  *p = 0;
+  q.single_task<Test>([=]() { *p = 42; });
----------------
KseniyaTikhomirova wrote:

Something like this? https://github.com/llvm/llvm-project/pull/189068/changes#diff-a34900306611efa92d48cf60a11c14f4bf5ffbd204c80610d7b1a7fc1fbcbaffR9

I would appreciate if you can implement extra tests you see to be useful. Or extend this one.

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


More information about the llvm-branch-commits mailing list