[−][src]Struct tract_core::dim::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.
fn add(self, rhs: &'a TDim) -> Self
[src]
impl<I: AsPrimitive<i32>> Add<I> for TDim
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: I) -> Self
[src]
impl Add<TDim> for TDim
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: TDim) -> Self
[src]
impl<'a> AddAssign<&'a TDim> for TDim
[src]
fn add_assign(&mut self, rhs: &'a TDim)
[src]
impl AddAssign<TDim> for TDim
[src]
fn add_assign(&mut self, rhs: TDim)
[src]
impl ArrayDatum for TDim
[src]
unsafe fn stack_tensors(
axis: usize,
tensors: &[impl Borrow<Tensor>]
) -> TractResult<Tensor>
[src]
axis: usize,
tensors: &[impl Borrow<Tensor>]
) -> TractResult<Tensor>
unsafe fn stack_views(
axis: usize,
views: &[ArrayViewD<TDim>]
) -> TractResult<ArrayD<TDim>>
[src]
axis: usize,
views: &[ArrayViewD<TDim>]
) -> TractResult<ArrayD<TDim>>
unsafe fn uninitialized_array<S, D, Sh>(shape: Sh) -> ArrayBase<S, D> where
Sh: ShapeBuilder<Dim = D>,
S: DataOwned<Elem = Self>,
D: Dimension,
[src]
Sh: ShapeBuilder<Dim = D>,
S: DataOwned<Elem = Self>,
D: Dimension,
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]
fn maybe_mul(&self, other: &Self) -> TractResult<Self>
[src]
fn to_integer(&self) -> TractResult<i32>
[src]
fn one() -> Self
[src]
fn div_ceil(&self, other: usize) -> Self
[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.
fn div(self, rhs: I) -> Self
[src]
impl DivAssign<u32> for TDim
[src]
fn div_assign(&mut self, rhs: u32)
[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.
fn from_str(s: &str) -> Result<TDim, Self::Err>
[src]
impl<I: AsPrimitive<i32>> Mul<I> for TDim
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: I) -> Self
[src]
impl Neg for TDim
[src]
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.
fn rem(self, rhs: I) -> Self
[src]
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.
fn sub(self, rhs: &'a TDim) -> Self
[src]
impl<I: AsPrimitive<i32>> Sub<I> for TDim
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: I) -> Self
[src]
impl Sub<TDim> for TDim
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: TDim) -> Self
[src]
impl<'a> SubAssign<&'a TDim> for TDim
[src]
fn sub_assign(&mut self, rhs: &'a TDim)
[src]
impl SubAssign<TDim> for TDim
[src]
fn sub_assign(&mut self, rhs: 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
impl<I> ToDim for I where
I: Into<TDim>,
[src]
I: Into<TDim>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,