pub struct CudaStream { /* private fields */ }Expand description
CUDA stream for asynchronous operations
Implementations§
Source§impl CudaStream
impl CudaStream
Sourcepub fn new() -> CudaResult<Self>
pub fn new() -> CudaResult<Self>
Create new CUDA stream
Sourcepub fn default_stream() -> Self
pub fn default_stream() -> Self
Get default stream (stream 0)
Sourcepub fn handle(&self) -> cudaStream_t
pub fn handle(&self) -> cudaStream_t
Get raw handle
Sourcepub fn synchronize(&self) -> CudaResult<()>
pub fn synchronize(&self) -> CudaResult<()>
Synchronize stream - wait for all operations to complete
Sourcepub fn is_complete(&self) -> CudaResult<bool>
pub fn is_complete(&self) -> CudaResult<bool>
Check if stream is complete (non-blocking)
Sourcepub fn wait_event(&self, _event: &CudaEvent) -> CudaResult<()>
pub fn wait_event(&self, _event: &CudaEvent) -> CudaResult<()>
Wait for event on this stream
Trait Implementations§
Source§impl Debug for CudaStream
impl Debug for CudaStream
Source§impl Default for CudaStream
impl Default 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 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more