Struct phobos::task_graph::TaskGraph
source · pub struct TaskGraph<R, B, T>where
R: Resource + Default,
B: Barrier<R> + Clone,
T: Task<R>,{ /* private fields */ }Expand description
Task graph structure, used for automatic synchronization of resource accesses.
Implementations§
source§impl<R, B, T> TaskGraph<R, B, T>where
R: Clone + Default + Resource,
B: Barrier<R> + Clone,
T: Task<R>,
impl<R, B, T> TaskGraph<R, B, T>where R: Clone + Default + Resource, B: Barrier<R> + Clone, T: Task<R>,
pub fn new() -> Self
sourcepub fn sources<'a>(&'a self) -> impl Iterator<Item = NodeIndex> + 'a
pub fn sources<'a>(&'a self) -> impl Iterator<Item = NodeIndex> + 'a
Return all source nodes in the graph, these are the nodes with no parent node.
sourcepub fn create_barrier_nodes(&mut self)
pub fn create_barrier_nodes(&mut self)
Create a maximum set of barrier nodes for the task graph. This means that we will assume every resource that is being consumed needs its own barrier. These barriers are not yet serialized, as we only want to do that after we know which barriers are equivalent.