[−][src]Trait tract_hir::internal::ElementWiseMiniOp
Required methods
Loading content...Provided methods
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) -> Result<(), TractError>
fn eval_out_of_place(&self, t: &Tensor) -> Result<Tensor, TractError>
fn cost_per_element(&self, dt: DatumType) -> SmallVec<[(Cost, usize); 4]>
fn declutter(
&self,
model: &Graph<TypedFact, Box<dyn TypedOp + 'static>>,
node: &BaseNode<TypedFact, Box<dyn TypedOp + 'static>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static>>>, TractError>
&self,
model: &Graph<TypedFact, Box<dyn TypedOp + 'static>>,
node: &BaseNode<TypedFact, Box<dyn TypedOp + 'static>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static>>>, TractError>
fn quantize(
&self,
dt: DatumType,
scale: f32,
zero_point: i32
) -> Result<Option<Box<dyn ElementWiseMiniOp + 'static>>, TractError>
&self,
dt: DatumType,
scale: f32,
zero_point: i32
) -> Result<Option<Box<dyn ElementWiseMiniOp + 'static>>, TractError>
fn info(&self) -> Result<Vec<String>, TractError>
Implementations
impl dyn ElementWiseMiniOp + 'static
pub fn is<__T>(&self) -> bool where
__T: ElementWiseMiniOp,
__T: ElementWiseMiniOp,
Returns true if the trait object wraps an object of type __T
.
pub fn downcast<__T>(
self: Box<dyn ElementWiseMiniOp + 'static>
) -> Result<Box<__T>, Box<dyn ElementWiseMiniOp + 'static>> where
__T: ElementWiseMiniOp,
self: Box<dyn ElementWiseMiniOp + 'static>
) -> Result<Box<__T>, Box<dyn ElementWiseMiniOp + 'static>> 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,
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,
__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,
__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 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) -> Result<Tensor, TractError>
[src]
fn declutter(
&self,
model: &Graph<TypedFact, Box<dyn TypedOp + 'static>>,
node: &BaseNode<TypedFact, Box<dyn TypedOp + 'static>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static>>>, TractError>
[src]
&self,
model: &Graph<TypedFact, Box<dyn TypedOp + 'static>>,
node: &BaseNode<TypedFact, Box<dyn TypedOp + 'static>>
) -> Result<Option<ModelPatch<TypedFact, Box<dyn TypedOp + 'static>>>, TractError>