def dynamic_read_keeps_source
bendtorch-core@0.1.0.0 · src/tensor/core.bend:505
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
505def dynamic_read_keeps_source(+shape: Shape.Shape, -tensor: Tensor<shape>, +index: U32, certificate: SourceReadKeeps<shape, tensor, index>) ->
506 DynamicSourceReadKeeps<Packed{shape, tensor}, index>:
507 SourceReadKeeps{kept} = certificate
508 DynamicSourceReadKeeps{other => Equal.trans(Maybe<&2, F32>, retained_dynamic_observe(read_dynamic(Packed{shape, tensor}, index), other),
509 retained_read_observe(shape, read_flat(shape, tensor, index), other), checked_observe(shape, tensor, other),
510 dynamic_keeps_projection(shape, read_flat(shape, tensor, index), other), kept(other))}