def accumulate
import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gatherimport Base
293def accumulate(acc: F32, index: Array<U32>, pair: Array<F32> & F32) -> F32 & (Array<F32> & Array<U32>):
294 (g, x) = pair
295 (F32.add(acc, x), (g, index))