pub struct ProfilerGuard { /* private fields */ }Expand description
RAII guard that starts the CUDA profiler on creation and stops it on drop.
This is useful for scoping profiling to a specific block of code.
If the profiler fails to stop on drop, the error is silently ignored
(since Drop::drop cannot return errors).
Implementations§
Source§impl ProfilerGuard
impl ProfilerGuard
Sourcepub fn start() -> CudaResult<Self>
pub fn start() -> CudaResult<Self>
Starts the CUDA profiler and returns a guard that will stop it on drop.
§Errors
Returns an error if profiler_start() fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProfilerGuard
impl RefUnwindSafe for ProfilerGuard
impl Send for ProfilerGuard
impl Sync for ProfilerGuard
impl Unpin for ProfilerGuard
impl UnsafeUnpin for ProfilerGuard
impl UnwindSafe for ProfilerGuard
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