pub struct GpuStatsCollector;Expand description
No-op GPU stats collector for CPU builds.
All methods compile away completely; no NVML dependency is pulled in.
Implementations§
Source§impl GpuStatsCollector
impl GpuStatsCollector
Sourcepub fn init(_gpu_count: usize) -> Self
pub fn init(_gpu_count: usize) -> Self
Returns a no-op collector. The gpu_count argument is accepted for
API compatibility with GPU builds but is otherwise ignored.
Sourcepub fn emit_heartbeat(&self)
pub fn emit_heartbeat(&self)
No-op on CPU builds.
Auto Trait Implementations§
impl Freeze for GpuStatsCollector
impl RefUnwindSafe for GpuStatsCollector
impl Send for GpuStatsCollector
impl Sync for GpuStatsCollector
impl Unpin for GpuStatsCollector
impl UnsafeUnpin for GpuStatsCollector
impl UnwindSafe for GpuStatsCollector
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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