Skip to content

Commit 6d4ff8e

Browse files
fix warnings in graph
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
1 parent 322d361 commit 6d4ff8e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

sycl/source/detail/graph_impl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,7 @@ node modifiable_command_graph::addImpl(dynamic_command_group &DynCGF,
16391639

16401640
graph_impl::WriteLock Lock(impl->MMutex);
16411641
std::shared_ptr<detail::node_impl> NodeImpl = impl->add(DynCGFImpl, DepImpls);
1642-
return sycl::detail::createSyclObjFromImpl<node>(NodeImpl);
1642+
return sycl::detail::createSyclObjFromImpl<node>(std::move(NodeImpl));
16431643
}
16441644

16451645
node modifiable_command_graph::addImpl(const std::vector<node> &Deps) {
@@ -1651,7 +1651,7 @@ node modifiable_command_graph::addImpl(const std::vector<node> &Deps) {
16511651

16521652
graph_impl::WriteLock Lock(impl->MMutex);
16531653
std::shared_ptr<detail::node_impl> NodeImpl = impl->add(DepImpls);
1654-
return sycl::detail::createSyclObjFromImpl<node>(NodeImpl);
1654+
return sycl::detail::createSyclObjFromImpl<node>(std::move(NodeImpl));
16551655
}
16561656

16571657
node modifiable_command_graph::addImpl(std::function<void(handler &)> CGF,
@@ -1664,7 +1664,7 @@ node modifiable_command_graph::addImpl(std::function<void(handler &)> CGF,
16641664

16651665
graph_impl::WriteLock Lock(impl->MMutex);
16661666
std::shared_ptr<detail::node_impl> NodeImpl = impl->add(CGF, {}, DepImpls);
1667-
return sycl::detail::createSyclObjFromImpl<node>(NodeImpl);
1667+
return sycl::detail::createSyclObjFromImpl<node>(std::move(NodeImpl));
16681668
}
16691669

16701670
void modifiable_command_graph::addGraphLeafDependencies(node Node) {

sycl/source/detail/graph_impl.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ class node_impl : public std::enable_shared_from_this<node_impl> {
140140
/// @param NodeType Type of the command-group.
141141
/// @param CommandGroup The CG which stores the command information for this
142142
/// node.
143-
node_impl(node_type NodeType, std::shared_ptr<sycl::detail::CG> CommandGroup)
143+
node_impl(node_type NodeType,
144+
const std::shared_ptr<sycl::detail::CG> &CommandGroup)
144145
: MCGType(CommandGroup->getType()), MNodeType(NodeType),
145146
MCommandGroup(CommandGroup) {
146147
if (NodeType == node_type::subgraph) {

0 commit comments

Comments
 (0)