Skip to content

Commit 79cf937

Browse files
[SYCL][NFC] Fix copy instead of move Coverity hits (#20876)
1 parent f6cd900 commit 79cf937

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

sycl/source/detail/queue_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ EventImplPtr queue_impl::submit_graph_direct_impl(
624624
detail::CGType::ExecCommandBuffer),
625625
/*SchedulerBypass*/ false};
626626
} else {
627-
return ExecGraph->enqueue(*this, CGData, EventNeeded);
627+
return ExecGraph->enqueue(*this, std::move(CGData), EventNeeded);
628628
}
629629
};
630630
// If the graph contains a host task, we may need to insert a barrier prior

sycl/source/detail/queue_impl.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,17 +377,17 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
377377
}
378378

379379
void submit_graph_direct_without_event(
380-
std::shared_ptr<ext::oneapi::experimental::detail::exec_graph_impl>
381-
ExecGraph,
380+
const std::shared_ptr<ext::oneapi::experimental::detail::exec_graph_impl>
381+
&ExecGraph,
382382
sycl::span<const event> DepEvents, const detail::code_location &CodeLoc,
383383
bool IsTopCodeLoc) {
384384
submit_graph_direct_impl(ExecGraph, false, DepEvents, CodeLoc,
385385
IsTopCodeLoc);
386386
}
387387

388388
event submit_graph_direct_with_event(
389-
std::shared_ptr<ext::oneapi::experimental::detail::exec_graph_impl>
390-
ExecGraph,
389+
const std::shared_ptr<ext::oneapi::experimental::detail::exec_graph_impl>
390+
&ExecGraph,
391391
sycl::span<const event> DepEvents, const detail::code_location &CodeLoc,
392392
bool IsTopCodeLoc) {
393393
return createSyclObjFromImpl<event>(submit_graph_direct_impl(

0 commit comments

Comments
 (0)