def gather

bend-parallel@0.1.0.0 · sort.bend:510

import bend-parallel@0.1.0.0/sort.bend as Sort
import Base

510# dst[j] <- src[perm[j]] for every slot j, at fork depth b: with by_key's
511# perm, src in sorted order. src may be any size (indices wrap); dst is
512# reused when it has perm's size, else replaced by a new array. Returns
513# the three arrays.
514def gather(~T: Data, +b: Nat, perm: Array<U32>, src: Array<T>, dst: Array<T>) -> Moved<T>:
515  gather.at(~T, b, src, Array.size(U32, perm), Array.size(T, dst))

Uses (6)

Used by (0)

No other definition uses this definition.