def capacity.bound
import bendtorch-core@0.1.0.0/src/shape/core.bend as Coreimport Base
568def capacity.bound(-dims: List<&2, Nat>, +size: Nat, exact: {size == numel(dims) : Nat}, bound: BoolCase<Nat.is_le(size, 1048576n)>) -> Capacity<dims>:
569 match bound:
570 case BFalse{equal}:
571 Beyond{}
572 case BTrue{equal}:
573 Within{size, exact, equal}