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§
Sourcefn input_type(&self) -> TypeId
fn input_type(&self) -> TypeId
Returns the type ID of the input to this operation
Sourcefn output_type(&self) -> TypeId
fn output_type(&self) -> TypeId
Returns the type ID of the output from this operation
Sourcefn can_fuse_with(&self, other: &dyn FusedOp) -> bool
fn can_fuse_with(&self, other: &dyn FusedOp) -> bool
Checks if this operation can be fused with another operation
Sourcefn fuse_with(&self, other: &dyn FusedOp) -> Arc<dyn FusedOp>
fn fuse_with(&self, other: &dyn FusedOp) -> Arc<dyn FusedOp>
Creates a new operation that is the fusion of this operation with another