def shape_capacity

bendtorch-core@0.1.0.0 · src/tensor/word_conversion.bend:589

import bendtorch-core@0.1.0.0/src/tensor/word_conversion.bend as WordConversion
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape

589def shape_capacity(+shape: Shape.Shape) -> Shape.LE(Shape.elements(shape), 1048576n):
590  match shape:
591    case Shape.SShape{+dims, +size, +exact, rank_bound, capacity_bound}:
592      %Equal.sym(Nat, size, Shape.logical_numel(dims), exact) : Shape.LE(_, 1048576n)
593      capacity_bound

Uses (6)

Used by (2)