pub struct Pipeline<C: CubePrimitive> { /* private fields */ }
Expand description
A mechanism for managing a sequence of memcpy_async
For now, it only works at the Cube scope
Implementations§
Source§impl<C: CubePrimitive> Pipeline<C>
impl<C: CubePrimitive> Pipeline<C>
Sourcepub fn memcpy_async(
&self,
_source: &Slice<Line<C>>,
_destination: &mut SliceMut<Line<C>>,
)
pub fn memcpy_async( &self, _source: &Slice<Line<C>>, _destination: &mut SliceMut<Line<C>>, )
Copy the source slice to destination
§Safety
This will try to copy the whole source slice, so make sure source length <= destination length
Sourcepub fn producer_acquire(&self)
pub fn producer_acquire(&self)
Reserves a specific stage for the producer to work on.
Sourcepub fn producer_commit(&self)
pub fn producer_commit(&self)
Signals that the producer is done and the stage is ready for the consumer.
Sourcepub fn consumer_wait(&self)
pub fn consumer_wait(&self)
Waits until the producer has finished with the stage.
Sourcepub fn consumer_release(&self)
pub fn consumer_release(&self)
Frees the stage after the consumer is done using it.
pub fn __expand_new(scope: &mut Scope, num_stages: u8) -> PipelineExpand<C>
pub fn __expand_memcpy_async( scope: &mut Scope, expand: PipelineExpand<C>, source: ExpandElementTyped<Slice<Line<C>>>, destination: ExpandElementTyped<SliceMut<Line<C>>>, )
pub fn __expand_producer_acquire(scope: &mut Scope, expand: PipelineExpand<C>)
pub fn __expand_producer_commit(scope: &mut Scope, expand: PipelineExpand<C>)
pub fn __expand_consumer_wait(scope: &mut Scope, expand: PipelineExpand<C>)
pub fn __expand_consumer_release(scope: &mut Scope, expand: PipelineExpand<C>)
Trait Implementations§
Source§impl<C: CubePrimitive> CubeType for Pipeline<C>
impl<C: CubePrimitive> CubeType for Pipeline<C>
type ExpandType = PipelineExpand<C>
Source§fn init(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
fn init(scope: &mut Scope, expand: Self::ExpandType) -> Self::ExpandType
Wrapper around the init method, necessary to type inference.
Source§impl<C: CubePrimitive> Default for Pipeline<C>
impl<C: CubePrimitive> Default for Pipeline<C>
impl<C: Copy + CubePrimitive> Copy for Pipeline<C>
Auto Trait Implementations§
impl<C> Freeze for Pipeline<C>
impl<C> RefUnwindSafe for Pipeline<C>where
C: RefUnwindSafe,
impl<C> Send for Pipeline<C>
impl<C> Sync for Pipeline<C>
impl<C> Unpin for Pipeline<C>where
C: Unpin,
impl<C> UnwindSafe for Pipeline<C>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more