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
fn prefix(&self) -> &'static str
[src]
fn validation(&self) -> Validation
[src]
fn output_type(&self, input_type: DatumType) -> Option<DatumType>
[src]
fn eval_in_place(&self, t: &mut Tensor) -> TractResult<()>
[src]
fn eval_out_of_place(&self, t: &Tensor) -> TractResult<Tensor>
[src]
fn cost_per_element(&self, dt: DatumType) -> TVec<(Cost, usize)>
[src]
fn declutter(
&self,
model: &TypedModel,
node: &TypedNode
) -> TractResult<Option<TypedModelPatch>>
[src]
&self,
model: &TypedModel,
node: &TypedNode
) -> TractResult<Option<TypedModelPatch>>
fn quantize(
&self,
dt: DatumType,
scale: f32,
zero_point: i32
) -> TractResult<Option<Box<dyn ElementWiseMiniOp>>>
[src]
&self,
dt: DatumType,
scale: f32,
zero_point: i32
) -> TractResult<Option<Box<dyn ElementWiseMiniOp>>>
fn info(&self) -> TractResult<Vec<String>>
[src]
Implementations
impl dyn ElementWiseMiniOp
[src]
impl dyn ElementWiseMiniOp
[src]pub fn is<__T: ElementWiseMiniOp>(&self) -> bool
[src]
pub fn is<__T: ElementWiseMiniOp>(&self) -> bool
[src]Returns true if the trait object wraps an object of type __T
.
pub fn downcast<__T: ElementWiseMiniOp>(
self: Box<Self>
) -> Result<Box<__T>, Box<Self>>
[src]
pub fn downcast<__T: ElementWiseMiniOp>(
self: Box<Self>
) -> Result<Box<__T>, Box<Self>>
[src]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: ElementWiseMiniOp>(
self: Rc<Self>
) -> Result<Rc<__T>, Rc<Self>>
[src]
pub fn downcast_rc<__T: ElementWiseMiniOp>(
self: Rc<Self>
) -> Result<Rc<__T>, Rc<Self>>
[src]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: ElementWiseMiniOp>(&self) -> Option<&__T>
[src]
pub fn downcast_ref<__T: ElementWiseMiniOp>(&self) -> Option<&__T>
[src]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: ElementWiseMiniOp>(&mut self) -> Option<&mut __T>
[src]
pub fn downcast_mut<__T: ElementWiseMiniOp>(&mut self) -> Option<&mut __T>
[src]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 ElementWiseMiniOp for Cast
[src]
impl ElementWiseMiniOp for Cast
[src]fn name(&self) -> String
[src]
fn output_type(&self, _input_type: DatumType) -> Option<DatumType>
[src]
fn eval_out_of_place(&self, t: &Tensor) -> TractResult<Tensor>
[src]
fn declutter(
&self,
model: &TypedModel,
node: &TypedNode
) -> TractResult<Option<TypedModelPatch>>
[src]
&self,
model: &TypedModel,
node: &TypedNode
) -> TractResult<Option<TypedModelPatch>>
impl ElementWiseMiniOp for Not
[src]
impl ElementWiseMiniOp for Not
[src]impl ElementWiseMiniOp for Abs
[src]
impl ElementWiseMiniOp for Abs
[src]impl ElementWiseMiniOp for Acos
[src]
impl ElementWiseMiniOp for Acos
[src]impl ElementWiseMiniOp for Acosh
[src]
impl ElementWiseMiniOp for Acosh
[src]impl ElementWiseMiniOp for Asin
[src]
impl ElementWiseMiniOp for Asin
[src]impl ElementWiseMiniOp for Asinh
[src]
impl ElementWiseMiniOp for Asinh
[src]impl ElementWiseMiniOp for Atan
[src]
impl ElementWiseMiniOp for Atan
[src]impl ElementWiseMiniOp for Atanh
[src]
impl ElementWiseMiniOp for Atanh
[src]impl ElementWiseMiniOp for Ceil
[src]
impl ElementWiseMiniOp for Ceil
[src]impl ElementWiseMiniOp for Cos
[src]
impl ElementWiseMiniOp for Cos
[src]impl ElementWiseMiniOp for Cosh
[src]
impl ElementWiseMiniOp for Cosh
[src]impl ElementWiseMiniOp for Exp
[src]
impl ElementWiseMiniOp for Exp
[src]fn name(&self) -> String
[src]
fn eval_in_place(&self, t: &mut Tensor) -> TractResult<()>
[src]
fn validation(&self) -> Validation
[src]
impl ElementWiseMiniOp for Floor
[src]
impl ElementWiseMiniOp for Floor
[src]impl ElementWiseMiniOp for Ln
[src]
impl ElementWiseMiniOp for Ln
[src]fn name(&self) -> String
[src]
fn eval_in_place(&self, t: &mut Tensor) -> TractResult<()>
[src]
fn validation(&self) -> Validation
[src]
impl ElementWiseMiniOp for Neg
[src]
impl ElementWiseMiniOp for Neg
[src]impl ElementWiseMiniOp for Recip
[src]
impl ElementWiseMiniOp for Recip
[src]fn name(&self) -> String
[src]
fn eval_in_place(&self, t: &mut Tensor) -> TractResult<()>
[src]
fn cost_per_element(&self, dt: DatumType) -> TVec<(Cost, usize)>
[src]
fn declutter(
&self,
model: &TypedModel,
node: &TypedNode
) -> TractResult<Option<TypedModelPatch>>
[src]
&self,
model: &TypedModel,
node: &TypedNode
) -> TractResult<Option<TypedModelPatch>>
fn validation(&self) -> Validation
[src]
impl ElementWiseMiniOp for Round
[src]
impl ElementWiseMiniOp for Round
[src]impl ElementWiseMiniOp for RoundHalfToEven
[src]
impl ElementWiseMiniOp for RoundHalfToEven
[src]impl ElementWiseMiniOp for Rsqrt
[src]
impl ElementWiseMiniOp for Rsqrt
[src]fn name(&self) -> String
[src]
fn eval_in_place(&self, t: &mut Tensor) -> TractResult<()>
[src]
fn validation(&self) -> Validation
[src]
impl ElementWiseMiniOp for Sign
[src]
impl ElementWiseMiniOp for Sign
[src]impl ElementWiseMiniOp for Sin
[src]
impl ElementWiseMiniOp for Sin
[src]impl ElementWiseMiniOp for Sinh
[src]
impl ElementWiseMiniOp for Sinh
[src]impl ElementWiseMiniOp for Sqrt
[src]
impl ElementWiseMiniOp for Sqrt
[src]fn name(&self) -> String
[src]
fn eval_in_place(&self, t: &mut Tensor) -> TractResult<()>
[src]
fn validation(&self) -> Validation
[src]
impl ElementWiseMiniOp for Square
[src]
impl ElementWiseMiniOp for Square
[src]fn name(&self) -> String
[src]
fn eval_in_place(&self, t: &mut Tensor) -> TractResult<()>
[src]
fn validation(&self) -> Validation
[src]
impl ElementWiseMiniOp for Tan
[src]
impl ElementWiseMiniOp for Tan
[src]impl ElementWiseMiniOp for Tanh
[src]
impl ElementWiseMiniOp for Tanh
[src]impl ElementWiseMiniOp for Sigmoid
[src]
impl ElementWiseMiniOp for Sigmoid
[src]impl ElementWiseMiniOp for LookupTable
[src]
impl ElementWiseMiniOp for LookupTable
[src]fn name(&self) -> String
[src]
fn output_type(&self, input_type: DatumType) -> Option<DatumType>
[src]
fn eval_out_of_place(&self, t: &Tensor) -> TractResult<Tensor>
[src]
impl ElementWiseMiniOp for QuantizeLinearI8
[src]
impl ElementWiseMiniOp for QuantizeLinearI8
[src]fn name(&self) -> String
[src]
fn output_type(&self, input_type: DatumType) -> Option<DatumType>
[src]
fn eval_out_of_place(&self, t: &Tensor) -> TractResult<Tensor>
[src]
fn info(&self) -> TractResult<Vec<String>>
[src]
impl ElementWiseMiniOp for QuantizeLinearU8
[src]
impl ElementWiseMiniOp for QuantizeLinearU8
[src]