Skip to content

Commit

Permalink
include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h - change f…
Browse files Browse the repository at this point in the history
…ormat of the make_device_policy functions to avoid create sycl::queue through device_policy::operator sycl::queue()
  • Loading branch information
Sergey Kopienko authored and SergeyKopienko committed Apr 25, 2024
1 parent 5559889 commit 2cdad2e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions include/oneapi/dpl/pstl/hetero/dpcpp/execution_sycl_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,13 @@ inline fpga_policy<> dpcpp_fpga{};
#endif // _ONEDPL_PREDEFINED_POLICIES

// make_policy functions
template <typename KernelNameOther>
auto
make_device_policy(const device_policy<KernelNameOther>& other)
{
return device_policy<DefaultKernelName>(other);
}

template <typename KernelName = DefaultKernelName>
device_policy<KernelName>
make_device_policy(sycl::queue q)
Expand All @@ -191,7 +198,7 @@ make_device_policy(sycl::device d)
return device_policy<KernelName>(d);
}

template <typename NewKernelName, typename OldKernelName = DefaultKernelName>
template <typename NewKernelName, typename OldKernelName>
device_policy<NewKernelName>
make_device_policy(const device_policy<OldKernelName>& policy
#if _ONEDPL_PREDEFINED_POLICIES
Expand All @@ -202,7 +209,7 @@ make_device_policy(const device_policy<OldKernelName>& policy
return device_policy<NewKernelName>(policy);
}

template <typename NewKernelName, typename OldKernelName = DefaultKernelName>
template <typename NewKernelName, typename OldKernelName>
device_policy<NewKernelName>
make_hetero_policy(const device_policy<OldKernelName>& policy)
{
Expand Down

0 comments on commit 2cdad2e

Please sign in to comment.