def update_frame

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

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

438def update_frame(-shape: Shape.Shape, -original: Core.Tensor<shape>, -output: Core.Tensor<shape>, -index: U32, -value: F32, -unit: Unit,
439  meaning: Core.UpdateMeaning(shape, original, index, value, (output, Done{unit}))) ->
440  @+other: U32 -> @checked: Core.ObservationChecked(Core.Packed{shape, original}, other) ->
441    @different: {Nat.is_eq(U32.to_nat(index), U32.to_nat(other)) == False{} : Bool} ->
442      Core.ObservationChecked(Core.Packed{shape, output}, other) &
443        {Core.observe(shape, output, other) == Core.observe(shape, original, other) : Maybe<&2, F32>}:
444  (checked, rest) = meaning
445  (observed, frame) = rest
446  frame

Uses (16)

Used by (2)