|
|
| Task ()=default |
| | constructs an empty task
|
| |
|
| Task (const Task &other) |
| | constructs the task with the copy of the other task
|
| |
|
Task & | operator= (const Task &) |
| | replaces the contents with a copy of the other task
|
| |
|
Task & | operator= (std::nullptr_t) |
| | replaces the contents with a null pointer
|
| |
|
bool | operator== (const Task &rhs) const |
| | compares if two tasks are associated with the same graph node
|
| |
|
bool | operator!= (const Task &rhs) const |
| | compares if two tasks are not associated with the same graph node
|
| |
|
const std::string & | name () const |
| | queries the name of the task
|
| |
|
size_t | num_successors () const |
| | queries the number of successors of the task
|
| |
|
size_t | num_dependents () const |
| | queries the number of predecessors of the task
|
| |
|
size_t | num_strong_dependents () const |
| | queries the number of strong dependents of the task
|
| |
|
size_t | num_weak_dependents () const |
| | queries the number of weak dependents of the task
|
| |
| Task & | name (const std::string &name) |
| | assigns a name to the task
|
| |
| template<typename C > |
| Task & | work (C &&callable) |
| | assigns a callable
|
| |
| template<typename T > |
| Task & | composed_of (T &object) |
| | creates a module task from a taskflow
|
| |
| template<typename... Ts> |
| Task & | precede (Ts &&... tasks) |
| | adds precedence links from this to other tasks
|
| |
| template<typename... Ts> |
| Task & | succeed (Ts &&... tasks) |
| | adds precedence links from other tasks to this
|
| |
|
Task & | release (Semaphore &semaphore) |
| | makes the task release this semaphore
|
| |
|
Task & | acquire (Semaphore &semaphore) |
| | makes the task acquire this semaphore
|
| |
| Task & | data (void *data) |
| | assigns pointer to user data
|
| |
|
void | reset () |
| | resets the task handle to null
|
| |
|
void | reset_work () |
| | resets the associated work to a placeholder
|
| |
|
bool | empty () const |
| | queries if the task handle points to a task node
|
| |
|
bool | has_work () const |
| | queries if the task has a work assigned
|
| |
|
template<typename V > |
| void | for_each_successor (V &&visitor) const |
| | applies an visitor callable to each successor of the task
|
| |
|
template<typename V > |
| void | for_each_dependent (V &&visitor) const |
| | applies an visitor callable to each dependents of the task
|
| |
|
size_t | hash_value () const |
| | obtains a hash value of the underlying node
|
| |
|
TaskType | type () const |
| | returns the task type
|
| |
|
void | dump (std::ostream &ostream) const |
| | dumps the task through an output stream
|
| |
|
void * | data () const |
| | queries pointer to user data
|
| |
class to create a task handle over a node in a taskflow graph
A task is a wrapper over a node in a taskflow graph. It provides a set of methods for users to access and modify the attributes of the associated node in the taskflow graph. A task is very lightweight object (i.e., only storing a node pointer) that can be trivially copied around, and it does not own the lifetime of the associated node.