type WriteContract

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

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

20type WriteContract<-shape: Shape.Shape, -fill: F32, -index: U32, -value: F32, -code: U32> is Type:
21  WriteContract{
22    outcome: {Observation.write_code(shape, index, value, Core.new(shape, fill)) == Some{code} : Maybe<&2, U32>},
23    retained_dimensions: {Observation.written_dimensions(shape, index, value, Core.new(shape, fill)) == Some{Shape.dimensions(shape)} : Maybe<&2, List<&2, U32>>},
24    retained_count: {Observation.written_length(shape, index, value, Core.new(shape, fill)) == Some{Shape.logical_numel(Shape.dimensions(shape))} : Maybe<&2, Nat>},
25    retained_word_count: {Observation.written_count(shape, index, value, Core.new(shape, fill)) == Some{Shape.count(shape)} : Maybe<&2, U32>}}

Uses (14)

Used by (3)