Skip to content
Closed
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
11 changes: 3 additions & 8 deletions sycl/source/detail/graph_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,12 @@
namespace sycl {
__SYCL_INLINE_VER_NAMESPACE(_V1) {

namespace detail {
struct queue_impl;
using queue_ptr = std::shared_ptr<queue_impl>;
} // namespace detail

namespace ext {
namespace oneapi {
namespace experimental {
namespace detail {

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

void graph_impl::exec_and_wait(const sycl::detail::queue_ptr &q) {
void graph_impl::exec_and_wait(const std::shared_ptr<sycl::detail::queue_impl> &q) {
bool isSubGraph = q->getIsGraphSubmitting();
if (!isSubGraph) {
q->setIsGraphSubmitting(true);
Expand Down Expand Up @@ -133,7 +128,7 @@ bool graph_impl::clear_queues() {
return anyQueuesCleared;
}

void node_impl::exec(sycl::detail::queue_ptr q) {
void node_impl::exec(const std::shared_ptr<sycl::detail::queue_impl> &q) {
std::vector<sycl::event> deps;
for (auto i : MPredecessors)
deps.push_back(i->get_event());
Expand Down
11 changes: 3 additions & 8 deletions sycl/source/detail/graph_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
namespace sycl {
__SYCL_INLINE_VER_NAMESPACE(_V1) {

namespace detail {
struct queue_impl;
using queue_ptr = std::shared_ptr<queue_impl>;
} // namespace detail

namespace ext {
namespace oneapi {
namespace experimental {
Expand Down Expand Up @@ -56,7 +51,7 @@ struct node_impl {

std::vector<sycl::detail::ArgDesc> MArgs;

void exec(sycl::detail::queue_ptr q);
void exec(const std::shared_ptr<sycl::detail::queue_impl> &q);

void register_successor(node_ptr n) {
MSuccessors.push_back(n);
Expand Down Expand Up @@ -113,8 +108,8 @@ struct graph_impl {

graph_ptr MParent;

void exec(const sycl::detail::queue_ptr &q);
void exec_and_wait(const sycl::detail::queue_ptr &q);
void exec(const std::shared_ptr<sycl::detail::queue_impl> &q);
void exec_and_wait(const std::shared_ptr<sycl::detail::queue_impl> &q);

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