Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Steffen Larsen <[email protected]>
  • Loading branch information
reble and steffenlarsen authored Feb 9, 2023
1 parent 0ac7a7e commit 06c588f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions sycl/include/sycl/queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1079,14 +1079,12 @@ class __SYCL_EXPORT queue {
event ext_oneapi_graph(ext::oneapi::experimental::command_graph<
ext::oneapi::experimental::graph_state::executable>
Graph,
event DepEvent) {
const detail::code_location CodeLoc = {};
event DepEvent _CODELOCPARAM(&CodeLoc)) {
return submit(
[&](handler &CGH) {
CGH.depends_on(DepEvent);
CGH.ext_oneapi_graph(Graph);
},
CodeLoc);
} _CODELOCFW(CodeLoc));
}

/// Shortcut for executing a graph of commands.
Expand Down
4 changes: 2 additions & 2 deletions sycl/source/detail/graph_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace oneapi {
namespace experimental {
namespace detail {

void graph_impl::exec(sycl::detail::queue_ptr q) {
void graph_impl::exec(const sycl::detail::queue_ptr &q) {
if (MSchedule.empty()) {
for (auto n : MRoots) {
n->topology_sort(MSchedule);
Expand All @@ -32,7 +32,7 @@ void graph_impl::exec(sycl::detail::queue_ptr q) {
n->exec(q);
}

void graph_impl::exec_and_wait(sycl::detail::queue_ptr q) {
void graph_impl::exec_and_wait(const sycl::detail::queue_ptr &q) {
bool isSubGraph = q->getIsGraphSubmitting();
if (!isSubGraph) {
q->setIsGraphSubmitting(true);
Expand Down
4 changes: 2 additions & 2 deletions sycl/source/detail/graph_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ struct graph_impl {

graph_ptr MParent;

void exec(sycl::detail::queue_ptr q);
void exec_and_wait(sycl::detail::queue_ptr q);
void exec(const sycl::detail::queue_ptr &q);
void exec_and_wait(const sycl::detail::queue_ptr &q);

void add_root(node_ptr n);
void remove_root(node_ptr n);
Expand Down

0 comments on commit 06c588f

Please sign in to comment.