Trait tract_pulse::internal::DimLike
pub trait DimLike: Clone + Default + PartialEq<Self> + From<usize> + for<'a> TryFrom<&'a TDim, Error = Error> + for<'a> Zero<Output = Self, Output = Self, Output = Self> + Debug + Display + Hash + Add<Self> + Add<usize> + for<'a> Add<&'a Self> + for<'a> Sub<Self, Output = Self, Output = Self, Output = Self> + Sub<usize> + for<'a> Sub<&'a Self> + for<'a> Mul<Self, Output = Self, Output = Self, Output = Self> + Mul<usize> + for<'a> Mul<&'a Self> + Div<usize, Output = Self> + Rem<usize, Output = Self> + Send + Sync + 'static + Sum<Self> + Product<Self> + ToDim {
// Required methods
fn maybe_div(&self, other: &Self) -> Result<(Self, u64), Error>;
fn to_i64(&self) -> Result<i64, Error>;
fn one() -> Self;
fn eval(&self, values: &SymbolValues) -> Self;
// Provided methods
fn divceil(&self, other: usize) -> Self { ... }
fn to_usize(&self) -> Result<usize, Error> { ... }
fn to_isize(&self) -> Result<isize, Error> { ... }
fn to_i32(&self) -> Result<i32, Error> { ... }
}
Expand description
A super-trait for value acting as tensor dimensions in tract.
Implemented by:
usize
for regular dimensionsTDim
supporting regular and streaming dimensions
Required Methods§
fn maybe_div(&self, other: &Self) -> Result<(Self, u64), Error>
fn one() -> Self
fn one() -> Self
do not use num_traits::Mul as it implies a regular Mul