def construct.capacity

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

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

647def construct.capacity(+input: List<&2, U32>, rank_bound: LE(rank_dimensions(input), 4n), capacity: Capacity<naturals(input)>) -> ConstructResult<input>:
648  match capacity:
649    case Beyond{}:
650      SError{CapacityExceeded{}}
651    case Within{+size, +exact, bound}:
652      SBuilt{SShape{input, size, exact, rank_bound, construct.bound(input, size, exact, bound)}, {==}}

Uses (10)

Used by (2)