Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sycl/include/sycl/ext/oneapi/weak_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ class weak_object : public detail::weak_object_base<SYCLObjT> {
auto MObjImplPtr = this->MObjWeakPtr.lock();
if (!MObjImplPtr)
return std::nullopt;
return sycl::detail::createSyclObjFromImpl<SYCLObjT>(MObjImplPtr);
return sycl::detail::createSyclObjFromImpl<SYCLObjT>(
std::move(MObjImplPtr));
}
SYCLObjT lock() const {
std::optional<SYCLObjT> OptionalObj = try_lock();
Expand Down
3 changes: 2 additions & 1 deletion sycl/include/sycl/kernel_bundle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,8 @@ template <bundle_state State>
kernel_bundle<State> get_empty_interop_kernel_bundle(const context &Ctx) {
detail::KernelBundleImplPtr Impl =
detail::get_empty_interop_kernel_bundle_impl(Ctx, Ctx.get_devices());
return detail::createSyclObjFromImpl<sycl::kernel_bundle<State>>(Impl);
return detail::createSyclObjFromImpl<sycl::kernel_bundle<State>>(
std::move(Impl));
}
} // namespace detail

Expand Down
6 changes: 2 additions & 4 deletions sycl/source/detail/program_manager/program_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1723,10 +1723,8 @@ void ProgramManager::addImage(sycl_device_binary RawImg,
// ... and create a unique kernel ID for the entry
auto It = m_KernelName2KernelIDs.find(name);
if (It == m_KernelName2KernelIDs.end()) {
std::shared_ptr<detail::kernel_id_impl> KernelIDImpl =
std::make_shared<detail::kernel_id_impl>(name);
sycl::kernel_id KernelID =
detail::createSyclObjFromImpl<sycl::kernel_id>(KernelIDImpl);
sycl::kernel_id KernelID = detail::createSyclObjFromImpl<sycl::kernel_id>(
std::make_shared<detail::kernel_id_impl>(name));

It = m_KernelName2KernelIDs.emplace_hint(It, name, KernelID);
}
Expand Down
5 changes: 3 additions & 2 deletions sycl/source/detail/queue_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ prepareSYCLEventAssociatedWithQueue(detail::queue_impl &QueueImpl) {
auto EventImpl = detail::event_impl::create_device_event(QueueImpl);
EventImpl->setContextImpl(QueueImpl.getContextImpl());
EventImpl->setStateIncomplete();
return detail::createSyclObjFromImpl<event>(EventImpl);
return detail::createSyclObjFromImpl<event>(std::move(EventImpl));
}

const std::vector<event> &
Expand All @@ -103,7 +103,8 @@ queue_impl::getExtendDependencyList(const std::vector<event> &DepEvents,
if (ExternalEvent)
MutableVec.push_back(*ExternalEvent);
if (ExtraEvent)
MutableVec.push_back(detail::createSyclObjFromImpl<event>(ExtraEvent));
MutableVec.push_back(
detail::createSyclObjFromImpl<event>(std::move(ExtraEvent)));
return MutableVec;
}

Expand Down
4 changes: 2 additions & 2 deletions sycl/source/detail/queue_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {

detail::EventImplPtr ResEvent = submit_impl(CGF, /*CallerNeedsEvent=*/true,
Loc, IsTopCodeLoc, SubmitInfo);
return createSyclObjFromImpl<event>(ResEvent);
return createSyclObjFromImpl<event>(std::move(ResEvent));
}

event submit_kernel_direct_with_event(
Expand All @@ -361,7 +361,7 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
detail::EventImplPtr EventImpl = submit_kernel_direct_impl(
NDRDescT(RangeView), HostKernel, DeviceKernelInfo,
/*CallerNeedsEvent*/ true, DepEvents, Props, CodeLoc, IsTopCodeLoc);
return createSyclObjFromImpl<event>(EventImpl);
return createSyclObjFromImpl<event>(std::move(EventImpl));
}

void submit_kernel_direct_without_event(
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/kernel_bundle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ obj_kb compile_from_source(
kernel_bundle_impl &sourceImpl = *getSyclObjImpl(SourceKB);
std::shared_ptr<kernel_bundle_impl> KBImpl = sourceImpl.compile_from_source(
UniqueDevices, BuildOptions, LogPtr, RegisteredKernelNames);
auto result = sycl::detail::createSyclObjFromImpl<obj_kb>(KBImpl);
auto result = sycl::detail::createSyclObjFromImpl<obj_kb>(std::move(KBImpl));
if (LogView)
*LogView = Log;
return result;
Expand Down
3 changes: 2 additions & 1 deletion sycl/source/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ queue::ext_oneapi_get_graph() const {

return sycl::detail::createSyclObjFromImpl<
ext::oneapi::experimental::command_graph<
ext::oneapi::experimental::graph_state::modifiable>>(Graph);
ext::oneapi::experimental::graph_state::modifiable>>(
std::move(Graph));
}

void queue::throw_asynchronous() { impl->throw_asynchronous(); }
Expand Down