Slice.sized: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/slice.bend as Slice Lines 111-120 of bendtorch-core@0.1.0.0/src/tensor/slice.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/slice.bend&start_line=111&end_line=120 import Base # The view a plan uses. An input with no element gets no cell in either # build, so its outer and inner counts are left at 0 rather than formed: the # product of the other extents can pass 2^48 - 1, the largest Nat the # runtime holds, as [2^24, 2^24, 0] at axis 2 does. def sized(+dimensions: List<&2, U32>, +dim: Nat, empty: Bool) -> View: match empty: case True{}: View{0n, axis_extent(dimensions, dim), 0n} case False{}: view(dimensions, dim) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/slice.bend&name=View https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/slice.bend&name=axis_extent https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/slice.bend&name=view