def zero_right

bendtorch-core@0.1.0.0 · src/tensor/elementwise.bend:296

import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwise
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape

296def zero_right(rows: List<&2, Shape.Row>) -> Bool:
297  match rows:
298    case Shape.Row{stride, left, +right} <> rest:
299      Bool.and(Nat.is_eq(right, 0n), zero_right(rest))
300    case Nil{}:
301      True{}

Uses (5)

Used by (4)