Tensor.combine_shapes_with: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor.bend as Tensor Lines 313-319 of stelliferous@0.0.2.0/tensor.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor.bend&start_line=313&end_line=319 import Base import stelliferous@0.0.2.0/storage_buffer.bend as Storage import stelliferous@0.0.2.0/tensor_shape.bend as Shapes import stelliferous@0.0.2.0/tensor_view.bend as Views # Equal extents take the direct path. Different extents follow NumPy # broadcasting (Shapes.broadcast) and fail only when they are incompatible. def combine_shapes_with(~Element: Data,~kernel: @+count: Nat -> @+right_view: Views.View -> @+offset: U32 -> Storage.Buffer -> Storage.Buffer -> Storage.Buffer & Storage.Buffer,name: String,same: Bool, left: Storage.Buffer,+left_shape: List<&2,U32>,+fill: Element,right: Storage.Buffer,+right_shape: List<&2,U32>,+workers: U32) -> Tensor: match same: case True{}: combine_views_with(~Element,~kernel,name,view_of(left_shape),view_of(right_shape),left,left_shape,fill,right,right_shape,workers) case False{}: combine_broadcast_with(~Element,~kernel,name,Shapes.broadcast(left_shape,right_shape),left,left_shape,fill,right,right_shape,workers) Uses (13): 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=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/storage_buffer.bend&name=Buffer https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=Tensor https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=combine_broadcast_with https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=combine_views_with https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=view_of https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_shape.bend&name=broadcast https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_view.bend&name=View