Trait tract_pulse::internal::tract_core::ops::Op[]

pub trait Op: 'static + Debug + DynClone + Send + Sync + Downcast + EvalOp + DynHash {
    fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
;
fn name(&self) -> Cow<'_, str>;
fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>; fn validation(&self) -> Validation { ... }
fn same_as(&self, _other: &(dyn Op + 'static)) -> bool { ... }
fn info(&self) -> Result<Vec<String, Global>, Error> { ... } }
Expand description

A base operation

Required methods

fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

Expand description

Vector of short strings defining what families the op belongs too. tract-core defines “core”, “mir”, “lir”.

fn name(&self) -> Cow<'_, str>

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

Provided methods

fn validation(&self) -> Validation

Expand description

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

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

Expand description

Compare two ops.

fn info(&self) -> Result<Vec<String, Global>, Error>

Expand description

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

Implementations

impl dyn Op + 'static

pub fn is<__T>(&self) -> bool where
    __T: Op

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

pub fn downcast<__T>(
    self: Box<dyn Op + 'static, Global>
) -> Result<Box<__T, Global>, Box<dyn Op + 'static, Global>> where
    __T: Op

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>(
    self: Rc<dyn Op + 'static>
) -> Result<Rc<__T>, Rc<dyn Op + 'static>> where
    __T: Op

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>(&self) -> Option<&__T> where
    __T: Op

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>(&mut self) -> Option<&mut __T> where
    __T: Op

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 Box<dyn TypedOp + 'static, Global>

pub fn as_mut(&mut self) -> &mut (dyn Op + 'static)

Performs the conversion.

impl AsMut<dyn Op + 'static> for dyn TypedOp + 'static

pub fn as_mut(&mut self) -> &mut (dyn Op + 'static)

Performs the conversion.

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

fn as_mut(&mut self) -> &mut dyn Op[src]

Performs the conversion.

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

fn as_mut(&mut self) -> &mut dyn Op[src]

Performs the conversion.

impl AsRef<dyn Op + 'static> for Box<dyn TypedOp + 'static, Global>

pub fn as_ref(&self) -> &(dyn Op + 'static)

Performs the conversion.

impl AsRef<dyn Op + 'static> for dyn TypedOp + 'static

pub fn as_ref(&self) -> &(dyn Op + 'static)

Performs the conversion.

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

fn as_ref(&self) -> &dyn Op[src]

Performs the conversion.

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

fn as_ref(&self) -> &dyn Op[src]

Performs the conversion.

Implementations on Foreign Types

impl Op for PulsePad[src]

pub fn name(&self) -> Cow<'_, str>[src]

pub fn info(&self) -> Result<Vec<String, Global>, Error>[src]

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>[src]

impl Op for Delay[src]

pub fn name(&self) -> Cow<'_, str>[src]

pub fn info(&self) -> Result<Vec<String, Global>, Error>[src]

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn same_as(&self, other: &(dyn Op + 'static)) -> bool[src]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>[src]

Implementors

impl Op for AxisOp

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for PulsedSource[src]

fn name(&self) -> Cow<'_, str>[src]

fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

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

impl Op for ConstantOfShape

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for FiniteReshape

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for Gather

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for GatherElements

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for GatherNd

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for MultiBroadcastTo

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for OneHot

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for Pad

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for ScatterElements

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for ScatterNd

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for Slice

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

pub fn same_as(&self, other: &(dyn Op + 'static)) -> bool

impl Op for Tile

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for TypedConcat

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for MergeOpUnicast

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for TypedBinOp

pub fn name(&self) -> Cow<'_, str>

pub fn validation(&self) -> Validation

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for UnaryOp

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn validation(&self) -> Validation

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for Im2Col

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn same_as(&self, other: &(dyn Op + 'static)) -> bool

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for ConvUnary

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn validation(&self) -> Validation

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for DeconvUnary

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for MaxPool

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for SumPool

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn validation(&self) -> Validation

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for Dummy

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for ElementWiseOp

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn validation(&self) -> Validation

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for Identity

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for Const

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for Iff

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for LirMatMulUnary

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for MatMatMulPack

pub fn name(&self) -> Cow<'_, str>

pub fn same_as(&self, other: &(dyn Op + 'static)) -> bool

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for MatMul

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for MatMulUnary

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for QMatMul

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for Reduce

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for DequantizeLinearF32

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn validation(&self) -> Validation

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for LirScan

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for Scan

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn validation(&self) -> Validation

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for TypedSource

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for Downsample

pub fn name(&self) -> Cow<'_, str>

pub fn info(&self) -> Result<Vec<String, Global>, Error>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn same_as(&self, other: &(dyn Op + 'static)) -> bool

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>

impl Op for UnimplementedOp

pub fn name(&self) -> Cow<'_, str>

pub fn op_families(&self) -> &'static [&'static str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]

pub fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>