type Prefix

bendtorch-core@0.1.0.0 · src/tensor/transforms.bend:319

import bendtorch-core@0.1.0.0/src/tensor/transforms.bend as Transforms
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

319type Prefix<-input: Shape.Shape, -axes: List<&2, U32>, -plan: Layout.Plan<input, axes>,
320  -original: Core.Tensor<input>, -source: Core.Tensor<input>, -target: Core.Tensor<Layout.output(input, axes, plan)>, -cursor: Nat> is Data:
321  Prefix{-source_kept: @+other: U32 ->
322      {Core.checked_observe(input, source, other) == Core.checked_observe(input, original, other) : Maybe<&2, F32>},
323    -words: @+other: Nat -> @-earlier: {Nat.is_lt(other, cursor) == True{} : Bool} ->
324      {U32.to_nat(U32.from_nat(other)) == other : Nat},
325    -checked: @+other: Nat -> @-earlier: {Nat.is_lt(other, cursor) == True{} : Bool} ->
326      Core.ObservationChecked(Core.Packed{Layout.output(input, axes, plan), target}, U32.from_nat(other)),
327    -written: @+other: Nat -> @-earlier: {Nat.is_lt(other, cursor) == True{} : Bool} ->
328      {Core.checked_observe(Layout.output(input, axes, plan), target, U32.from_nat(other)) ==
329        expected_output(input, axes, plan, original, U32.from_nat(other)) : Maybe<&2, F32>}}

Uses (17)

Used by (20)