Skip to content

Commit 6588fe8

Browse files
committed
Change kernel direct submit functions in queue_impl to templates
1 parent 76bcaf2 commit 6588fe8

File tree

1 file changed

+4
-38
lines changed

1 file changed

+4
-38
lines changed

sycl/source/detail/queue_impl.hpp

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,9 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
359359
return createSyclObjFromImpl<event>(ResEvent);
360360
}
361361

362+
template <int Dims>
362363
event submit_kernel_direct_with_event(
363-
nd_range<1> Range, std::shared_ptr<detail::HostKernelBase> &HostKernel,
364+
nd_range<Dims> Range, std::shared_ptr<detail::HostKernelBase> &HostKernel,
364365
detail::DeviceKernelInfo *DeviceKernelInfo,
365366
const detail::code_location &CodeLoc, bool IsTopCodeLoc) {
366367
detail::EventImplPtr EventImpl =
@@ -369,44 +370,9 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
369370
return createSyclObjFromImpl<event>(EventImpl);
370371
}
371372

372-
event submit_kernel_direct_with_event(
373-
nd_range<2> Range, std::shared_ptr<detail::HostKernelBase> &HostKernel,
374-
detail::DeviceKernelInfo *DeviceKernelInfo,
375-
const detail::code_location &CodeLoc, bool IsTopCodeLoc) {
376-
detail::EventImplPtr EventImpl =
377-
submit_kernel_direct_impl(NDRDescT{Range}, HostKernel, DeviceKernelInfo,
378-
true, CodeLoc, IsTopCodeLoc);
379-
return createSyclObjFromImpl<event>(EventImpl);
380-
}
381-
382-
event submit_kernel_direct_with_event(
383-
nd_range<3> Range, std::shared_ptr<detail::HostKernelBase> &HostKernel,
384-
detail::DeviceKernelInfo *DeviceKernelInfo,
385-
const detail::code_location &CodeLoc, bool IsTopCodeLoc) {
386-
detail::EventImplPtr EventImpl =
387-
submit_kernel_direct_impl(NDRDescT{Range}, HostKernel, DeviceKernelInfo,
388-
true, CodeLoc, IsTopCodeLoc);
389-
return createSyclObjFromImpl<event>(EventImpl);
390-
}
391-
392-
void submit_kernel_direct_without_event(
393-
nd_range<1> Range, std::shared_ptr<detail::HostKernelBase> &HostKernel,
394-
detail::DeviceKernelInfo *DeviceKernelInfo,
395-
const detail::code_location &CodeLoc, bool IsTopCodeLoc) {
396-
submit_kernel_direct_impl(NDRDescT{Range}, HostKernel, DeviceKernelInfo,
397-
false, CodeLoc, IsTopCodeLoc);
398-
}
399-
400-
void submit_kernel_direct_without_event(
401-
nd_range<2> Range, std::shared_ptr<detail::HostKernelBase> &HostKernel,
402-
detail::DeviceKernelInfo *DeviceKernelInfo,
403-
const detail::code_location &CodeLoc, bool IsTopCodeLoc) {
404-
submit_kernel_direct_impl(NDRDescT{Range}, HostKernel, DeviceKernelInfo,
405-
false, CodeLoc, IsTopCodeLoc);
406-
}
407-
373+
template <int Dims>
408374
void submit_kernel_direct_without_event(
409-
nd_range<3> Range, std::shared_ptr<detail::HostKernelBase> &HostKernel,
375+
nd_range<Dims> Range, std::shared_ptr<detail::HostKernelBase> &HostKernel,
410376
detail::DeviceKernelInfo *DeviceKernelInfo,
411377
const detail::code_location &CodeLoc, bool IsTopCodeLoc) {
412378
submit_kernel_direct_impl(NDRDescT{Range}, HostKernel, DeviceKernelInfo,

0 commit comments

Comments
 (0)