def first_span

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

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

44def first_span(+rows: List<&2, Shape.Row>, +extents: List<&2, Nat>) -> Nat:
45  match rows extents:
46    case Shape.Row{stride, +left, right} <> rest +extent <> others:
47      span(left, extent)
48    case rows extents:
49      0n

Uses (4)

Used by (21)