Skip to content

Commit 4601713

Browse files
committed
[SYCL] Fixing comment about propagation of attributes to kernel
1 parent b28af10 commit 4601713

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fsycl -fsycl-is-device -verify %s
2+
3+
[[intelfpga::no_global_work_offset]] void indirect_func() {} //expected-warning {{'no_global_work_offset' attribute ignored}}
4+
5+
void func() { indirect_func(); }
6+
7+
template <typename Name, typename Type>
8+
[[clang::sycl_kernel]] void __my_kernel__(Type bar) {
9+
bar();
10+
func();
11+
}
12+
13+
template <typename Name, typename Type>
14+
void parallel_for(Type lambda) {
15+
__my_kernel__<Name>(lambda);
16+
}
17+
18+
void invoke_foo2() {
19+
parallel_for<class KernelName>([]() {});
20+
}

0 commit comments

Comments
 (0)