src/tensor/read_write_records.bend checks
raw source on the hub · import bendtorch-core@0.1.0.0/src/tensor/read_write_records.bend as Read_write_records
4 imports
import Base import ../shape/core.bend as Shape import ./core.bend as Core import ./observation.bend as Observation
Types
type ReadContract source · line 6 · raw
@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-fill:F32 -> @-index:U32 -> @-code:U32 -> Type
ReadContract@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-fill:F32 -> @-index:U32 -> @-code:U32 -> @outcome:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.read_code(shape, index, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{code} : Maybe<&2, U32>} -> @retained_dimensions:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.after_dimensions(shape, index, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape)} : Maybe<&2, List<&2, U32>>} -> @retained_count:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.after_length(shape, index, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.logical_numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape))} : Maybe<&2, Nat>} -> @retained_word_count:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.after_count(shape, index, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.count(shape)} : Maybe<&2, U32>} -> @retained_value:(@+other:U32 -> @inside:{Nat.is_lt(U32.to_nat(other), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.logical_numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape))) == True{} : Bool} -> {0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.after_value(shape, index, other, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{fill} : Maybe<&2, F32>}) -> ReadContract<shape, fill, index, code>
type ReadInside source · line 15 · raw
@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-fill:F32 -> @-index:U32 -> Type
ReadInside@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-fill:F32 -> @-index:U32 -> @read:ReadContract<shape, fill, index, 0> -> @value:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.point(shape, index, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{fill} : Maybe<&2, F32>} -> ReadInside<shape, fill, index>
type WriteContract source · line 20 · raw
@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-fill:F32 -> @-index:U32 -> @-value:F32 -> @-code:U32 -> Type
WriteContract@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-fill:F32 -> @-index:U32 -> @-value:F32 -> @-code:U32 -> @outcome:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.write_code(shape, index, value, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{code} : Maybe<&2, U32>} -> @retained_dimensions:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.written_dimensions(shape, index, value, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape)} : Maybe<&2, List<&2, U32>>} -> @retained_count:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.written_length(shape, index, value, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.logical_numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape))} : Maybe<&2, Nat>} -> @retained_word_count:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.written_count(shape, index, value, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.count(shape)} : Maybe<&2, U32>} -> WriteContract<shape, fill, index, value, code>
type WriteInside source · line 27 · raw
@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-fill:F32 -> @-index:U32 -> @-value:F32 -> Type
WriteInside@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-fill:F32 -> @-index:U32 -> @-value:F32 -> @write:WriteContract<shape, fill, index, value, 0> -> @written:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.written_value(shape, index, value, index, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{value} : Maybe<&2, F32>} -> @frame:(@+other:U32 -> @inside:{Nat.is_lt(U32.to_nat(other), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.logical_numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape))) == True{} : Bool} -> @different:{Nat.is_eq(U32.to_nat(index), U32.to_nat(other)) == False{} : Bool} -> {0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.written_value(shape, index, value, other, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{fill} : Maybe<&2, F32>}) -> WriteInside<shape, fill, index, value>
type WriteOutside source · line 35 · raw
@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-fill:F32 -> @-index:U32 -> @-value:F32 -> Type
WriteOutside@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-fill:F32 -> @-index:U32 -> @-value:F32 -> @write:WriteContract<shape, fill, index, value, 8> -> @retained_value:(@+other:U32 -> @inside:{Nat.is_lt(U32.to_nat(other), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.logical_numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape))) == True{} : Bool} -> {0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.written_value(shape, index, value, other, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{fill} : Maybe<&2, F32>}) -> WriteOutside<shape, fill, index, value>
type CoordinateInside source · line 41 · raw
@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-fill:F32 -> @-coordinates:List<&2, U32> -> @-index:U32 -> @-value:F32 -> Type
CoordinateInside@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-fill:F32 -> @-coordinates:List<&2, U32> -> @-index:U32 -> @-value:F32 -> @read:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.coordinate_value(shape, index, value, coordinates, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{value} : Maybe<&2, F32>} -> @written:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.coordinate_written(shape, coordinates, value, index, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{value} : Maybe<&2, F32>} -> @frame:(@+other:U32 -> @inside:{Nat.is_lt(U32.to_nat(other), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.logical_numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape))) == True{} : Bool} -> @different:{Nat.is_eq(U32.to_nat(index), U32.to_nat(other)) == False{} : Bool} -> {0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.coordinate_written(shape, coordinates, value, other, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{fill} : Maybe<&2, F32>}) -> CoordinateInside<shape, fill, coordinates, index, value>