Skip to content

Commit 8ee0bd8

Browse files
Re-privatizing 'MKernel' for backward compatibility
- Allowing access 'MKernel' from sycl::handler class - +Reverting unnecessary std:move for Kernel function
1 parent 6985a64 commit 8ee0bd8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

sycl/include/CL/sycl/detail/cg_types.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,12 @@ class HostTask {
245245
template <class KernelType, class KernelArgType, int Dims, typename KernelName>
246246
class HostKernel : public HostKernelBase {
247247
using IDBuilder = sycl::detail::Builder;
248+
KernelType MKernel;
249+
// Allowing accessing MKernel from 'ResetHostKernelHelper' method of
250+
// 'sycl::handler'
251+
friend class sycl::handler;
248252

249253
public:
250-
KernelType MKernel;
251254
HostKernel(KernelType Kernel) : MKernel(Kernel) {}
252255
void call(const NDRDescT &NDRDesc, HostProfilingInfo *HPI) override {
253256
// adjust ND range for serial host:

sycl/include/CL/sycl/handler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1434,7 +1434,7 @@ class __SYCL_EXPORT handler {
14341434
// known constant.
14351435
MNDRDesc.set(range<1>{1});
14361436

1437-
StoreLambda<NameT, KernelType, /*Dims*/ 0, void>(std::move(KernelFunc));
1437+
StoreLambda<NameT, KernelType, /*Dims*/ 0, void>(KernelFunc);
14381438
setType(detail::CG::Kernel);
14391439
#endif
14401440
}

0 commit comments

Comments
 (0)