def position

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

import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gather
import Base

226# The position of cell (o, k, r) of the view [outer, rows, inner].
227def position(+rows: Nat, +inner: Nat, +o: Nat, +k: Nat, +r: Nat) -> Nat:
228  Nat.add(Nat.mul(Nat.add(Nat.mul(o, rows), k), inner), r)

Uses (3)

Used by (4)