pub struct CudaStream { /* private fields */ }Implementations§
Source§impl CudaStream
impl CudaStream
Sourcepub fn new_non_blocking() -> Result<Self, CudaError>
pub fn new_non_blocking() -> Result<Self, CudaError>
Creates a new non-blocking CUDA stream using cudaStreamCreateWithFlags
with cudaStreamNonBlocking. Non-blocking streams have no implicit
synchronization with the legacy default stream (stream 0).
Sourcepub fn as_raw(&self) -> cudaStream_t
pub fn as_raw(&self) -> cudaStream_t
Get the raw CUDA stream handle.
Sourcepub fn synchronize(&self) -> Result<(), CudaError>
pub fn synchronize(&self) -> Result<(), CudaError>
Synchronize this stream.
Sourcepub fn to_host_sync(&self) -> Result<(), CudaError>
pub fn to_host_sync(&self) -> Result<(), CudaError>
Record a per-stream event and synchronize to complete all pending D2H copies. Uses event-based sync rather than cudaStreamSynchronize because this waits only for work up to the event point, allowing future selective sync patterns (e.g., wait for a specific copy without draining the entire stream).
Trait Implementations§
Source§impl Debug for CudaStream
impl Debug for CudaStream
Source§impl Drop for CudaStream
impl Drop for CudaStream
impl Send for CudaStream
impl Sync for CudaStream
Auto Trait Implementations§
impl !Freeze for CudaStream
impl RefUnwindSafe for CudaStream
impl Unpin for CudaStream
impl UnsafeUnpin for CudaStream
impl UnwindSafe for CudaStream
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