pub struct GpuMemoryStats {
pub total_allocated: usize,
pub free_bytes: usize,
pub fragmentation: f64,
pub buffer_counts: HashMap<String, usize>,
}Expand description
Snapshot of GPU memory usage.
Fields§
§total_allocated: usizeTotal bytes allocated.
free_bytes: usizeTotal bytes freed / available.
fragmentation: f64Fragmentation ratio in [0, 1] (0 = no fragmentation).
buffer_counts: HashMap<String, usize>Count of buffers by type.
Implementations§
Source§impl GpuMemoryStats
impl GpuMemoryStats
Sourcepub fn from_pool(pool: &GpuBufferPool) -> Self
pub fn from_pool(pool: &GpuBufferPool) -> Self
Compute stats from a pool.
Trait Implementations§
Source§impl Clone for GpuMemoryStats
impl Clone for GpuMemoryStats
Source§fn clone(&self) -> GpuMemoryStats
fn clone(&self) -> GpuMemoryStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GpuMemoryStats
impl Debug for GpuMemoryStats
Source§impl Default for GpuMemoryStats
impl Default for GpuMemoryStats
Source§fn default() -> GpuMemoryStats
fn default() -> GpuMemoryStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GpuMemoryStats
impl RefUnwindSafe for GpuMemoryStats
impl Send for GpuMemoryStats
impl Sync for GpuMemoryStats
impl Unpin for GpuMemoryStats
impl UnsafeUnpin for GpuMemoryStats
impl UnwindSafe for GpuMemoryStats
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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