def strides_of

bendtorch-core@0.1.0.0 · src/shape/projection_proofs.bend:8

import bendtorch-core@0.1.0.0/src/shape/projection_proofs.bend as ProjectionProofs
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape

8def strides_of(+dims: List<&2, Nat>) -> List<&2, Nat>:
9  match dims:
10    case Nil{}:
11      Nil{}
12    case head <> tail:
13      Shape.broadcast_index(head, Shape.numel(tail)) <> strides_of(tail)

Uses (4)

Used by (6)