tenferro_ops/
semiring_ops.rs1use computegraph::GraphOp;
2use tenferro_tensor::DotGeneralConfig;
3
4use crate::dim_expr::DimExpr;
5
6pub trait SemiringOps: GraphOp {
7 fn add_op() -> Self;
8 fn mul_op() -> Self;
9 fn dot_general(config: DotGeneralConfig) -> Self;
10 fn reduce_sum(axes: Vec<usize>, input_shape: Vec<DimExpr>) -> Self;
11 fn transpose_op(perm: Vec<usize>) -> Self;
12 fn reshape(from_shape: Vec<DimExpr>, to_shape: Vec<DimExpr>) -> Self;
13 fn broadcast_in_dim(shape: Vec<DimExpr>, dims: Vec<usize>) -> Self;
14 fn extract_diag(axis_a: usize, axis_b: usize) -> Self;
15 fn embed_diag(axis_a: usize, axis_b: usize) -> Self;
16}