def parallel_output
bendtorch-core@0.1.0.0 · src/tensor/elementwise.bend:467
import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwise
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
467def parallel_output(+operation: Operation, +plan: Shape.BroadcastPlan, +depth: Nat, +length: Nat,
468 -valid: {Storage.bounds(depth, length) == True{} : Bool},
469 -exact: {length == Shape.logical_numel(Shape.dimensions(Shape.output_shape(plan))) : Nat},
470 left: Core.Dynamic & Array<F32>, right: Core.Dynamic & Array<F32>) ->
471 (Core.Dynamic & Core.Dynamic) & Result<&2, &1, Core.Error, Core.Dynamic>:
472 (kept_left, la) = left
473 (kept_right, ra) = right
474 ((kept_left, kept_right), Done{Core.pack(Shape.output_shape(plan), Core.TTensor{Storage.Owned{depth, length,
475 build(depth, splits(depth), operation, plan, length, 0n, la, ra),
476 build_balanced(depth, splits(depth), operation, plan, length, 0n, la, ra),
477 valid}, exact})})