Skip to content

Commit 06c588f

Browse files
reblesteffenlarsen
andauthored
Apply suggestions from code review
Co-authored-by: Steffen Larsen <[email protected]>
1 parent 0ac7a7e commit 06c588f

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

sycl/include/sycl/queue.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,14 +1079,12 @@ class __SYCL_EXPORT queue {
10791079
event ext_oneapi_graph(ext::oneapi::experimental::command_graph<
10801080
ext::oneapi::experimental::graph_state::executable>
10811081
Graph,
1082-
event DepEvent) {
1083-
const detail::code_location CodeLoc = {};
1082+
event DepEvent _CODELOCPARAM(&CodeLoc)) {
10841083
return submit(
10851084
[&](handler &CGH) {
10861085
CGH.depends_on(DepEvent);
10871086
CGH.ext_oneapi_graph(Graph);
1088-
},
1089-
CodeLoc);
1087+
} _CODELOCFW(CodeLoc));
10901088
}
10911089

10921090
/// Shortcut for executing a graph of commands.

sycl/source/detail/graph_impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace oneapi {
2222
namespace experimental {
2323
namespace detail {
2424

25-
void graph_impl::exec(sycl::detail::queue_ptr q) {
25+
void graph_impl::exec(const sycl::detail::queue_ptr &q) {
2626
if (MSchedule.empty()) {
2727
for (auto n : MRoots) {
2828
n->topology_sort(MSchedule);
@@ -32,7 +32,7 @@ void graph_impl::exec(sycl::detail::queue_ptr q) {
3232
n->exec(q);
3333
}
3434

35-
void graph_impl::exec_and_wait(sycl::detail::queue_ptr q) {
35+
void graph_impl::exec_and_wait(const sycl::detail::queue_ptr &q) {
3636
bool isSubGraph = q->getIsGraphSubmitting();
3737
if (!isSubGraph) {
3838
q->setIsGraphSubmitting(true);

sycl/source/detail/graph_impl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ struct graph_impl {
8686

8787
graph_ptr MParent;
8888

89-
void exec(sycl::detail::queue_ptr q);
90-
void exec_and_wait(sycl::detail::queue_ptr q);
89+
void exec(const sycl::detail::queue_ptr &q);
90+
void exec_and_wait(const sycl::detail::queue_ptr &q);
9191

9292
void add_root(node_ptr n);
9393
void remove_root(node_ptr n);

0 commit comments

Comments
 (0)