def entry_of
import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gatherimport Base
230# The entry output cell (o, k, r) reads: k for an index_select, the cell's
231# own position for a gather.
232def entry_of(+kind: Lookup, +length: Nat, +inner: Nat, +o: Nat, +k: Nat, +r: Nat) -> Nat:
233 match kind:
234 case Selected{}:
235 k
236 case Gathered{}:
237 position(length, inner, o, k, r)