def fill_values_decided
bendtorch-core@0.1.0.0 · src/tensor/core.bend:367
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
import bendtorch-core@0.1.0.0/src/storage/main.bend as Storage
367def fill_values_decided(-shape: Shape.Shape, +cursor: Nat, +index: U32, value: F32,
368 tensor: Tensor<shape>, rec: Tensor<shape> -> Result<&2, &1, Error, Tensor<shape>>,
369 decision: Shape.BoolCase<Nat.is_eq(U32.to_nat(index), cursor)>) -> Result<&2, &1, Error, Tensor<shape>>:
370 match decision:
371 case Shape.BFalse{equal}:
372 Fail{StorageError{Storage.InvalidIndex{}}}
373 case Shape.BTrue{equal}:
374 fill_values_step(shape, rec, write_flat(shape, tensor, index, value))