def allocate
stelliferous@0.0.2.0 · tensor_band_concat.bend:78
import stelliferous@0.0.2.0/tensor_band_concat.bend as TensorBandConcat
import Base
import stelliferous@0.0.2.0/tensor.bend as Tensors
import stelliferous@0.0.2.0/tensor_band.bend as Bands
import stelliferous@0.0.2.0/traversal_partition.bend as Partition
78def allocate(~Element: Data,layout: Bands.Plan,+geometry: Bands.Geometry,+fill: Element) -> Bands.Bands(~Element):
79 match layout:
80 case Bands.Rows{first,+rows}: Partition.Leaf{Tensors.buffer(~Element,fill,Bands.local_count(geometry,rows)),first,rows,Unit{}}
81 case Bands.Split{left,right}: Partition.Fork{allocate(~Element,left,geometry,fill),allocate(~Element,right,geometry,fill)}