def write_original

bendtorch-core@0.1.0.0 · src/tensor/core_PROOF.bend:363

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

363def write_original(-shape: Shape.Shape, -original: Core.Tensor<shape>, -owner: Core.Tensor<shape>, +index: U32, +value: F32,
364  same: {owner == original : Core.Tensor<shape>}, certificate: Core.Write<shape, owner, index, value>) -> Core.Write<shape, original, index, value>:
365  Core.Write{tensor, result, exact} = certificate
366  Core.Write{tensor, result, Equal.trans(Core.Tensor<shape> & Result<&2, &2, Core.Error, Unit>, (tensor, result),
367    Core.write_flat(shape, owner, index, value), Core.write_flat(shape, original, index, value), exact,
368    Equal.cong(Core.Tensor<shape>, Core.Tensor<shape> & Result<&2, &2, Core.Error, Unit>, input => Core.write_flat(shape, input, index, value), owner, original, same))}

Uses (13)

Used by (1)