def span

bendtorch-core@0.1.0.0 · src/autograd/reduce.bend:35

import bendtorch-core@0.1.0.0/src/autograd/reduce.bend as Reduce
import Base

35# How many digits a row walks for a target cell: every digit of an axis the
36# target reduces (left stride 0), else one.
37def span(+left: Nat, +extent: Nat) -> Nat:
38  match left:
39    case 0n:
40      extent
41    case 1n+less:
42      1n

Uses (1)

Used by (6)