Trait tract_pulse::internal::tract_core::ops::binary::BinMiniOp [−]
pub trait BinMiniOp: 'static + Debug + DynClone + Send + Sync + Downcast + DynHash {}Show 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 cost_per_element(&self, dt: DatumType) -> SmallVec<[(Cost, usize); 4]> { ... }
Required methods
fn name(&self) -> &'static str
fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&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>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
Provided methods
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>
&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>
&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]>
Implementations
impl dyn BinMiniOp + 'static
impl dyn BinMiniOp + 'static
pub fn is<__T>(&self) -> bool where
__T: BinMiniOp,
pub fn is<__T>(&self) -> bool where
__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.
Implementors
impl BinMiniOp for And
impl BinMiniOp for And
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn unary_with_b_const(&self, b: &Arc<Tensor>) -> Option<UnaryOp>
impl BinMiniOp for Equals
impl BinMiniOp for Equals
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
_a: DatumType,
_b: DatumType
) -> Result<DatumType, Error>
&self,
_a: DatumType,
_b: DatumType
) -> Result<DatumType, Error>
pub fn unary_with_b_const(&self, b: &Arc<Tensor>) -> Option<UnaryOp>
impl BinMiniOp for Greater
impl BinMiniOp for Greater
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
_a: DatumType,
_b: DatumType
) -> Result<DatumType, Error>
&self,
_a: DatumType,
_b: DatumType
) -> Result<DatumType, Error>
impl BinMiniOp for GreaterEqual
impl BinMiniOp for GreaterEqual
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
_a: DatumType,
_b: DatumType
) -> Result<DatumType, Error>
&self,
_a: DatumType,
_b: DatumType
) -> Result<DatumType, Error>
impl BinMiniOp for Lesser
impl BinMiniOp for Lesser
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
_a: DatumType,
_b: DatumType
) -> Result<DatumType, Error>
&self,
_a: DatumType,
_b: DatumType
) -> Result<DatumType, Error>
impl BinMiniOp for LesserEqual
impl BinMiniOp for LesserEqual
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
_a: DatumType,
_b: DatumType
) -> Result<DatumType, Error>
&self,
_a: DatumType,
_b: DatumType
) -> Result<DatumType, Error>
impl BinMiniOp for NotEquals
impl BinMiniOp for NotEquals
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
_a: DatumType,
_b: DatumType
) -> Result<DatumType, Error>
&self,
_a: DatumType,
_b: DatumType
) -> Result<DatumType, Error>
pub fn unary_with_b_const(&self, b: &Arc<Tensor>) -> Option<UnaryOp>
impl BinMiniOp for Or
impl BinMiniOp for Or
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn unary_with_b_const(&self, b: &Arc<Tensor>) -> Option<UnaryOp>
impl BinMiniOp for Xor
impl BinMiniOp for Xor
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn unary_with_b_const(&self, b: &Arc<Tensor>) -> Option<UnaryOp>
impl BinMiniOp for Add
impl BinMiniOp for Add
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn unary_with_b_const(&self, b: &Arc<Tensor>) -> Option<UnaryOp>
pub 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>
&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>
pub fn validation(&self) -> Validation
impl BinMiniOp for Div
impl BinMiniOp for Div
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn unary_with_b_const(&self, b: &Arc<Tensor>) -> Option<UnaryOp>
pub 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>
&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_per_element(&self, dt: DatumType) -> SmallVec<[(Cost, usize); 4]>
impl BinMiniOp for FlippedPow
impl BinMiniOp for FlippedPow
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
impl BinMiniOp for FlippedShiftLeft
impl BinMiniOp for FlippedShiftLeft
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
impl BinMiniOp for FlippedShiftRight
impl BinMiniOp for FlippedShiftRight
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
impl BinMiniOp for Max
impl BinMiniOp for Max
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn unary_with_b_const(&self, b: &Arc<Tensor>) -> Option<UnaryOp>
impl BinMiniOp for Min
impl BinMiniOp for Min
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn unary_with_b_const(&self, b: &Arc<Tensor>) -> Option<UnaryOp>
impl BinMiniOp for Mul
impl BinMiniOp for Mul
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn unary_with_b_const(&self, b: &Arc<Tensor>) -> Option<UnaryOp>
pub 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>
&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>
pub fn cost_per_element(&self, dt: DatumType) -> SmallVec<[(Cost, usize); 4]>
impl BinMiniOp for Pow
impl BinMiniOp for Pow
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
impl BinMiniOp for Rem
impl BinMiniOp for Rem
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn eval(&self, a: Arc<Tensor>, b: Arc<Tensor>) -> Result<Tensor, Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
impl BinMiniOp for ShiftLeft
impl BinMiniOp for ShiftLeft
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
impl BinMiniOp for ShiftRight
impl BinMiniOp for ShiftRight
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
impl BinMiniOp for Sub
impl BinMiniOp for Sub
pub fn name(&self) -> &'static str
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn unary_with_b_const(&self, b: &Arc<Tensor>) -> Option<UnaryOp>
pub 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>
&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>
impl BinMiniOp for Scale
impl BinMiniOp for Scale
pub fn name(&self) -> &'static str
pub fn result_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn operating_datum_type(
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
&self,
a: DatumType,
b: DatumType
) -> Result<DatumType, Error>
pub fn eval_uniform_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_unicast_in_place(
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
&self,
a: &Tensor,
b: &mut Tensor
) -> Result<(), Error>
pub fn eval_out_of_place(
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
&self,
c: &mut Tensor,
a: &Tensor,
b: &Tensor
) -> Result<(), Error>
pub 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>
&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>