def walk_right
import bendtorch-core@0.1.0.0/src/shape/core.bend as Coreimport Base
453def walk_right(rows: List<&2, Row>, +index: Nat) -> Nat:
454 match rows:
455 case Nil{}:
456 0n
457 case Row{+stride, left, right} <> rest:
458 Nat.add(Nat.mul(right, Nat.div(index, stride)), walk_right(rest, Nat.mod(index, stride)))
Uses (7)
Used by (20)
- bendtorch-core@0.1.0.0/src/autograd/reduce_fiber_proof:masked
- bendtorch-core@0.1.0.0/src/tensor/elementwise:right_walk
- bendtorch-core@0.1.0.0/src/tensor/contracts/broadcast:right_walk
- bendtorch-core@0.1.0.0/src/tensor/contracts/broadcast_proof:right_walk_bound
- bendtorch-core@0.1.0.0/src/shape/flat:project_right_index
- …