[][src]Struct tract_core::dim::TDim

pub struct TDim(_);

An arithmetic expression built with integer and the special value S for the streaming dimension.

Methods

impl TDim[src]

pub fn is_one(&self) -> bool[src]

Is this value One?

pub fn s() -> TDim[src]

The special value S, for streaming.

pub fn stream() -> TDim[src]

The special value S, for streaming.

pub fn as_const(&self) -> Option<i32>[src]

Try to convert the value to an integer, if it does not contains S.

pub fn eval(&self, s: i32) -> Option<i32>[src]

Eval the value for a given value of S.

pub fn is_stream(&self) -> bool[src]

Is the value dependend on S ?

pub fn to_integer(&self) -> TractResult<i32>[src]

Convert to integer if possible.

pub fn mul(&self, other: u32) -> TDim[src]

pub fn div_ceil(&self, other: u32) -> TDim[src]

Integer division rounding above.

Trait Implementations

impl<'a> Add<&'a TDim> for TDim[src]

type Output = Self

The resulting type after applying the + operator.

impl<I: AsPrimitive<i32>> Add<I> for TDim[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<TDim> for TDim[src]

type Output = Self

The resulting type after applying the + operator.

impl<'a> AddAssign<&'a TDim> for TDim[src]

impl AddAssign<TDim> for TDim[src]

impl ArrayDatum for TDim[src]

impl Clone for TDim[src]

impl Datum for TDim[src]

impl Debug for TDim[src]

impl Default for TDim[src]

impl DimLike for TDim[src]

impl Display for TDim[src]

impl<I: AsPrimitive<u32>> Div<I> for TDim[src]

type Output = Self

The resulting type after applying the / operator.

impl DivAssign<u32> for TDim[src]

impl Eq for TDim[src]

impl<'a> From<&'a usize> for TDim[src]

impl From<TDim> for Tensor[src]

impl From<i32> for TDim[src]

impl From<i64> for TDim[src]

impl From<isize> for TDim[src]

impl From<usize> for TDim[src]

impl FromStr for TDim[src]

type Err = ParseIntError

The associated error which can be returned from parsing.

impl<I: AsPrimitive<i32>> Mul<I> for TDim[src]

type Output = Self

The resulting type after applying the * operator.

impl Neg for TDim[src]

type Output = Self

The resulting type after applying the - operator.

impl PartialEq<TDim> for TDim[src]

impl<I: AsPrimitive<u32>> Rem<I> for TDim[src]

type Output = Self

The resulting type after applying the % operator.

impl StructuralEq for TDim[src]

impl StructuralPartialEq for TDim[src]

impl<'a> Sub<&'a TDim> for TDim[src]

type Output = Self

The resulting type after applying the - operator.

impl<I: AsPrimitive<i32>> Sub<I> for TDim[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<TDim> for TDim[src]

type Output = Self

The resulting type after applying the - operator.

impl<'a> SubAssign<&'a TDim> for TDim[src]

impl SubAssign<TDim> for TDim[src]

impl Sum<TDim> for TDim[src]

impl Zero for TDim[src]

Auto Trait Implementations

impl RefUnwindSafe for TDim

impl Send for TDim

impl Sync for TDim

impl Unpin for TDim

impl UnwindSafe for TDim

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[src]

impl<I> ToDim for I where
    I: Into<TDim>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.