File tree Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %clangxx -fsycl -fsycl-unnamed-lambda %s -o %t.out
2
+ #include " CL/sycl.hpp"
3
+
4
+ // This validates the case where using a lambda in a kernel in a different order
5
+ // than the lexical order of the lambdas. In a previous implementation of
6
+ // __builtin_sycl_unique_stable_name this would result in the value of the
7
+ // builtin being invalidated, causing a compile error. The redesigned
8
+ // implementation should no longer have a problem with this pattern.
9
+ void out_of_order_decls () {
10
+ auto w = [](auto i) {};
11
+ sycl::queue q;
12
+ q.parallel_for (10 , [](auto i) {});
13
+ q.parallel_for (10 , w);
14
+ }
Original file line number Diff line number Diff line change @@ -33,15 +33,3 @@ void bar(cl::sycl::queue queue) {
33
33
cgh.parallel_for <class K2 >(cl::sycl::range<2 >{1024 ,768 }, f);
34
34
});
35
35
}
36
-
37
- // This validates the case where using a lambda in a kernel in a different order
38
- // than the lexical order of the lambdas. In a previous implementation of
39
- // __builtin_sycl_unique_stable_name this would result in the value of the
40
- // builtin being invalidated, causing a compile error. The redesigned
41
- // implementation should no longer have a problem with this pattern.
42
- void out_of_order_decls () {
43
- auto w = [](auto i) {};
44
- sycl::queue q;
45
- q.parallel_for (10 , [](auto i) {});
46
- q.parallel_for (10 , w);
47
- }
You can’t perform that action at this time.
0 commit comments