type SumResult

bendtorch-core@0.1.0.0 · src/tensor/reduction_LAWS.bend:109

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

109type SumResult<-shape: Shape.Shape, -original: Core.Tensor<shape>, -retained: Core.Tensor<shape>,
110  -scalar: Core.Tensor<Reduction.scalar_shape()>> is Data:
111  SumResult{-values: List<&2, F32>, -logical: LogicalValues(Shape.logical_numel(Shape.dimensions(shape)), shape, original, 0n, values),
112    -meaning: {Core.observe(Reduction.scalar_shape(), scalar, 0) == Some{Reduction.sequential_sum(values, 0.0)} : Maybe<&2, F32>},
113    -kept: @+index: U32 -> {Core.checked_observe(shape, retained, index) == Core.checked_observe(shape, original, index) : Maybe<&2, F32>}}

Uses (13)

Used by (4)