pub struct StreamContext { /* private fields */ }Expand description
CUDA stream metadata passed to context-aware NPP functions.
Implementations§
Source§impl StreamContext
impl StreamContext
Sourcepub fn create(stream: &Stream) -> Result<Self>
pub fn create(stream: &Stream) -> Result<Self>
Creates an NPP stream context from a CUDA stream.
The returned context borrows the stream and caches the device properties required by NPP context-aware entry points.
§Errors
Returns an error if the stream’s CUDA context cannot be bound, or if CUDA cannot query the stream device, device properties, or stream flags.
pub fn stream(&self) -> &BorrowedStream
pub fn cuda_context(&self) -> &CudaContext
pub const fn device_id(&self) -> i32
pub const fn as_raw(&self) -> NppStreamContext
pub fn synchronize(&self) -> Result<()>
Auto Trait Implementations§
impl !Send for StreamContext
impl !Sync for StreamContext
impl Freeze for StreamContext
impl RefUnwindSafe for StreamContext
impl Unpin for StreamContext
impl UnsafeUnpin for StreamContext
impl UnwindSafe for StreamContext
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