Trait tract_core::ops::element_wise::ElementWiseMiniOp[][src]

pub trait ElementWiseMiniOp: Debug + DynClone + Send + Sync + 'static + Downcast + DynHash {
    fn name(&self) -> String;

    fn prefix(&self) -> &'static str { ... }
fn validation(&self) -> Validation { ... }
fn output_type(&self, input_type: DatumType) -> Option<DatumType> { ... }
fn eval_in_place(&self, t: &mut Tensor) -> TractResult<()> { ... }
fn eval_out_of_place(&self, t: &Tensor) -> TractResult<Tensor> { ... }
fn cost_per_element(&self, dt: DatumType) -> TVec<(Cost, usize)> { ... }
fn declutter(
        &self,
        model: &TypedModel,
        node: &TypedNode
    ) -> TractResult<Option<TypedModelPatch>> { ... }
fn quantize(
        &self,
        dt: DatumType,
        scale: f32,
        zero_point: i32
    ) -> TractResult<Option<Box<dyn ElementWiseMiniOp>>> { ... }
fn info(&self) -> TractResult<Vec<String>> { ... } }

Required methods

Provided methods

Implementations

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

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.

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.

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

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

Implementors