[][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 div_ceil(&self, other: TDim) -> TDim[src]

Integer division rounding above.

Trait Implementations

impl Output for TDim[src]

fn wrap(self) -> Wrapped[src]

Wraps self in the Wrapped type.

impl IntoExp<GenericFact<TDim>> for TDim[src]

impl<'_> IntoExp<GenericFact<TDim>> for &'_ TDim[src]

impl ArrayDatum for TDim[src]

impl Datum for TDim[src]

impl DimLike for TDim[src]

fn div_ceil(&self, other: usize) -> Self[src]

Integer divise, rounding up to next integer.

impl Clone for TDim[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for TDim[src]

impl From<TDim> for Tensor[src]

impl From<i64> for TDim[src]

impl From<i32> for TDim[src]

impl From<isize> for TDim[src]

impl From<usize> for TDim[src]

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

impl PartialEq<TDim> for TDim[src]

impl Eq for TDim[src]

impl Display for TDim[src]

impl Debug for TDim[src]

impl Div<TDim> for TDim[src]

type Output = Self

The resulting type after applying the / operator.

impl<I: AsPrimitive<i32>> Div<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> 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 Sub<TDim> for TDim[src]

type Output = Self

The resulting type after applying the - operator.

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 Mul<TDim> for TDim[src]

type Output = Self

The resulting type after applying the * operator.

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

type Output = Self

The resulting type after applying the * operator.

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

type Output = Self

The resulting type after applying the * operator.

impl Rem<TDim> for TDim[src]

type Output = Self

The resulting type after applying the % operator.

impl<I: AsPrimitive<i32>> Rem<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 AddAssign<TDim> for TDim[src]

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

impl SubAssign<TDim> for TDim[src]

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

impl MulAssign<TDim> for TDim[src]

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

impl DivAssign<TDim> for TDim[src]

impl RemAssign<TDim> for TDim[src]

impl Product<TDim> for TDim[src]

impl Sum<TDim> for TDim[src]

impl FromIterator<TDim> for ShapeFact[src]

fn from_iter<I: IntoIterator<Item = TDim>>(iter: I) -> ShapeFact[src]

Converts an iterator over usize into a closed shape.

impl FromStr for TDim[src]

type Err = ParseIntError

The associated error which can be returned from parsing.

impl Zero for TDim[src]

fn set_zero(&mut self)[src]

Sets self to the additive identity element of Self, 0.

impl One for TDim[src]

fn set_one(&mut self)[src]

Sets self to the multiplicative identity element of Self, 1.

fn is_one(&self) -> bool where
    Self: PartialEq<Self>, 
[src]

Returns true if self is equal to the multiplicative identity. Read more

Auto Trait Implementations

impl Sync for TDim

impl Send for TDim

impl Unpin for TDim

impl RefUnwindSafe for TDim

impl UnwindSafe for TDim

Blanket Implementations

impl<T, E> IntoExp<T> for E where
    E: 'static + TExp<T>, 
[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> From<T> for T[src]

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

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.

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

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

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

impl<T> Downcast for T where
    T: Any
[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<T, Rhs> NumAssignOps<Rhs> for T where
    T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, 
[src]

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