type ReshapeWrite
bendtorch-core@0.1.0.0 · src/tensor/transform_records.bend:24
import bendtorch-core@0.1.0.0/src/tensor/transform_records.bend as TransformRecords
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/transform_observation.bend as Observation
24type ReshapeWrite<-input: Shape.Shape, -fill: F32, -target: Shape.Shape, -index: U32, -value: F32> is Type:
25 ReshapeWrite{
26 written: {Observation.reshape_written(input, index, value, Shape.dimensions(target), index, Core.new(input, fill)) == Some{value} : Maybe<&2, F32>},
27 frame: @+other: U32 -> @inside: {Nat.is_lt(U32.to_nat(other), Shape.logical_numel(Shape.dimensions(target))) == True{} : Bool} ->
28 @different: {Nat.is_eq(U32.to_nat(index), U32.to_nat(other)) == False{} : Bool} ->
29 {Observation.reshape_written(input, index, value, Shape.dimensions(target), other, Core.new(input, fill)) == Some{fill} : Maybe<&2, F32>}}