Gather.source: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gather Lines 246-248 of bendtorch-core@0.1.0.0/src/tensor/gather.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/gather.bend&start_line=246&end_line=248 import Base def source(+plan: Plan, +at: Nat, +j: Nat) -> Nat: Plan{+kind, +outer, +extent, +inner, +length} = plan position(extent, inner, Nat.div(Nat.div(at, inner), length), j, Nat.mod(at, inner)) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mod https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/gather.bend&name=Plan https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/gather.bend&name=position