def bounded

bendtorch-core@0.1.0.0 · src/tensor/layout.bend:27

import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layout
import Base

27def bounded(axes: List<&2, U32>, +rank: U32) -> Bool:
28  match axes:
29    case Nil{}:
30      True{}
31    case head <> tail:
32      Bool.and(U32.is_lt(head, rank), bounded(tail, rank))

Uses (5)

Used by (29)