TensorBand.repartition: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_band.bend as TensorBand Lines 325-335 of stelliferous@0.0.2.0/tensor_band.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_band.bend&start_line=325&end_line=335 import Base import stelliferous@0.0.2.0/storage_buffer.bend as Storage import stelliferous@0.0.2.0/traversal_partition.bend as Partition def repartition(~Element: Data,+geometry: Geometry,+fill: Element,layout: Plan,bands: Bands(~Element)) -> Bands(~Element) & Bands(~Element): match layout: case Rows{+first,+rows}: Storage.bind_pair(~Bands(~Element),~Storage.Buffer,~(Bands(~Element) & Bands(~Element)), range(~Element,geometry,first,rows,bands,allocate(~Element,fill,local_count(geometry,rows))),source => output => (source,Partition.Leaf{output,first,rows,Unit{}})) case Split{left,right}: Storage.bind_pair(~Bands(~Element),~Bands(~Element),~(Bands(~Element) & Bands(~Element)), repartition(~Element,geometry,fill,left,bands),source => left => Storage.bind_pair(~Bands(~Element),~Bands(~Element),~(Bands(~Element) & Bands(~Element)), repartition(~Element,geometry,fill,right,source),source => right => (source,Partition.Fork{left,right}))) Uses (12): 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=Unit 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/storage_buffer.bend&name=bind_pair https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band.bend&name=Bands https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band.bend&name=Geometry 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_band.bend&name=allocate https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band.bend&name=local_count https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band.bend&name=range https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/traversal_partition.bend&name=Tree