You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3b9aa4e
Browse filesBrowse the repository at this point in the historyBrowse files
GPUTracking: replace the merger's goto with helper lambdas
MSL supports neither goto nor labels. The label sat at the end of the loop body,
so each jump was a continue for the outer loop that could not be written as one
because it was issued from an inner loop.
Two lambdas take over the chain walks that did the jumping: one advances a track
along its segment chain and reports whether the target was met on the way, the
other reports whether the target sits on either neighbour chain. Each jump then
becomes a plain continue at the top level of the loop body. A null target lets
the first one also cover the four walks that never tested for one, leaving the
file three lines shorter than it is with the goto.
Checked against the goto version by transcribing both loop bodies into a harness
and comparing the skip decision and the resulting segment and neighbour links of
every track over 400000 random link graphs, 71% of which took a skip path and
100000 of which reached the merging stage: no differences.
0 commit comments