The order refitOnCpu visits nodes in: every node, deepest first and
by index within a depth (a stable counting sort on depth), so children come
before parents. Depths are found in one pass: each walk up stops at a node
whose depth is known, and fills the path back down.
The order refitOnCpu visits nodes in: every node, deepest first and by index within a depth (a stable counting sort on depth), so children come before parents. Depths are found in one pass: each walk up stops at a node whose depth is known, and fills the path back down.