def product_right
bendtorch-core@0.1.0.0 · src/tensor/matmul.bend:785
import bendtorch-core@0.1.0.0/src/tensor/matmul.bend as Matmul
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
785def product_right(-lo: Order, -ro: Order, -left: Shape.Shape, -right: Shape.Shape, +rows: U32, +inner: U32,
786 -le: {Shape.dimensions(left) == arranged(lo, rows, inner) : List<&2, U32>},
787 result: Result<&2, &2, Error, Split<ro, Shape.dimensions(right)>>) -> Result<&2, &2, Error, Product<lo, ro, left, right>>:
788 match result:
789 case Fail{error}:
790 Fail{error}
791 case Done{Split{+columns, +right_inner, same}}:
792 product_compatible(lo, ro, left, right, rows, inner, right_inner, columns, le, same,
793 Shape.bool_case(Nat.is_eq(U32.to_nat(inner), U32.to_nat(right_inner))))