Commit 11f53ad
[SYCL] Add support for templated call operator in functors (#7970)
This PR enables kernels to be defined as named function object types,
where the operator() member function is templated.
Example:
```
class FunctorWithCallOpTemplated {
int x;
public:
template <int x = 0>
void operator()() const {}
};
q.submit([&](sycl::handler &cgh) {
cgh.single_task(FunctorWithCallOpTemplated{});
});
```
---------
Co-authored-by: premanandrao <[email protected]>1 parent e85b51f commit 11f53ad
File tree
2 files changed
+33
-9
lines changed- clang
- lib/Sema
- test/SemaSYCL
2 files changed
+33
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
991 | 991 | | |
992 | 992 | | |
993 | 993 | | |
994 | | - | |
995 | | - | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
1000 | 1014 | | |
1001 | 1015 | | |
1002 | 1016 | | |
| |||
1009 | 1023 | | |
1010 | 1024 | | |
1011 | 1025 | | |
1012 | | - | |
| 1026 | + | |
1013 | 1027 | | |
1014 | 1028 | | |
1015 | 1029 | | |
| |||
2802 | 2816 | | |
2803 | 2817 | | |
2804 | 2818 | | |
2805 | | - | |
| 2819 | + | |
2806 | 2820 | | |
2807 | 2821 | | |
2808 | 2822 | | |
| |||
4041 | 4055 | | |
4042 | 4056 | | |
4043 | 4057 | | |
4044 | | - | |
| 4058 | + | |
4045 | 4059 | | |
4046 | 4060 | | |
4047 | 4061 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
| |||
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
40 | 50 | | |
0 commit comments