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>,

source

pub fn new() -> Self

source

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.

source

pub fn add_task(&mut self, task: T) -> Result<()>

Add a task to the task graph.

source

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.

Trait Implementations§

Auto Trait Implementations§

§

impl<R, B, T> RefUnwindSafe for TaskGraph<R, B, T>where B: RefUnwindSafe, R: RefUnwindSafe, T: RefUnwindSafe,

§

impl<R, B, T> Send for TaskGraph<R, B, T>where B: Send, R: Send, T: Send,

§

impl<R, B, T> Sync for TaskGraph<R, B, T>where B: Sync, R: Sync, T: Sync,

§

impl<R, B, T> Unpin for TaskGraph<R, B, T>where B: Unpin, R: Unpin, T: Unpin,

§

impl<R, B, T> UnwindSafe for TaskGraph<R, B, T>where B: UnwindSafe, R: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.