FusedOp

Trait FusedOp 

Source
pub trait FusedOp: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn input_type(&self) -> TypeId;
    fn output_type(&self) -> TypeId;
    fn can_fuse_with(&self, other: &dyn FusedOp) -> bool;
    fn fuse_with(&self, other: &dyn FusedOp) -> Arc<dyn FusedOp>;
    fn apply(&self, input: &dyn Any) -> Result<Box<dyn Any>, CoreError>;
    fn clone_op(&self) -> Arc<dyn FusedOp>;
}
Expand description

A trait for operations that can be fused together for better performance

Required Methods§

Source

fn name(&self) -> &str

Returns the unique name of this operation

Source

fn input_type(&self) -> TypeId

Returns the type ID of the input to this operation

Source

fn output_type(&self) -> TypeId

Returns the type ID of the output from this operation

Source

fn can_fuse_with(&self, other: &dyn FusedOp) -> bool

Checks if this operation can be fused with another operation

Source

fn fuse_with(&self, other: &dyn FusedOp) -> Arc<dyn FusedOp>

Creates a new operation that is the fusion of this operation with another

Source

fn apply(&self, input: &dyn Any) -> Result<Box<dyn Any>, CoreError>

Applies this operation to an input (as Any)

Source

fn clone_op(&self) -> Arc<dyn FusedOp>

Clone this operation

Implementors§