type CloneWrite

bendtorch-core@0.1.0.0 · src/tensor/clone_metadata_records.bend:19

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

19type CloneWrite<-shape: Shape.Shape, -fill: F32, -index: U32, -value: F32> is Type:
20  CloneWrite{
21    written: {Observation.clone_written_first(shape, index, value, index, Core.new(shape, fill)) == Some{value} : Maybe<&2, F32>},
22    frame: @+other: U32 -> @inside: {Nat.is_lt(U32.to_nat(other), Shape.logical_numel(Shape.dimensions(shape))) == True{} : Bool} ->
23      @different: {Nat.is_eq(U32.to_nat(index), U32.to_nat(other)) == False{} : Bool} ->
24      {Observation.clone_written_first(shape, index, value, other, Core.new(shape, fill)) == Some{fill} : Maybe<&2, F32>},
25    second: @+other: U32 -> @inside: {Nat.is_lt(U32.to_nat(other), Shape.logical_numel(Shape.dimensions(shape))) == True{} : Bool} ->
26      {Observation.clone_written_second(shape, index, value, other, Core.new(shape, fill)) == Some{fill} : Maybe<&2, F32>}}

Uses (13)

Used by (2)