11#include <tbb/task_arena.h>
12#include <oneapi/tbb/task_arena.h>
13#include <oneapi/tbb/concurrent_hash_map.h>
14#include <oneapi/tbb/spin_mutex.h>
18 class dynamic_task_graph_node;
19 class dynamic_task_graph_spawned_node;
20 class dynamic_task_graph;
153 bool add_successor( std::shared_ptr<dynamic_task_graph_spawned_node> successor );
171 std::string _task_description;
Represents one node in task graph.
void incoming_task_has_terminated()
Decrement the incoming task counter and run if now ready.
dynamic_task_graph & _task_graph
tbb::spin_mutex _dependencies_semaphore
Semaphore over all the dependencies.
dynamic_task_graph_spawned_node(const dynamic_task_graph_spawned_node &)=delete
You cannot copy a spawned node.
dynamic_task_graph_spawned_node(const dynamic_task_graph_node &task_specification, dynamic_task_graph &task_graph)
Create a new task node in the graph.
void add_incoming_task_dependency()
@ Submitted
Task is submitted but not yet running.
@ Complete
Once a task has terminated, it toggles to complete.
@ Spawned
Task is now running.
bool add_successor(std::shared_ptr< dynamic_task_graph_spawned_node > successor)
bool has_terminated() const
std::string to_string() const
Helper routine, which likely will not be there in TBB counterpart.
int _number_of_in_dependencies
std::function< void()> _functor
std::vector< std::shared_ptr< dynamic_task_graph_spawned_node > > _out_dependency
Very simple dynamic task graph interface.
I've written an API to IIT, but I'm not currently using.