pub struct GreenContext { /* private fields */ }Expand description
A green context. Drop destroys it.
Implementations§
Source§impl GreenContext
impl GreenContext
Sourcepub unsafe fn from_resource_desc(
desc: *const c_void,
flags: u32,
) -> Result<Self>
pub unsafe fn from_resource_desc( desc: *const c_void, flags: u32, ) -> Result<Self>
Create a green context from an opaque cudaDevResourceDesc
pointer (built via the driver-side resource-desc APIs).
§Safety
desc must be a valid cudaDevResourceDesc descriptor.
Sourcepub unsafe fn from_raw(handle: cudaGreenCtx_t) -> Self
pub unsafe fn from_raw(handle: cudaGreenCtx_t) -> Self
pub fn as_raw(&self) -> cudaGreenCtx_t
Sourcepub fn record_event(&self, event: &Event) -> Result<()>
pub fn record_event(&self, event: &Event) -> Result<()>
Record event on this green context.
Sourcepub fn wait_event(&self, event: &Event) -> Result<()>
pub fn wait_event(&self, event: &Event) -> Result<()>
Wait for event on this green context.
Trait Implementations§
Source§impl Debug for GreenContext
impl Debug for GreenContext
Source§impl Drop for GreenContext
impl Drop for GreenContext
impl Send for GreenContext
impl Sync for GreenContext
Auto Trait Implementations§
impl Freeze for GreenContext
impl RefUnwindSafe for GreenContext
impl Unpin for GreenContext
impl UnsafeUnpin for GreenContext
impl UnwindSafe for GreenContext
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