Trait Op

Source
pub trait Op:
    Debug
    + DynClone
    + Send
    + Sync
    + 'static
    + Downcast
    + EvalOp {
    // Required methods
    fn name(&self) -> Cow<'_, str>;
    fn as_typed(&self) -> Option<&(dyn TypedOp + 'static)>;

    // Provided methods
    fn validation(&self) -> Validation { ... }
    fn same_as(&self, _other: &(dyn Op + 'static)) -> bool { ... }
    fn info(&self) -> Result<Vec<String>, Error> { ... }
}
Expand description

A base operation

Required Methods§

Source

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

Source

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

Provided Methods§

Source

fn validation(&self) -> Validation

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

Source

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

Compare two ops.

Source

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

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

Implementations§

Source§

impl dyn Op

Source

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

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

Source

pub fn downcast<__T>(self: Box<dyn Op>) -> Result<Box<__T>, Box<dyn Op>>
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.

Source

pub fn downcast_rc<__T>(self: Rc<dyn Op>) -> Result<Rc<__T>, Rc<dyn Op>>
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.

Source

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.

Source

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§

Source§

impl AsMut<dyn Op> for Box<dyn PulsedOp>

Source§

fn as_mut(&mut self) -> &mut dyn Op

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsMut<dyn Op> for Box<dyn TypedOp>

Source§

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

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsMut<dyn Op> for dyn PulsedOp

Source§

fn as_mut(&mut self) -> &mut dyn Op

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsMut<dyn Op> for dyn TypedOp

Source§

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

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<dyn Op> for Box<dyn PulsedOp>

Source§

fn as_ref(&self) -> &dyn Op

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn Op> for Box<dyn TypedOp>

Source§

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

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn Op> for dyn PulsedOp

Source§

fn as_ref(&self) -> &dyn Op

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<dyn Op> for dyn TypedOp

Source§

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

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<'clone> Clone for Box<dyn Op + 'clone>

Source§

fn clone(&self) -> Box<dyn Op + 'clone>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'clone> Clone for Box<dyn Op + Send + 'clone>

Source§

fn clone(&self) -> Box<dyn Op + Send + 'clone>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'clone> Clone for Box<dyn Op + Sync + Send + 'clone>

Source§

fn clone(&self) -> Box<dyn Op + Sync + Send + 'clone>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'clone> Clone for Box<dyn Op + Sync + 'clone>

Source§

fn clone(&self) -> Box<dyn Op + Sync + 'clone>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Display for Box<dyn Op>

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<O> From<O> for Box<dyn Op>
where O: Op,

Source§

fn from(it: O) -> Box<dyn Op>

Converts to this type from the input type.

Implementations on Foreign Types§

Source§

impl Op for PulsedSameAxisConcat

Source§

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

Source§

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

Source§

impl Op for DeconvDelay

Source§

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

Source§

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

Source§

impl Op for Delay

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl Op for PulseMask

Source§

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

Source§

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

Source§

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

Source§

impl Op for PulsePad

Source§

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

Source§

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

Source§

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

Source§

impl Op for PulsedAxisSlice

Source§

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

Source§

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

Source§

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

Implementors§

Source§

impl Op for AxisOp

Source§

impl Op for Comp

Source§

impl Op for PulsedSource

Source§

impl Op for IntoShape

Source§

impl Op for DynSlice

Source§

impl Op for DynTile

Source§

impl Op for FiniteReshape

Source§

impl Op for Gather

Source§

impl Op for GatherElements

Source§

impl Op for GatherNd

Source§

impl Op for MultiBroadcastTo

Source§

impl Op for OneHot

Source§

impl Op for Pad

Source§

impl Op for Range

Source§

impl Op for ScatterElements

Source§

impl Op for ScatterNd

Source§

impl Op for Slice

Source§

impl Op for StridedSlice

Source§

impl Op for Tile

Source§

impl Op for Topk

Source§

impl Op for Trilu

Source§

impl Op for TypedConcat

Source§

impl Op for OptBinByScalar

Source§

impl Op for OptBinUnicast

Source§

impl Op for TypedBinOp

Source§

impl Op for Cast

Source§

impl Op for Im2Col

Source§

impl Op for Conv

Source§

impl Op for Deconv

Source§

impl Op for MaxPool

Source§

impl Op for SumPool

Source§

impl Op for Dummy

Source§

impl Op for EinSumMatMul

Source§

impl Op for PrefixMatMul

Source§

impl Op for EinSum

Source§

impl Op for ElementWiseOp

Source§

impl Op for Fft

Source§

impl Op for Stft

Source§

impl Op for Identity

Source§

impl Op for PinConst

Source§

impl Op for Const

Source§

impl Op for IfThenElse

Source§

impl Op for Iff

Source§

impl Op for OptMatMul

Source§

impl Op for OptMatMulPack

Source§

impl Op for OptSimpleMatMulPack

Source§

impl Op for ForceEval

Source§

impl Op for Load

Source§

impl Op for Store

Source§

impl Op for Reduce

Source§

impl Op for Softmax

Source§

impl Op for DequantizeLinearF32

Source§

impl Op for OptScan

Source§

impl Op for Scan

Source§

impl Op for TypedSource

Source§

impl Op for Downsample

Source§

impl Op for SubmodelOp

Source§

impl Op for UnimplementedOp