Trait tract_nnef::internal::ElementWiseMiniOp [−][src]
pub trait ElementWiseMiniOp: 'static + Debug + DynClone + Send + Sync + Downcast + DynHash { pub fn name(&self) -> String; pub fn prefix(&self) -> &'static str { ... } pub fn validation(&self) -> Validation { ... } pub fn output_type(&self, input_type: DatumType) -> Option<DatumType> { ... } pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error> { ... } pub fn eval_out_of_place(&self, t: &Tensor) -> Result<Tensor, Error> { ... } pub fn cost_per_element(
&self,
dt: DatumType
) -> SmallVec<[(Cost, usize); 4]> { ... } 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 quantize(
&self,
dt: DatumType,
scale: f32,
zero_point: i32
) -> Result<Option<Box<dyn ElementWiseMiniOp + 'static, Global>>, Error> { ... } pub fn info(&self) -> Result<Vec<String, Global>, Error> { ... } }
Required methods
Loading content...Provided methods
pub fn prefix(&self) -> &'static str
[src]
pub fn validation(&self) -> Validation
[src]
pub fn output_type(&self, input_type: DatumType) -> Option<DatumType>
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
pub fn eval_out_of_place(&self, t: &Tensor) -> Result<Tensor, Error>
[src]
pub fn cost_per_element(&self, dt: DatumType) -> SmallVec<[(Cost, usize); 4]>
[src]
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>
[src]
&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 quantize(
&self,
dt: DatumType,
scale: f32,
zero_point: i32
) -> Result<Option<Box<dyn ElementWiseMiniOp + 'static, Global>>, Error>
[src]
&self,
dt: DatumType,
scale: f32,
zero_point: i32
) -> Result<Option<Box<dyn ElementWiseMiniOp + 'static, Global>>, Error>
pub fn info(&self) -> Result<Vec<String, Global>, Error>
[src]
Implementations
impl dyn ElementWiseMiniOp + 'static
[src]
pub fn is<__T>(&self) -> bool where
__T: ElementWiseMiniOp,
[src]
__T: ElementWiseMiniOp,
Returns true if the trait object wraps an object of type __T
.
pub fn downcast<__T>(
self: Box<dyn ElementWiseMiniOp + 'static, Global>
) -> Result<Box<__T, Global>, Box<dyn ElementWiseMiniOp + 'static, Global>> where
__T: ElementWiseMiniOp,
[src]
self: Box<dyn ElementWiseMiniOp + 'static, Global>
) -> Result<Box<__T, Global>, Box<dyn ElementWiseMiniOp + 'static, Global>> where
__T: ElementWiseMiniOp,
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 ElementWiseMiniOp + 'static>
) -> Result<Rc<__T>, Rc<dyn ElementWiseMiniOp + 'static>> where
__T: ElementWiseMiniOp,
[src]
self: Rc<dyn ElementWiseMiniOp + 'static>
) -> Result<Rc<__T>, Rc<dyn ElementWiseMiniOp + 'static>> where
__T: ElementWiseMiniOp,
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: ElementWiseMiniOp,
[src]
__T: ElementWiseMiniOp,
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: ElementWiseMiniOp,
[src]
__T: ElementWiseMiniOp,
Returns a mutable reference to the object within the trait object if it is of type
__T
, or None
if it isn’t.
Implementations on Foreign Types
impl ElementWiseMiniOp for Exp
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
pub fn validation(&self) -> Validation
[src]
impl ElementWiseMiniOp for Acosh
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Ceil
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Tan
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Sinh
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Asinh
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Sqrt
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
pub fn validation(&self) -> Validation
[src]
impl ElementWiseMiniOp for Ln
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
pub fn validation(&self) -> Validation
[src]
impl ElementWiseMiniOp for Cast
[src]
pub fn name(&self) -> String
[src]
pub fn output_type(&self, _input_type: DatumType) -> Option<DatumType>
[src]
pub fn eval_out_of_place(&self, t: &Tensor) -> Result<Tensor, Error>
[src]
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>
[src]
&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 ElementWiseMiniOp for Neg
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for RoundHalfToEven
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Cos
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Round
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Sign
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Asin
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Rsqrt
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
pub fn validation(&self) -> Validation
[src]
impl ElementWiseMiniOp for QuantizeLinearU8
[src]
pub fn name(&self) -> String
[src]
pub fn output_type(&self, input_type: DatumType) -> Option<DatumType>
[src]
pub fn eval_out_of_place(&self, t: &Tensor) -> Result<Tensor, Error>
[src]
pub fn info(&self) -> Result<Vec<String, Global>, Error>
[src]
impl ElementWiseMiniOp for Tanh
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
pub fn cost_per_element(&self, dt: DatumType) -> SmallVec<[(Cost, usize); 4]>
[src]
impl ElementWiseMiniOp for Sigmoid
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
pub fn cost_per_element(&self, dt: DatumType) -> SmallVec<[(Cost, usize); 4]>
[src]
impl ElementWiseMiniOp for Not
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Atanh
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Square
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
pub fn validation(&self) -> Validation
[src]
impl ElementWiseMiniOp for Floor
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Acos
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for LookupTable
[src]
pub fn name(&self) -> String
[src]
pub fn output_type(&self, input_type: DatumType) -> Option<DatumType>
[src]
pub fn eval_out_of_place(&self, t: &Tensor) -> Result<Tensor, Error>
[src]
impl ElementWiseMiniOp for Atan
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for QuantizeLinearI8
[src]
pub fn name(&self) -> String
[src]
pub fn output_type(&self, input_type: DatumType) -> Option<DatumType>
[src]
pub fn eval_out_of_place(&self, t: &Tensor) -> Result<Tensor, Error>
[src]
pub fn info(&self) -> Result<Vec<String, Global>, Error>
[src]
impl ElementWiseMiniOp for Cosh
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Sin
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Abs
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
impl ElementWiseMiniOp for Recip
[src]
pub fn name(&self) -> String
[src]
pub fn eval_in_place(&self, t: &mut Tensor) -> Result<(), Error>
[src]
pub fn cost_per_element(&self, dt: DatumType) -> SmallVec<[(Cost, usize); 4]>
[src]
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>
[src]
&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>