pub struct CuStream(/* private fields */);Available on crate feature
cuda only.Expand description
A CUstream handle.
Implementations§
Source§impl CuStream
impl CuStream
Sourcepub const unsafe fn from_raw(raw: u64) -> Self
pub const unsafe fn from_raw(raw: u64) -> Self
Wrap a raw CUstream.
§Why
the typed stream is the only handle the reactor waits on, and the driver hands streams out as bare integers.
§Safety
raw must be a live CUstream (or 0, the legacy default stream) of a live context for
every call made with the value: the driver dereferences it, and a bogus or destroyed handle
faults inside the driver (CWE-822).
§No safe alternative
a handle is an integer the crate cannot validate; the typed stream is built only from it, so the constructor is unsafe.
Trait Implementations§
impl Copy for CuStream
impl Eq for CuStream
impl StructuralPartialEq for CuStream
Auto Trait Implementations§
impl Forget for CuStream
impl Freeze for CuStream
impl Move for CuStream
impl RefUnwindSafe for CuStream
impl Send for CuStream
impl Sync for CuStream
impl Unpin for CuStream
impl UnsafeUnpin for CuStream
impl UnwindSafe for CuStream
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