pub trait BinMiniOp: Debug + DynClone + Send + Sync + 'static + Downcast {
Show 14 methods // Required methods fn name(&self) -> &'static str; fn result_datum_type( &self, a: DatumType, b: DatumType ) -> TractResult<DatumType>; fn eval_unicast_in_place( &self, a: &Tensor, b: &mut Tensor ) -> TractResult<()>; fn eval_uniform_in_place( &self, a: &Tensor, b: &mut Tensor ) -> TractResult<()>; fn eval_in_a(&self, a: &mut Tensor, b: &Tensor) -> TractResult<()>; fn eval_out_of_place( &self, c: &mut Tensor, a: &Tensor, b: &Tensor ) -> TractResult<()>; // Provided methods fn validation(&self) -> Validation { ... } fn operating_datum_type( &self, a: DatumType, b: DatumType ) -> TractResult<DatumType> { ... } fn generic_eval(&self, a: TValue, b: TValue) -> TractResult<Tensor> { ... } fn eval(&self, a: TValue, b: TValue) -> TractResult<Tensor> { ... } fn declutter( &self, model: &TypedModel, node: &TypedNode ) -> TractResult<Option<TypedModelPatch>> { ... } fn codegen( &self, model: &TypedModel, node: &TypedNode ) -> TractResult<Option<TypedModelPatch>> { ... } fn cost_per_element(&self, dt: DatumType) -> TVec<(Cost, usize)> { ... } fn as_linalg_binop(&self) -> Option<BinOp> { ... }
}

Required Methods§

source

fn name(&self) -> &'static str

source

fn result_datum_type( &self, a: DatumType, b: DatumType ) -> TractResult<DatumType>

source

fn eval_unicast_in_place(&self, a: &Tensor, b: &mut Tensor) -> TractResult<()>

source

fn eval_uniform_in_place(&self, a: &Tensor, b: &mut Tensor) -> TractResult<()>

source

fn eval_in_a(&self, a: &mut Tensor, b: &Tensor) -> TractResult<()>

source

fn eval_out_of_place( &self, c: &mut Tensor, a: &Tensor, b: &Tensor ) -> TractResult<()>

Provided Methods§

Implementations§

source§

impl dyn BinMiniOp

source

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

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

source

pub fn downcast<__T: BinMiniOp>(self: Box<Self>) -> Result<Box<__T>, Box<Self>>

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: BinMiniOp>(self: Rc<Self>) -> Result<Rc<__T>, Rc<Self>>

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

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

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<'clone> Clone for Box<dyn BinMiniOp + 'clone>

source§

fn clone(&self) -> Self

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 BinMiniOp + Send + 'clone>

source§

fn clone(&self) -> Self

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 BinMiniOp + Send + Sync + 'clone>

source§

fn clone(&self) -> Self

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 BinMiniOp + Sync + 'clone>

source§

fn clone(&self) -> Self

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

Implementors§