def sum_allocated_status
bendtorch-core@0.1.0.0 · src/tensor/reduction_PROOF.bend:808
import bendtorch-core@0.1.0.0/src/tensor/reduction_PROOF.bend as ReductionPROOF
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/reduction.bend as Reduction
import bendtorch-core@0.1.0.0/src/tensor/math_totality.bend as Totality
import bendtorch-core@0.1.0.0/src/tensor/allocation_PROOF.bend as AllocationProof
import bendtorch-core@0.1.0.0/src/tensor/allocation_spec.bend as Allocation
808def sum_allocated_status(+shape: Shape.Shape, tensor: Core.Tensor<shape>, +value: F32) ->
809 Totality.Status<Core.Error, Core.Tensor<shape> & Core.Tensor<Reduction.scalar_shape()>, Reduction.scalar_result(shape, tensor, Core.new(Reduction.scalar_shape(), value))>:
810 Totality.Status{
811 {\{Allocation.TensorDone: scalar => same =>
812 %same : {Result.is_done(&2, &1, Core.Error, Core.Tensor<shape> & Core.Tensor<Reduction.scalar_shape()>, Reduction.scalar_result(shape, tensor, _)) == True{} : Bool}
813 {==}} : Allocation.TensorDone<Reduction.scalar_shape(), Core.new(Reduction.scalar_shape(), value)> ->
814 {Result.is_done(&2, &1, Core.Error, Core.Tensor<shape> & Core.Tensor<Reduction.scalar_shape()>, Reduction.scalar_result(shape, tensor, Core.new(Reduction.scalar_shape(), value))) == True{} : Bool}}(
815 AllocationProof.core_new_done(Reduction.scalar_shape(), value))}