def summed
import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gatherimport Base
297def summed(hit: Bool, +at: Nat, acc: F32, g: Array<F32>, index: Array<U32>) -> F32 & (Array<F32> & Array<U32>):
298 match hit:
299 case False{}:
300 (acc, (g, index))
301 case True{}:
302 accumulate(acc, index, Array.get(F32, g, U32.from_nat(at)))