pub struct ExternalSemaphore { /* private fields */ }Expand description
An imported external-semaphore handle (Vulkan VkSemaphore / timeline, D3D12 fence, NvSciSync, keyed mutex). Destroyed on drop.
Implementations§
Source§impl ExternalSemaphore
impl ExternalSemaphore
Sourcepub unsafe fn import(
context: &Context,
desc: &CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC,
) -> Result<Self>
pub unsafe fn import( context: &Context, desc: &CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC, ) -> Result<Self>
Import an external-semaphore handle described by desc.
§Safety
Same discipline as ExternalMemory::import: desc.handle must
be a live OS object this process may access.
Sourcepub fn signal_fence_async(&self, value: u64, stream: &Stream) -> Result<()>
pub fn signal_fence_async(&self, value: u64, stream: &Stream) -> Result<()>
Enqueue a signal of fence value value on stream for timeline /
D3D12 fence semaphores.
Sourcepub fn wait_fence_async(&self, value: u64, stream: &Stream) -> Result<()>
pub fn wait_fence_async(&self, value: u64, stream: &Stream) -> Result<()>
Enqueue a wait for fence value value on stream. The stream
blocks (on-device) until the external fence reaches that value.
pub fn as_raw(&self) -> CUexternalSemaphore
Trait Implementations§
Source§impl Clone for ExternalSemaphore
impl Clone for ExternalSemaphore
Source§fn clone(&self) -> ExternalSemaphore
fn clone(&self) -> ExternalSemaphore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ExternalSemaphore
impl RefUnwindSafe for ExternalSemaphore
impl Send for ExternalSemaphore
impl Sync for ExternalSemaphore
impl Unpin for ExternalSemaphore
impl UnsafeUnpin for ExternalSemaphore
impl UnwindSafe for ExternalSemaphore
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