def flatten_spec

bendtorch-core@0.1.0.0 · src/shape/LAWS.bend:78

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

78def flatten_spec(+dims: List<&2, Nat>, coordinate: Maybe<&2, Shape.Coordinate(dims)>) -> Maybe<&2, U32>:
79  match coordinate:
80    case None{}:
81      None{}
82    case Some{coordinate}:
83      Some{U32.from_nat(Shape.row_major(dims, coordinate))}

Uses (7)

Used by (15)