def step_frame

bendtorch-core@0.1.0.0 · src/tensor/core_PROOF.bend:879

import bendtorch-core@0.1.0.0/src/tensor/core_PROOF.bend as CorePROOF
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/elementwise.bend as Elementwise

879def step_frame(-operation: Elementwise.Operation, -plan: Shape.BroadcastPlan, -index: U32,
880  -left: Core.Dynamic, -right: Core.Dynamic, -output: Core.Tensor<Shape.output_shape(plan)>,
881  -after_left: Core.Dynamic, -after_right: Core.Dynamic, -after_output: Core.Tensor<Shape.output_shape(plan)>,
882  meaning: Elementwise.StepMeaning(operation, plan, index, Elementwise.State{left, right, output}, Elementwise.Continue{Elementwise.State{after_left, after_right, after_output}})) ->
883  @+other: U32 -> @checked: Core.ObservationChecked(Core.Packed{Shape.output_shape(plan), output}, other) ->
884    @different: {Nat.is_eq(U32.to_nat(index), U32.to_nat(other)) == False{} : Bool} ->
885      Core.ObservationChecked(Core.Packed{Shape.output_shape(plan), after_output}, other) &
886        {Core.observe(Shape.output_shape(plan), after_output, other) == Core.observe(Shape.output_shape(plan), output, other) : Maybe<&2, F32>}:
887  (same, rest) = meaning
888  (right_same, result) = rest
889  (checked, values) = result
890  (observed, frame) = values
891  frame

Uses (18)

Used by (1)