@@ -862,6 +862,54 @@ class __SYCL_EXPORT queue {
862
862
return parallel_for_impl<KernelName>(Range, DepEvents, Rest...);
863
863
}
864
864
865
+ // While other shortcuts with offsets are able to go through parallel_for(...,
866
+ // RestT &&...Rest), those that accept dependency events vector have to be
867
+ // overloaded to allow implicit construction from an init-list.
868
+ // / parallel_for version with a kernel represented as a lambda + range and
869
+ // / offset that specify global size and global offset correspondingly.
870
+ // /
871
+ // / \param Range specifies the global work space of the kernel
872
+ // / \param WorkItemOffset specifies the offset for each work item id
873
+ // / \param KernelFunc is the Kernel functor or lambda
874
+ // / \param CodeLoc contains the code location of user code
875
+ template <typename KernelName = detail::auto_name, typename KernelType>
876
+ event parallel_for (range<1 > Range, id<1 > WorkItemOffset,
877
+ const std::vector<event> &DepEvents,
878
+ _KERNELFUNCPARAM (KernelFunc)) {
879
+ return parallel_for_impl<KernelName>(Range, WorkItemOffset, DepEvents,
880
+ KernelFunc);
881
+ }
882
+
883
+ // / parallel_for version with a kernel represented as a lambda + range and
884
+ // / offset that specify global size and global offset correspondingly.
885
+ // /
886
+ // / \param Range specifies the global work space of the kernel
887
+ // / \param WorkItemOffset specifies the offset for each work item id
888
+ // / \param KernelFunc is the Kernel functor or lambda
889
+ // / \param CodeLoc contains the code location of user code
890
+ template <typename KernelName = detail::auto_name, typename KernelType>
891
+ event parallel_for (range<2 > Range, id<2 > WorkItemOffset,
892
+ const std::vector<event> &DepEvents,
893
+ _KERNELFUNCPARAM (KernelFunc)) {
894
+ return parallel_for_impl<KernelName>(Range, WorkItemOffset, DepEvents,
895
+ KernelFunc);
896
+ }
897
+
898
+ // / parallel_for version with a kernel represented as a lambda + range and
899
+ // / offset that specify global size and global offset correspondingly.
900
+ // /
901
+ // / \param Range specifies the global work space of the kernel
902
+ // / \param WorkItemOffset specifies the offset for each work item id
903
+ // / \param KernelFunc is the Kernel functor or lambda
904
+ // / \param CodeLoc contains the code location of user code
905
+ template <typename KernelName = detail::auto_name, typename KernelType>
906
+ event parallel_for (range<3 > Range, id<3 > WorkItemOffset,
907
+ const std::vector<event> &DepEvents,
908
+ _KERNELFUNCPARAM (KernelFunc)) {
909
+ return parallel_for_impl<KernelName>(Range, WorkItemOffset, DepEvents,
910
+ KernelFunc);
911
+ }
912
+
865
913
// / parallel_for version with a kernel represented as a lambda + range and
866
914
// / offset that specify global size and global offset correspondingly.
867
915
// /
0 commit comments