[llvm-branch-commits] [llvm] [libsycl] Add parallel_for feature (PR #189068)
Kseniya Tikhomirova via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Apr 1 07:08:37 PDT 2026
================
@@ -199,18 +178,169 @@ class _LIBSYCL_EXPORT queue {
"group. ");
setKernelParameters(depEvents);
- submitSingleTask<KernelName, KernelType>(kernelFunc);
+ using NameT =
+ typename detail::get_kernel_name_t<KernelName, KernelType>::name;
+ submitSingleTask<NameT, KernelType>(kernelFunc);
return getLastEvent();
}
+ /// Defines and invokes a SYCL kernel function as a lambda expression or a
+ /// named function object type, for the specified range.
+ ///
+ /// \param numWorkItems specifies the global work space of the kernel.
+ /// \param rest acts as-if: const KernelType &KernelFunc".
+ // TODO: Rest will represent reduction types once it is supported.
+ template <typename KernelName = detail::AutoName, typename... Rest>
+ event parallel_for(range<1> numWorkItems, Rest &&...rest) {
----------------
KseniyaTikhomirova wrote:
no, it will cause issues with integral type conversion to range. I implemented it initially exactly this way and broke this functionality.
https://github.com/llvm/llvm-project/pull/189068
More information about the llvm-branch-commits
mailing list