pub struct CompletionEvent { /* private fields */ }Expand description
Synchronization event for asynchronous accelerator operations.
Tracks completion of asynchronous operations on accelerator devices, enabling operation chaining without CPU synchronization.
§Examples
ⓘ
use tenferro_tensor::CompletionEvent;
// CompletionEvent is typically created by GPU backends.
let _event: Option<CompletionEvent> = None;Implementations§
Trait Implementations§
Source§impl Clone for CompletionEvent
impl Clone for CompletionEvent
Source§fn clone(&self) -> CompletionEvent
fn clone(&self) -> CompletionEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Send for CompletionEvent
§Safety
CompletionEvent can be safely sent across threads because:
- The raw pointer in
CompletionEventInneris only used as an opaque handle - CUDA/ROCm events are internally thread-safe when used with proper synchronization
- The event is only used for synchronization and does not expose mutable state
- The pointer is never dereferenced directly by this crate
impl Sync for CompletionEvent
§Safety
CompletionEvent can be safely shared across threads because:
- The raw pointer is an opaque handle to a GPU event object
- CUDA/ROCm event APIs are thread-safe for query operations
- The event does not contain any Rust-managed mutable state
- Concurrent access to the event is managed by the GPU driver
Auto Trait Implementations§
impl Freeze for CompletionEvent
impl RefUnwindSafe for CompletionEvent
impl Unpin for CompletionEvent
impl UnwindSafe for CompletionEvent
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