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# One leaf below a parallel split. It neither forks nor calls a closure, so
164# the runtime keeps it as its own task for the work turn; a leaf inlined into
165# the forking recursion would run in the grow turn on one worker per row.
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})

Uses (3)

Used by (1)