pub struct Stream { /* private fields */ }Expand description
Stream for asynchronous GPU operations.
Tracks a monotonically increasing “pending operations” counter. Each operation increments the counter when submitted and decrements when complete. On CPU backends the counter is always zero after synchronous execution.
Implementations§
Source§impl Stream
impl Stream
Sourcepub fn record_submit(&self)
pub fn record_submit(&self)
Record a submitted operation (increment pending counter).
Sourcepub fn record_complete(&self)
pub fn record_complete(&self)
Record a completed operation (decrement pending counter).
Sourcepub fn synchronize(&self) -> Result<()>
pub fn synchronize(&self) -> Result<()>
Synchronize the stream — block until all pending operations complete.
On CPU backends all operations are already synchronous, so this simply verifies the pending counter is zero.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if all stream operations are complete.
Sourcepub fn pending_ops(&self) -> u64
pub fn pending_ops(&self) -> u64
Get the number of pending operations.
Auto Trait Implementations§
impl !Freeze for Stream
impl RefUnwindSafe for Stream
impl Send for Stream
impl Sync for Stream
impl Unpin for Stream
impl UnwindSafe for Stream
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