llvm
f65a3b96 - [SYCL] Implement Kernel Name Types that are templated on function pointers for lambdas/functors (#22268)

Commit
52 days ago
[SYCL] Implement Kernel Name Types that are templated on function pointers for lambdas/functors (#22268) This PR enables the usage of kernel name types for lambdas/functors that are templated on function pointers. In particular, we restrict ourselves to function pointers to free function kernels rather than ordinary C++ functions. It looks something like this: ``` template <auto *Func> KernelName; handler.single_task<KernelName<&foo>>(/* lambda that calls foo at compile time*/); // foo is a free function kernel ``` This may be useful if we would like to generate unique names for kernel wrappers that simply redirect to the (constexpr) function pointer to do their work. The most substantial changes are on the front-end side where we do a reordering of free function kernels in the integration header to put them before all other kernels so that their declarations become visible before other kernels reference them. Joint effort from me and @dklochkov-emb --------- Co-authored-by: Klochkov, Denis <denis.klochkov@intel.com>
Author
Parents
Loading