Runtime.Drv.inputs.par: def of bend-kube-runtime@0.2.0.0 Import: import bend-kube-runtime@0.2.0.0/src/runtime.bend as Runtime Lines 84-94 of bend-kube-runtime@0.2.0.0/src/runtime.bend: https://jend.leeeet.dev/read.txt?path=bend-kube-runtime@0.2.0.0/src/runtime.bend&start_line=84&end_line=94 import Base import bend-kube-runtime@0.2.0.0/src/watcher.bend as W # The same, with the lines decoded and parsed in parallel: each line is # its own JSON document, so the halves split (to depth levels, up to 2^depth # tasks) run as Bend parallel calls, on every core. def Drv.inputs.par(+depth: Nat, +ls: List<&2, List<&2, U32>>) -> List<&2, W.Input>: match depth: case 0n: Drv.inputs(ls) case 1n+d: +half = Nat.div(List.length(&2, List<&2, U32>, ls), 2n) a b = Drv.inputs.par(d, List.take(&2, List<&2, U32>, ls, half)) Drv.inputs.par(d, List.drop(&2, List<&2, U32>, ls, half)) List.append(&2, W.Input, a, b) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.drop https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.take https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/runtime.bend&name=Drv.inputs https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/watcher.bend&name=Input