Trait tract_pulse::internal::TypedOp[]

pub trait TypedOp: 'static + Op + Debug + DynClone + Send + Sync + Downcast + EvalOp + DynHash {
Show methods fn as_op(&self) -> &(dyn Op + 'static);
fn as_op_mut(&mut self) -> &mut (dyn Op + 'static);
fn output_facts(
        &self,
        inputs: &[&TypedFact]
    ) -> Result<SmallVec<[TypedFact; 4]>, Error>; fn invariants(
        &self,
        model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
    ) -> Result<Invariants, Error> { ... }
fn fuse(
        &self,
        _model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        _node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
    ) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error> { ... }
fn declutter(
        &self,
        model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
    ) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error> { ... }
fn cost(
        &self,
        _inputs: &[&TypedFact]
    ) -> Result<SmallVec<[(Cost, TDim); 4]>, Error> { ... }
fn suggested_axis_changes(
        &self
    ) -> Result<SmallVec<[(InOut, AxisOp); 4]>, Error> { ... }
fn change_axes(
        &self,
        model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        io: InOut,
        change: &AxisOp
    ) -> Result<Option<AxisChangeConsequence>, Error> { ... }
fn slice_output(
        &self,
        model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        patch: &mut ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        output_slot: usize,
        axis: usize,
        start: usize,
        end: usize
    ) -> Result<Option<OutletId>, Error> { ... }
fn quantize(
        &self,
        model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        dt: DatumType,
        scale: f32,
        zero_point: i32
    ) -> Result<Option<Box<dyn TypedOp + 'static, Global>>, Error> { ... }
fn concretize_dims(
        &self,
        source: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        target: &mut Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        mapping: &HashMap<OutletId, OutletId, RandomState>,
        values: &SymbolValues
    ) -> Result<SmallVec<[OutletId; 4]>, Error> { ... }
fn codegen(
        &self,
        model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
    ) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error> { ... }
fn nested_model_multipliers(
        &self,
        inputs: &[&TypedFact]
    ) -> Vec<(Cow<'_, str>, f64), Global>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
{ ... }
}

Required methods

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

Expand description

Reinterpret the TypedOp as an Op.

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

Expand description

Reinterpret the TypedOp as an Op, mutably.

fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

Expand description

Deduce output facts from input facts.

Provided methods

fn invariants(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Invariants, Error>

fn fuse(
    &self,
    _model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

Expand description

Fuse op after codegen to deal with local optimisations.

fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

Expand description

Declutter the op to the tract_core operator set as much as possible.

fn cost(
    &self,
    _inputs: &[&TypedFact]
) -> Result<SmallVec<[(Cost, TDim); 4]>, Error>

Expand description

Computes a cost hint of the operation.

Each pair is a type of operation and a number per call on eval.

fn suggested_axis_changes(
    &self
) -> Result<SmallVec<[(InOut, AxisOp); 4]>, Error>

fn change_axes(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    io: InOut,
    change: &AxisOp
) -> Result<Option<AxisChangeConsequence>, Error>

fn slice_output(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    patch: &mut ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    output_slot: usize,
    axis: usize,
    start: usize,
    end: usize
) -> Result<Option<OutletId>, Error>

fn quantize(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    dt: DatumType,
    scale: f32,
    zero_point: i32
) -> Result<Option<Box<dyn TypedOp + 'static, Global>>, Error>

Expand description

Transforms the op in an equivalent one, operating on dt (i8 or u8).

Returns None if the op can not be translated.

fn concretize_dims(
    &self,
    source: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    target: &mut Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    mapping: &HashMap<OutletId, OutletId, RandomState>,
    values: &SymbolValues
) -> Result<SmallVec<[OutletId; 4]>, Error>

Expand description

Transform the op into by providing a value to one or more symbols.

fn codegen(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

Expand description

Translate the op into the most efficient form possible for execution.

This transformation is supposed to be final, no more pass are expected to be run on the codegen networks.

fn nested_model_multipliers(
    &self,
    inputs: &[&TypedFact]
) -> Vec<(Cow<'_, str>, f64), Global>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator

Expand description

Nested model multipliers, with label (for profiling).

Trait Implementations

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

pub fn as_mut(&mut self) -> &mut (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.

Implementations on Foreign Types

impl TypedOp for PulsePad[src]

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>
[src]

pub fn as_op(&self) -> &(dyn Op + 'static)[src]

pub fn as_op_mut(&mut self) -> &mut (dyn Op + 'static)[src]

impl TypedOp for Delay[src]

pub fn as_op(&self) -> &(dyn Op + 'static)[src]

pub fn as_op_mut(&mut self) -> &mut (dyn Op + 'static)[src]

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>
[src]

pub fn cost(
    &self,
    _inputs: &[&TypedFact]
) -> Result<SmallVec<[(Cost, TDim); 4]>, Error>
[src]

Implementors

impl TypedOp for AxisOp

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

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

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn invariants(
    &self,
    _model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Invariants, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

pub fn suggested_axis_changes(
    &self
) -> Result<SmallVec<[(InOut, AxisOp); 4]>, Error>

pub fn change_axes(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    io: InOut,
    change: &AxisOp
) -> Result<Option<AxisChangeConsequence>, Error>

pub fn concretize_dims(
    &self,
    _source: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    target: &mut Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    mapping: &HashMap<OutletId, OutletId, RandomState>,
    values: &SymbolValues
) -> Result<SmallVec<[OutletId; 4]>, Error>

impl TypedOp for ConstantOfShape

pub fn output_facts(
    &self,
    _inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

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

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

impl TypedOp for FiniteReshape

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

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

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

impl TypedOp for Gather

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

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

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

impl TypedOp for GatherElements

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

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

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

impl TypedOp for GatherNd

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

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

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

impl TypedOp for MultiBroadcastTo

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn concretize_dims(
    &self,
    _source: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    target: &mut Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    mapping: &HashMap<OutletId, OutletId, RandomState>,
    values: &SymbolValues
) -> Result<SmallVec<[OutletId; 4]>, Error>

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

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

impl TypedOp for OneHot

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn invariants(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Invariants, Error>

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

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

impl TypedOp for Pad

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

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

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

impl TypedOp for ScatterElements

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

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

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

impl TypedOp for ScatterNd

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

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

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

impl TypedOp for Slice

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn invariants(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Invariants, Error>

pub fn change_axes(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _io: InOut,
    change: &AxisOp
) -> Result<Option<AxisChangeConsequence>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

pub fn slice_output(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    patch: &mut ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _output_slot: usize,
    axis: usize,
    start: usize,
    end: usize
) -> Result<Option<OutletId>, Error>

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

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

impl TypedOp for Tile

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

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

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

impl TypedOp for TypedConcat

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

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

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn invariants(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Invariants, Error>

pub fn change_axes(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _io: InOut,
    change: &AxisOp
) -> Result<Option<AxisChangeConsequence>, Error>

pub fn slice_output(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    patch: &mut ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _output_slot: usize,
    axis: usize,
    start: usize,
    end: usize
) -> Result<Option<OutletId>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

impl TypedOp for MergeOpUnicast

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn cost(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[(Cost, TDim); 4]>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

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

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

impl TypedOp for TypedBinOp

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn change_axes(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _io: InOut,
    change: &AxisOp
) -> Result<Option<AxisChangeConsequence>, Error>

pub fn invariants(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Invariants, Error>

pub fn cost(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[(Cost, TDim); 4]>, Error>

pub fn slice_output(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    patch: &mut ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _output_slot: usize,
    axis: usize,
    start: usize,
    end: usize
) -> Result<Option<OutletId>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

pub fn codegen(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

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

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

impl TypedOp for UnaryOp

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn invariants(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Invariants, Error>

pub fn slice_output(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    patch: &mut ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _output_slot: usize,
    axis: usize,
    start: usize,
    end: usize
) -> Result<Option<OutletId>, Error>

pub fn cost(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[(Cost, TDim); 4]>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

pub fn change_axes(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _io: InOut,
    change: &AxisOp
) -> Result<Option<AxisChangeConsequence>, Error>

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

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

impl TypedOp for Im2Col

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

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

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

impl TypedOp for ConvUnary

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn invariants(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Invariants, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

pub fn cost(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[(Cost, TDim); 4]>, Error>

pub fn change_axes(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _io: InOut,
    change: &AxisOp
) -> Result<Option<AxisChangeConsequence>, Error>

pub fn codegen(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

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

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

impl TypedOp for DeconvUnary

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn codegen(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

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

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

impl TypedOp for MaxPool

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

pub fn codegen(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

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

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

impl TypedOp for SumPool

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn codegen(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

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

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

impl TypedOp for Dummy

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

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

pub fn output_facts(
    &self,
    _inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

impl TypedOp for ElementWiseOp

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn change_axes(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _io: InOut,
    change: &AxisOp
) -> Result<Option<AxisChangeConsequence>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

pub fn invariants(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Invariants, Error>

pub fn cost(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[(Cost, TDim); 4]>, Error>

pub fn quantize(
    &self,
    _model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    dt: DatumType,
    scale: f32,
    zero_point: i32
) -> Result<Option<Box<dyn TypedOp + 'static, Global>>, Error>

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

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

impl TypedOp for Identity

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

pub fn fuse(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

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

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

impl TypedOp for Const

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

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

pub fn output_facts(
    &self,
    _inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

impl TypedOp for Iff

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

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

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

impl TypedOp for LirMatMulUnary

pub fn output_facts(
    &self,
    _inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn cost(
    &self,
    _inputs: &[&TypedFact]
) -> Result<SmallVec<[(Cost, TDim); 4]>, Error>

pub fn fuse(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

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

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

impl TypedOp for MatMatMulPack

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

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

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

impl TypedOp for MatMul

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

pub fn cost(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[(Cost, TDim); 4]>, Error>

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

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

impl TypedOp for MatMulUnary

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn invariants(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Invariants, Error>

pub fn change_axes(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _io: InOut,
    change: &AxisOp
) -> Result<Option<AxisChangeConsequence>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

pub fn slice_output(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    patch: &mut ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _output_slot: usize,
    axis: usize,
    start: usize,
    end: usize
) -> Result<Option<OutletId>, Error>

pub fn cost(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[(Cost, TDim); 4]>, Error>

pub fn codegen(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

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

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

impl TypedOp for QMatMul

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

pub fn cost(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[(Cost, TDim); 4]>, Error>

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

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

impl TypedOp for Reduce

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

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

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn invariants(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Invariants, Error>

pub fn change_axes(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _io: InOut,
    change: &AxisOp
) -> Result<Option<AxisChangeConsequence>, Error>

impl TypedOp for DequantizeLinearF32

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn invariants(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Invariants, Error>

pub fn change_axes(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _io: InOut,
    change: &AxisOp
) -> Result<Option<AxisChangeConsequence>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    dequant: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

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

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

impl TypedOp for LirScan

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

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

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

impl TypedOp for Scan

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

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

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn invariants(
    &self,
    _model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Invariants, Error>

pub fn change_axes(
    &self,
    _model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    io: InOut,
    change: &AxisOp
) -> Result<Option<AxisChangeConsequence>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

pub fn concretize_dims(
    &self,
    _source: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    target: &mut Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    mapping: &HashMap<OutletId, OutletId, RandomState>,
    values: &SymbolValues
) -> Result<SmallVec<[OutletId; 4]>, Error>

pub fn codegen(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

impl TypedOp for TypedSource

pub fn output_facts(
    &self,
    _inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn change_axes(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _io: InOut,
    change: &AxisOp
) -> Result<Option<AxisChangeConsequence>, Error>

pub fn concretize_dims(
    &self,
    _source: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    target: &mut Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    _mapping: &HashMap<OutletId, OutletId, RandomState>,
    values: &SymbolValues
) -> Result<SmallVec<[OutletId; 4]>, Error>

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

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

impl TypedOp for Downsample

pub fn output_facts(
    &self,
    inputs: &[&TypedFact]
) -> Result<SmallVec<[TypedFact; 4]>, Error>

pub fn declutter(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>

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

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