def planned
bendtorch-core@0.1.0.0 · src/autograd/broadcast.bend:43
import bendtorch-core@0.1.0.0/src/autograd/broadcast.bend as Broadcast
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layout
43def planned(input: Core.Dynamic, +target: Shape.Shape, result: Result<&2, &2, Shape.Error, Shape.BroadcastPlan>) ->
44 Core.Dynamic & Result<&2, &1, Error, Core.Dynamic>:
45 match result:
46 case Fail{error}:
47 (input, Fail{TensorError{Core.ShapeError{error}}})
48 case Done{+plan}:
49 fitted(input, target, plan, Layout.words_same(Shape.dimensions(Shape.output_shape(plan)), Shape.dimensions(target)))