3#include "sycl_graph.hpp"
53 template <
typename... Ts>
65 template <
typename... Ts>
103 template <
typename T>
104 void dump(T& ostream)
const;
109 template <
typename V>
115 template <
typename V>
122 syclNode* _node {
nullptr};
130template <
typename... Ts>
132 (_node->_precede(tasks._node), ...);
137template <
typename... Ts>
139 (tasks._node->_precede(_node), ...);
145 return _node ==
nullptr;
161 return _node->_successors.size();
166 return _node->_dependents.size();
173 if(_node->_name.empty()) os << _node;
174 else os << _node->_name;
180 for(
size_t i=0; i<_node->_successors.size(); ++i) {
181 visitor(
syclTask(_node->_successors[i]));
188 for(
size_t i=0; i<_node->_dependents.size(); ++i) {
189 visitor(
syclTask(_node->_dependents[i]));
class for building a SYCL task dependency graph
Definition syclflow.hpp:23
handle to a node of the internal CUDA graph
Definition sycl_task.hpp:21
size_t num_successors() const
queries the number of successors
Definition sycl_task.hpp:160
syclTask & succeed(Ts &&... tasks)
adds precedence links from other tasks to this
Definition sycl_task.hpp:138
syclTask(const syclTask &)=default
copy-constructs a syclTask
void dump(T &ostream) const
dumps the task through an output stream
Definition sycl_task.hpp:171
friend std::ostream & operator<<(std::ostream &, const syclTask &)
overload of ostream inserter operator for syclTask
Definition sycl_task.hpp:201
syclTask & precede(Ts &&... tasks)
adds precedence links from this to other tasks
Definition sycl_task.hpp:131
void for_each_successor(V &&visitor) const
applies an visitor callable to each successor of the task
Definition sycl_task.hpp:179
bool empty() const
queries if the task is associated with a syclNode
Definition sycl_task.hpp:144
size_t num_dependents() const
queries the number of dependents
Definition sycl_task.hpp:165
const std::string & name() const
queries the name of the task
Definition sycl_task.hpp:155
syclTask & operator=(const syclTask &)=default
copy-assigns a syclTask
syclTask()=default
constructs an empty syclTask
void for_each_dependent(V &&visitor) const
applies an visitor callable to each dependents of the task
Definition sycl_task.hpp:187
taskflow namespace
Definition small_vector.hpp:27
std::ostream & operator<<(std::ostream &os, const Task &task)
overload of ostream inserter operator for cudaTask
Definition task.hpp:626