def gather
stelliferous@0.0.2.0 · tensor_band.bend:60
import stelliferous@0.0.2.0/tensor_band.bend as TensorBand
import Base
import stelliferous@0.0.2.0/storage_buffer.bend as Storage
import stelliferous@0.0.2.0/traversal_partition.bend as Partition
60
61
62def gather(~Element: Data,+geometry: Geometry,bands: Bands(~Element),output: Storage.Buffer<Element>) -> Storage.Buffer<Element>:
63 match bands:
64 case Partition.Leaf{input,first,rows,details}: gather_leaf(~Element,geometry,first,rows,input,output)
65 case Partition.Fork{left,right}: gather(~Element,geometry,right,gather(~Element,geometry,left,output))