For internal spidr use only.
data Parameter : Type
MkParameter : Shape -> (0 dtype : Type) -> Primitive dtype => Parameter
Show Parameter
data Env : Type
empty : Env
emptyFrom : Env -> Env
updateCounterFrom : Env -> State Env ()
toList : Env -> List (Nat, Expr)
counter : Env -> Nat
data Fn : Nat -> Type
MkFn : Vect arity (Nat, Parameter) -> Expr -> Env -> Fn arity
@arity The function arity.
@params The function parameter shapes and dtypes.
@result The function result.
@env Bindings within the function. Includes only nodes in this scope, not outer or inner scope.
Show (Fn arity)
data BinaryOp : Type
Eq : BinaryOp
Ne : BinaryOp
Lt : BinaryOp
Gt : BinaryOp
Le : BinaryOp
Ge : BinaryOp
And : BinaryOp
Or : BinaryOp
Add : BinaryOp
Sub : BinaryOp
Mul : BinaryOp
Div : BinaryOp
Rem : BinaryOp
Pow : BinaryOp
Min : BinaryOp
Max : BinaryOp
Show BinaryOp
data UnaryOp : Type
Not : UnaryOp
Neg : UnaryOp
Reciprocal : UnaryOp
Ceil : UnaryOp
Floor : UnaryOp
Abs : UnaryOp
Log : UnaryOp
Exp : UnaryOp
Logistic : UnaryOp
Erf : UnaryOp
Square : UnaryOp
Sqrt : UnaryOp
Sin : UnaryOp
Cos : UnaryOp
Tan : UnaryOp
Asin : UnaryOp
Acos : UnaryOp
Atan : UnaryOp
Sinh : UnaryOp
Cosh : UnaryOp
Tanh : UnaryOp
Asinh : UnaryOp
Acosh : UnaryOp
Atanh : UnaryOp
Show UnaryOp
data Expr : Type
FromLiteral : PrimitiveRW dtype ty => Literal shape ty -> Expr
Var : Nat -> Expr
Tuple : List Expr -> Expr
GetTupleElement : Nat -> Expr -> Expr
MinValue : Primitive dtype => Expr
MaxValue : Primitive dtype => Expr
MinFiniteValue : Primitive dtype => Expr
MaxFiniteValue : Primitive dtype => Expr
Iota : Primitive dtype => Shape -> Nat -> Expr
ConvertElementType : Primitive dtype => Expr -> Expr
Reshape : Shape -> Shape -> Expr -> Expr
Slice : List Nat -> List Nat -> List Nat -> Expr -> Expr
DynamicSlice : List Expr -> List Nat -> Expr -> Expr
Concat : Nat -> Expr -> Expr -> Expr
Diag : Expr -> Expr
Triangle : Bool -> Expr -> Expr
Transpose : List Nat -> Expr -> Expr
Identity : Primitive dtype => Nat -> Expr
Broadcast : Primitive dtype => Shape -> Shape -> Expr -> Expr
Map : Fn arity -> Vect arity Expr -> Shape -> Expr
Reduce : Fn 2 -> Expr -> List Nat -> Expr -> Expr
Sort : Fn 2 -> Nat -> Bool -> List Expr -> Expr
Reverse : List Nat -> Expr -> Expr
BinaryElementwise : BinaryOp -> Expr -> Expr -> Expr
UnaryElementwise : UnaryOp -> Expr -> Expr
Argmax : Primitive out => Nat -> Expr -> Expr
Select : Expr -> Expr -> Expr -> Expr
Cond : Expr -> Fn 1 -> Expr -> Fn 1 -> Expr -> Expr
Dot : Expr -> Expr -> Expr
DotGeneral : List Nat -> List Nat -> List Nat -> List Nat -> Expr -> Expr -> Expr
Cholesky : Expr -> Expr
TriangularSolve : Expr -> Expr -> Bool -> Expr
UniformFloatingPoint : Expr -> Expr -> Expr -> Expr -> Shape -> Expr
NormalFloatingPoint : Expr -> Expr -> Shape -> Expr
tag : Monad m => Expr -> StateT Env m Expr
reserve : State Env Nat