Skip to content

Commit e37ef8c

Browse files
author
Erich Keane
committed
Add comment to the regression suite test case, put it into unnamed-lambda.cpp instead as @AlexeySachkov requested offline
1 parent 1ffbae7 commit e37ef8c

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

sycl/test/regression/unnamed-lambda-split-order.cpp

Lines changed: 0 additions & 8 deletions
This file was deleted.

sycl/test/regression/unnamed-lambda.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,15 @@ 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 implemetation 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)