def leaf_task
stelliferous@0.0.2.0 · tensor_band.bend:163
import stelliferous@0.0.2.0/tensor_band.bend as TensorBand
import Base
import stelliferous@0.0.2.0/traversal_partition.bend as Partition
163
164
165
166def leaf_task(~Block: Type,~Output: Type,~Resource: Type,~Context: Data,
167 ~leaf: Context -> U32 -> U32 -> Block -> Resource -> Partition.Tree<&1,Output,Unit>,
168 ~keep: Partition.Tree<&1,Block,Unit> -> Partition.Tree<&1,Output,Unit>,
169 first: U32,rows: U32,context: Context,tree: Partition.Tree<&1,Block,Unit>,resource: Resource) -> Partition.Tree<&1,Output,Unit>:
170 match tree:
171 case Partition.Leaf{block,offset,span,details}: leaf(context,first,rows,block,resource)
172 case Partition.Fork{left,right}: keep(Partition.Fork{left,right})