Matmul.plan_right: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/matmul.bend as Matmul Lines 53-63 of bendtorch-core@0.1.0.0/src/tensor/matmul.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul.bend&start_line=53&end_line=63 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape def plan_right(-left: Shape.Shape, +right: Shape.Shape, +rows: U32, +inner: U32, -le: {Shape.dimensions(left) == [rows, inner] : List<&2, U32>}, dimensions: List<&2, U32>, -same: {dimensions == Shape.dimensions(right) : List<&2, U32>}) -> Result<&2, &2, Error, Plan>: match dimensions: case +right_inner <> +columns <> Nil{}: plan_compatible(left, right, rows, inner, right_inner, columns, le, Equal.sym(List<&2, U32>, [right_inner, columns], Shape.dimensions(right), same), Shape.bool_case(Nat.is_eq(U32.to_nat(inner), U32.to_nat(right_inner)))) case rest: Fail{RankMismatch{}} Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=Shape https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=bool_case https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=dimensions https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul.bend&name=Error https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul.bend&name=Plan https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul.bend&name=plan_compatible