TensorLayout.join_compatible_selected: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_layout.bend as TensorLayout Lines 346-354 of stelliferous@0.0.2.0/tensor_layout.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&start_line=346&end_line=354 import Base import stelliferous@0.0.2.0/tensor.bend as Tensors import stelliferous@0.0.2.0/tensor_band.bend as Bands # The final branch is one Bool. Plan comparison stays in the metadata pass, # outside every element-copy loop. Dense append gathers each band source once. def join_compatible_selected(~Element: Data,compatible: Bool,+shape: List<&2,U32>,+axis: U32,+fill: Element,+workers: U32, discovered: Tensors.Parts & Maybe<&2,Bands.Plan>) -> Tensors.Tensor: match compatible: case True{}: join_discovered(~Element,shape,axis,fill,workers,discovered) case False{}: (parts,layout) = discovered append_parts(~Element,parts,axis,(Tensors.with_workers(~Element,Tensors.full(~Element,shape,fill),workers),0)) 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=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=Parts 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=full https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=with_workers https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band.bend&name=Plan https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&name=append_parts https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&name=join_discovered