type WriteInside

bendtorch-core@0.1.0.0 · src/tensor/read_write_records.bend:27

import bendtorch-core@0.1.0.0/src/tensor/read_write_records.bend as ReadWriteRecords
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/observation.bend as Observation

27type WriteInside<-shape: Shape.Shape, -fill: F32, -index: U32, -value: F32> is Type:
28  WriteInside{
29    write: WriteContract<shape, fill, index, value, 0>,
30    written: {Observation.written_value(shape, index, value, index, Core.new(shape, fill)) == Some{value} : Maybe<&2, F32>},
31    frame: @+other: U32 -> @inside: {Nat.is_lt(U32.to_nat(other), Shape.logical_numel(Shape.dimensions(shape))) == True{} : Bool} ->
32      @different: {Nat.is_eq(U32.to_nat(index), U32.to_nat(other)) == False{} : Bool} ->
33      {Observation.written_value(shape, index, value, other, Core.new(shape, fill)) == Some{fill} : Maybe<&2, F32>}}

Uses (13)

Used by (2)