[][src]Trait tract_core::ops::Op

pub trait Op: Debug + DynClone + Send + Sync + 'static + Downcast + StatefullOp {
    fn name(&self) -> Cow<str>;
fn as_typed(&self) -> Option<&dyn TypedOp>; fn nested_models(
        &self
    ) -> Vec<(Cow<str>, &dyn Model, Vec<String>, Vec<String>)> { ... }
fn validation(&self) -> Validation { ... }
fn same_as(&self, _other: &dyn Op) -> bool { ... }
fn info(&self) -> TractResult<Vec<String>> { ... }
fn as_pulsed(&self) -> Option<&dyn PulsedOp> { ... }
fn is_canonic(&self) -> bool { ... } }

A base operation

Required methods

fn name(&self) -> Cow<str>

fn as_typed(&self) -> Option<&dyn TypedOp>

Loading content...

Provided methods

fn nested_models(&self) -> Vec<(Cow<str>, &dyn Model, Vec<String>, Vec<String>)>

Nested models, with label (for audit).

fn validation(&self) -> Validation

The kind of accuracy check that should be performed on operation when testing them.

fn same_as(&self, _other: &dyn Op) -> bool

Compare two ops.

fn info(&self) -> TractResult<Vec<String>>

Short (one-line) strings giving hints on internal implementation or important configuration details to be displayed in dumps.

fn as_pulsed(&self) -> Option<&dyn PulsedOp>

fn is_canonic(&self) -> bool

Loading content...

Methods

impl dyn Op[src]

pub fn is<__T: Op>(&self) -> bool[src]

Returns true if the trait object wraps an object of type __T.

pub fn downcast<__T: Op>(self: Box<Self>) -> Result<Box<__T>, Box<Self>>[src]

Returns a boxed object from a boxed trait object if the underlying object is of type __T. Returns the original boxed trait if it isn't.

pub fn downcast_rc<__T: Op>(self: Rc<Self>) -> Result<Rc<__T>, Rc<Self>>[src]

Returns an Rc-ed object from an Rc-ed trait object if the underlying object is of type __T. Returns the original Rc-ed trait if it isn't.

pub fn downcast_ref<__T: Op>(&self) -> Option<&__T>[src]

Returns a reference to the object within the trait object if it is of type __T, or None if it isn't.

pub fn downcast_mut<__T: Op>(&mut self) -> Option<&mut __T>[src]

Returns a mutable reference to the object within the trait object if it is of type __T, or None if it isn't.

Trait Implementations

impl AsMut<dyn Op + 'static> for dyn TypedOp[src]

impl AsMut<dyn Op + 'static> for Box<dyn PulsedOp>[src]

impl AsMut<dyn Op + 'static> for dyn PulsedOp[src]

impl AsMut<dyn Op + 'static> for Box<dyn TypedOp>[src]

impl AsRef<dyn Op + 'static> for dyn TypedOp[src]

impl AsRef<dyn Op + 'static> for Box<dyn TypedOp>[src]

impl AsRef<dyn Op + 'static> for dyn PulsedOp[src]

impl AsRef<dyn Op + 'static> for Box<dyn PulsedOp>[src]

Implementors

impl Op for AxisOp[src]

impl Op for FiniteReshape[src]

impl Op for Flatten[src]

impl Op for Gather[src]

impl Op for MultiBroadcastTo[src]

impl Op for Pad[src]

impl Op for Shape[src]

impl Op for Size[src]

impl Op for Tile[src]

impl Op for TypedConcat[src]

impl Op for TypedReshape[src]

impl Op for InferenceBinOp[src]

impl Op for MergeOp[src]

impl Op for MergeOpUnicast[src]

impl Op for TypedBinOp[src]

impl Op for UnaryOp[src]

impl Op for AvgPool[src]

impl Op for ConvUnary[src]

impl Op for MaxPool[src]

impl Op for Downsample[src]

impl Op for Dummy[src]

impl Op for ElementWiseOp[src]

impl Op for Identity[src]

impl Op for Const[src]

impl Op for Iff[src]

impl Op for MatMul[src]

impl Op for MatMulUnary[src]

impl Op for ArgMaxMin[src]

impl Op for GlobalAvgPool[src]

impl Op for GlobalLpPool[src]

impl Op for GlobalMaxPool[src]

impl Op for Reduce[src]

impl Op for DequantizeLinearF32[src]

impl Op for TypedScan[src]

impl Op for PulsedSource[src]

impl Op for TypedSource[src]

impl Op for UnimplementedOp[src]

impl Op for Delay[src]

impl<D: DimLike + ToDim> Op for Slice<D>[src]

impl<T> Op for MatMatMulPackB<T> where
    T: Copy + Datum + Zero
[src]

impl<T: Copy + Datum + Zero> Op for Im2Col<T>[src]

Loading content...