pub struct ViewMemoryUsage {
pub view_elements: usize,
pub total_elements: usize,
pub active_views: usize,
pub is_contiguous: bool,
pub memory_efficiency: f64,
}Expand description
Memory usage information for tensor views
Fields§
§view_elements: usizeNumber of elements in this view
total_elements: usizeTotal elements in underlying storage
active_views: usizeNumber of active views on this storage
is_contiguous: boolWhether the view is contiguous in memory
memory_efficiency: f64Memory efficiency (view_size / total_size)
Trait Implementations§
Source§impl Clone for ViewMemoryUsage
impl Clone for ViewMemoryUsage
Source§fn clone(&self) -> ViewMemoryUsage
fn clone(&self) -> ViewMemoryUsage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ViewMemoryUsage
impl RefUnwindSafe for ViewMemoryUsage
impl Send for ViewMemoryUsage
impl Sync for ViewMemoryUsage
impl Unpin for ViewMemoryUsage
impl UnsafeUnpin for ViewMemoryUsage
impl UnwindSafe for ViewMemoryUsage
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