Log inGet started
Package

jump.computeShader

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

jump

One round of pointer jumping over a run of links, three ways:

  • rank (MODE rank): list ranking. Repeated rounds give each element its root and its distance to it, for chains and trees. Both live in the double-buffered parent/parent_out and value/value_out pairs; the caller swaps them between rounds.
  • min (MODE min): doubling of the smallest label within reach. After ceil(log2 n) rounds, every element on a cycle holds the cycle's smallest label.
  • label (MODE label): label propagation over pairs, in place. Iterated to changed = 0 it labels each connected set of elements with its smallest label.

changed counts what the round altered; the caller zeroes it before a round and reads it after, so iteration with a stop is one dispatch and one count per round. Integers are 32-bit words and every mode is exact: the final labels do not depend on the order invocations ran in.

The label mode reads the pairs from la and lb; rank and min read parent and value and write parent_out and value_out. core.boundary orders its loops with min and rank rounds, curve.chain_ranks ranks chains with it, and core.islands labels connected sets with the label mode.

Over a live count (COUNT=device, see the abi README) the elements (rank, min) or the pairs (label) are the first domain_count slots of a capacity n, and the n param is not read. In rank and min mode a slot at or past the live count links to itself with the value 0. It binds 8 storage buffers (7 in the plain variant).