tensorlogic-ir 0.1.0

Intermediate representation (IR) and AST types for TensorLogic
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Operation types for tensor computations.

use serde::{Deserialize, Serialize};

/// Operation types supported in the tensor graph
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum OpType {
    /// Einstein summation (tensor contraction)
    Einsum { spec: String },
    /// Element-wise unary operation
    ElemUnary { op: String },
    /// Element-wise binary operation
    ElemBinary { op: String },
    /// Reduction operation
    Reduce { op: String, axes: Vec<usize> },
}