pub struct CuptiLibrary { /* private fields */ }Expand description
A runtime-loaded handle to libcupti.so exposing the Activity API.
Loading is entirely lazy and fallible: there is no CUPTI on a machine
without the CUDA toolkit profiling components, in which case
CuptiLibrary::load returns an Err. The handle keeps the Library
alive for the lifetime of the resolved function pointers.
Implementations§
Source§impl CuptiLibrary
impl CuptiLibrary
Sourcepub fn load() -> Result<Self, DriverLoadError>
pub fn load() -> Result<Self, DriverLoadError>
Attempt to load CUPTI and confirm the Activity API symbols are present.
§Errors
DriverLoadError::LibraryNotFoundif no CUPTI library can be opened (the common case on a host without the profiling components).DriverLoadError::SymbolNotFoundif the library opens but is missing a required Activity API entry point.
Sourcepub fn supports_activity_enable(&self) -> bool
pub fn supports_activity_enable(&self) -> bool
Whether cuptiActivityEnable resolved.
Sourcepub fn supports_register_callbacks(&self) -> bool
pub fn supports_register_callbacks(&self) -> bool
Whether cuptiActivityRegisterCallbacks resolved.
Sourcepub fn supports_flush_all(&self) -> bool
pub fn supports_flush_all(&self) -> bool
Whether cuptiActivityFlushAll resolved.
Auto Trait Implementations§
impl Freeze for CuptiLibrary
impl RefUnwindSafe for CuptiLibrary
impl Send for CuptiLibrary
impl Sync for CuptiLibrary
impl Unpin for CuptiLibrary
impl UnsafeUnpin for CuptiLibrary
impl UnwindSafe for CuptiLibrary
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