TensorBandWindow.prepare: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_band_window.bend as TensorBandWindow Lines 113-123 of stelliferous@0.0.2.0/tensor_band_window.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_band_window.bend&start_line=113&end_line=123 import Base import stelliferous@0.0.2.0/tensor_band.bend as Bands import stelliferous@0.0.2.0/storage_buffer.bend as Storage import stelliferous@0.0.2.0/traversal_partition.bend as Partition # The full core tree is threaded through the preparation pass without cloning. # Each allocation is a requested neighbour range, never a core-sized window. # The resulting halo tree follows the same layout, ready to pair with cores. def prepare(~Element: Data,+geometry: Geometry,+fill: Element,layout: Bands.Plan,bands: Bands.Bands(~Element)) -> Bands.Bands(~Element) & Halos(~Element): match layout: case Bands.Rows{+first,+count}: halo(~Element,input_geometry(geometry),fill,first,count,window(geometry,first,count),bands) case Bands.Split{left,right}: Storage.bind_pair(~Bands.Bands(~Element),~Halos(~Element),~(Bands.Bands(~Element) & Halos(~Element)), prepare(~Element,geometry,fill,left,bands),bands => left => Storage.bind_pair(~Bands.Bands(~Element),~Halos(~Element),~(Bands.Bands(~Element) & Halos(~Element)), prepare(~Element,geometry,fill,right,bands),bands => right => (bands,Partition.Fork{left,right}))) Uses (11): 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=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=Plan https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band_window.bend&name=Geometry https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band_window.bend&name=Halos https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band_window.bend&name=halo https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band_window.bend&name=input_geometry https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_band_window.bend&name=window https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/traversal_partition.bend&name=Tree