pub struct CudaEvent { /* private fields */ }Expand description
CUDA event for synchronization and timing
Implementations§
Source§impl CudaEvent
impl CudaEvent
Sourcepub fn new() -> CudaResult<Self>
pub fn new() -> CudaResult<Self>
Create new event
Sourcepub fn record(&self, _stream: &CudaStream) -> CudaResult<()>
pub fn record(&self, _stream: &CudaStream) -> CudaResult<()>
Record event on stream
Sourcepub fn synchronize(&self) -> CudaResult<()>
pub fn synchronize(&self) -> CudaResult<()>
Synchronize on event - wait until event is recorded
Sourcepub fn elapsed_time(_start: &CudaEvent, _end: &CudaEvent) -> CudaResult<f32>
pub fn elapsed_time(_start: &CudaEvent, _end: &CudaEvent) -> CudaResult<f32>
Get elapsed time between two events (in milliseconds)
Trait Implementations§
impl Send for CudaEvent
impl Sync for CudaEvent
Auto Trait Implementations§
impl Freeze for CudaEvent
impl RefUnwindSafe for CudaEvent
impl Unpin for CudaEvent
impl UnwindSafe for CudaEvent
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more