Skip to content

Commit 4eaeb32

Browse files
author
Erich Keane
committed
Move the test back, since it doesn't work in 1.2.1 mode
This is a test for unnamed kernels, so if we don't have unnamed kernels, it isn't meaningful.
1 parent 7700932 commit 4eaeb32

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
}

sycl/test/regression/unnamed-lambda.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,3 @@ void bar(cl::sycl::queue queue) {
3333
cgh.parallel_for<class K2>(cl::sycl::range<2>{1024,768}, f);
3434
});
3535
}
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-
}

0 commit comments

Comments
 (0)