def product_parallel_output
bendtorch-core@0.1.0.0 · src/tensor/matmul.bend:808
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
import bendtorch-core@0.1.0.0/src/storage/main.bend as Storage
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
808def product_parallel_output(+lo: Order, +ro: Order, +output: Shape.Shape, +inner: Nat, +rows: Nat, +columns: Nat,
809 +depth: Nat, +length: Nat,
810 -valid: {Storage.bounds(depth, length) == True{} : Bool},
811 -exact: {length == Shape.logical_numel(Shape.dimensions(output)) : Nat},
812 left: Core.Dynamic & Array<F32>, right: Core.Dynamic & Array<F32>) ->
813 Result<&2, &1, Error, Core.Dynamic & Core.Dynamic & Core.Dynamic>:
814 (kept_left, la) = left
815 (kept_right, ra) = right
816 Done{(kept_left, kept_right, Core.pack(output, Core.TTensor{Storage.Owned{depth, length,
817 product_build(depth, product_splits(depth, inner), lo, ro, inner, rows, columns, length, 0n, la, ra),
818 product_build_balanced(depth, product_splits(depth, inner), lo, ro, inner, rows, columns, length, 0n, la, ra),
819 valid}, exact}))}