def entry_of

bendtorch-core@0.1.0.0 · src/tensor/gather.bend:230

import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gather
import 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)

Uses (3)

Used by (5)