Trait tract_pulse::internal::tract_core::ops::binary::BinMiniOp     
[−]pub trait BinMiniOp: 'static + Debug + DynClone + Send + Sync + Downcast + DynHash {
Show 15 methods
    fn name(&self) -> &'static str;
    fn operating_datum_type(
        &self,
        a: DatumType,
        b: DatumType
    ) -> Result<DatumType, Error>;
    fn result_datum_type(
        &self,
        a: DatumType,
        b: DatumType
    ) -> Result<DatumType, Error>;
    fn eval_unicast_in_place(
        &self,
        a: &Tensor,
        b: &mut Tensor
    ) -> Result<(), Error>;
    fn eval_uniform_in_place(
        &self,
        a: &Tensor,
        b: &mut Tensor
    ) -> Result<(), Error>;
    fn eval_out_of_place(
        &self,
        c: &mut Tensor,
        a: &Tensor,
        b: &Tensor
    ) -> Result<(), Error>;
    fn validation(&self) -> Validation { ... }
    fn generic_eval(
        &self,
        a: Arc<Tensor>,
        b: Arc<Tensor>
    ) -> Result<Tensor, Error> { ... }
    fn eval(&self, a: Arc<Tensor>, b: Arc<Tensor>) -> Result<Tensor, Error> { ... }
    fn unary_with_b_const(&self, b: &Arc<Tensor>) -> Option<UnaryOp> { ... }
    fn declutter_bin(
        &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_unary(
        &self,
        model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        a: &Arc<Tensor>
    ) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error> { ... }
    fn codegen_unary(
        &self,
        model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
        a: &Arc<Tensor>
    ) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error> { ... }
    fn cost_per_element(&self, dt: DatumType) -> SmallVec<[(Cost, usize); 4]> { ... }
    fn as_linalg_binop(&self) -> Option<BinOp> { ... }
}Required Methods
Provided Methods
fn validation(&self) -> Validation
fn unary_with_b_const(&self, b: &Arc<Tensor>) -> Option<UnaryOp>
fn declutter_bin(
    &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_unary(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    a: &Arc<Tensor>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>
fn codegen_unary(
    &self,
    model: &Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    node: &Node<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    a: &Arc<Tensor>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static, Global>>>, Error>
fn as_linalg_binop(&self) -> Option<BinOp>
Implementations
impl dyn BinMiniOp + 'static
impl dyn BinMiniOp + 'static
pub fn is<__T>(&self) -> boolwhere
    __T: BinMiniOp,
pub fn is<__T>(&self) -> boolwhere
    __T: BinMiniOp,
Returns true if the trait object wraps an object of type __T.
pub fn downcast<__T>(
    self: Box<dyn BinMiniOp + 'static, Global>
) -> Result<Box<__T, Global>, Box<dyn BinMiniOp + 'static, Global>>where
    __T: BinMiniOp,
pub fn downcast<__T>(
    self: Box<dyn BinMiniOp + 'static, Global>
) -> Result<Box<__T, Global>, Box<dyn BinMiniOp + 'static, Global>>where
    __T: BinMiniOp,
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 BinMiniOp + 'static>
) -> Result<Rc<__T>, Rc<dyn BinMiniOp + 'static>>where
    __T: BinMiniOp,
pub fn downcast_rc<__T>(
    self: Rc<dyn BinMiniOp + 'static>
) -> Result<Rc<__T>, Rc<dyn BinMiniOp + 'static>>where
    __T: BinMiniOp,
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: BinMiniOp,
pub fn downcast_ref<__T>(&self) -> Option<&__T>where
    __T: BinMiniOp,
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: BinMiniOp,
pub fn downcast_mut<__T>(&mut self) -> Option<&mut __T>where
    __T: BinMiniOp,
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<'clone> Clone for Box<dyn BinMiniOp + 'clone, Global>
impl<'clone> Clone for Box<dyn BinMiniOp + 'clone, Global>
fn clone(&self) -> Box<dyn BinMiniOp + 'clone, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global>where
    R: Read + ?Sized,impl<W> Write for Box<W, Global>where
    W: Write + ?Sized,impl<F, A> Future for Box<F, A>where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static,    type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A>where
    I: Iterator + ?Sized,
    A: Allocator,    type Item = <I as Iterator>::Item;
fn clone(&self) -> Box<dyn BinMiniOp + 'clone, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global>where
    R: Read + ?Sized,impl<W> Write for Box<W, Global>where
    W: Write + ?Sized,impl<F, A> Future for Box<F, A>where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static,    type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A>where
    I: Iterator + ?Sized,
    A: Allocator,    type Item = <I as Iterator>::Item;
R: Read + ?Sized,impl<W> Write for Box<W, Global>where
W: Write + ?Sized,impl<F, A> Future for Box<F, A>where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A>where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
impl<'clone> Clone for Box<dyn BinMiniOp + Send + 'clone, Global>
impl<'clone> Clone for Box<dyn BinMiniOp + Send + 'clone, Global>
fn clone(&self) -> Box<dyn BinMiniOp + Send + 'clone, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global>where
    R: Read + ?Sized,impl<W> Write for Box<W, Global>where
    W: Write + ?Sized,impl<F, A> Future for Box<F, A>where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static,    type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A>where
    I: Iterator + ?Sized,
    A: Allocator,    type Item = <I as Iterator>::Item;
fn clone(&self) -> Box<dyn BinMiniOp + Send + 'clone, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global>where
    R: Read + ?Sized,impl<W> Write for Box<W, Global>where
    W: Write + ?Sized,impl<F, A> Future for Box<F, A>where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static,    type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A>where
    I: Iterator + ?Sized,
    A: Allocator,    type Item = <I as Iterator>::Item;
R: Read + ?Sized,impl<W> Write for Box<W, Global>where
W: Write + ?Sized,impl<F, A> Future for Box<F, A>where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A>where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
impl<'clone> Clone for Box<dyn BinMiniOp + Sync + 'clone, Global>
impl<'clone> Clone for Box<dyn BinMiniOp + Sync + 'clone, Global>
fn clone(&self) -> Box<dyn BinMiniOp + Sync + 'clone, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global>where
    R: Read + ?Sized,impl<W> Write for Box<W, Global>where
    W: Write + ?Sized,impl<F, A> Future for Box<F, A>where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static,    type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A>where
    I: Iterator + ?Sized,
    A: Allocator,    type Item = <I as Iterator>::Item;
fn clone(&self) -> Box<dyn BinMiniOp + Sync + 'clone, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global>where
    R: Read + ?Sized,impl<W> Write for Box<W, Global>where
    W: Write + ?Sized,impl<F, A> Future for Box<F, A>where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static,    type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A>where
    I: Iterator + ?Sized,
    A: Allocator,    type Item = <I as Iterator>::Item;
R: Read + ?Sized,impl<W> Write for Box<W, Global>where
W: Write + ?Sized,impl<F, A> Future for Box<F, A>where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A>where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
impl<'clone> Clone for Box<dyn BinMiniOp + Sync + Send + 'clone, Global>
impl<'clone> Clone for Box<dyn BinMiniOp + Sync + Send + 'clone, Global>
fn clone(&self) -> Box<dyn BinMiniOp + Sync + Send + 'clone, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global>where
    R: Read + ?Sized,impl<W> Write for Box<W, Global>where
    W: Write + ?Sized,impl<F, A> Future for Box<F, A>where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static,    type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A>where
    I: Iterator + ?Sized,
    A: Allocator,    type Item = <I as Iterator>::Item;
fn clone(&self) -> Box<dyn BinMiniOp + Sync + Send + 'clone, Global>ⓘNotable traits for Box<R, Global>impl<R> Read for Box<R, Global>where
    R: Read + ?Sized,impl<W> Write for Box<W, Global>where
    W: Write + ?Sized,impl<F, A> Future for Box<F, A>where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static,    type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A>where
    I: Iterator + ?Sized,
    A: Allocator,    type Item = <I as Iterator>::Item;
R: Read + ?Sized,impl<W> Write for Box<W, Global>where
W: Write + ?Sized,impl<F, A> Future for Box<F, A>where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A>where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more