pub struct TensorCharacteristics {
pub size: usize,
pub condition_number: f32,
pub sparsity: f32,
pub numerical_precision: f32,
pub memory_layout_score: f32,
pub computational_complexity: f32,
}Expand description
Tensor characteristics for algorithm selection
Fields§
§size: usizeNumber of elements in the tensor
condition_number: f32Condition number estimate (ratio of largest to smallest singular value)
sparsity: f32Sparsity ratio (fraction of zero elements)
numerical_precision: f32Numerical precision characteristics
memory_layout_score: f32Memory layout efficiency
computational_complexity: f32Computational complexity estimate
Implementations§
Source§impl TensorCharacteristics
impl TensorCharacteristics
Sourcepub fn analyze(tensor: &Tensor) -> TorshResult<Self>
pub fn analyze(tensor: &Tensor) -> TorshResult<Self>
Analyze tensor characteristics
Trait Implementations§
Source§impl Clone for TensorCharacteristics
impl Clone for TensorCharacteristics
Source§fn clone(&self) -> TensorCharacteristics
fn clone(&self) -> TensorCharacteristics
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 TensorCharacteristics
impl RefUnwindSafe for TensorCharacteristics
impl Send for TensorCharacteristics
impl Sync for TensorCharacteristics
impl Unpin for TensorCharacteristics
impl UnsafeUnpin for TensorCharacteristics
impl UnwindSafe for TensorCharacteristics
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