pub struct Event { /* private fields */ }Expand description
A CUDA event.
Implementations§
Source§impl Event
impl Event
Sourcepub fn new(context: &Context) -> Result<Self>
pub fn new(context: &Context) -> Result<Self>
Create a new event with default flags (timing enabled).
Sourcepub fn no_timing(context: &Context) -> Result<Self>
pub fn no_timing(context: &Context) -> Result<Self>
Create an event optimized for synchronization (no timing).
Sourcepub fn with_flags(context: &Context, flags: u32) -> Result<Self>
pub fn with_flags(context: &Context, flags: u32) -> Result<Self>
Create an event with raw flags (see CUevent_flags).
Sourcepub fn record(&self, stream: &Stream) -> Result<()>
pub fn record(&self, stream: &Stream) -> Result<()>
Record this event on the given stream. The event “happens” when all
prior work on stream has completed.
Sourcepub fn record_with_flags(&self, stream: &Stream, flags: u32) -> Result<()>
pub fn record_with_flags(&self, stream: &Stream, flags: u32) -> Result<()>
As record but with a raw CUDA event-record flags
bitmask. See CU_EVENT_RECORD_* in NVIDIA’s headers.
Sourcepub fn synchronize(&self) -> Result<()>
pub fn synchronize(&self) -> Result<()>
Block the calling host thread until this event has completed.
Sourcepub fn is_complete(&self) -> Result<bool>
pub fn is_complete(&self) -> Result<bool>
Ok(true) if the event has completed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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