Builtin Library
- ..
- README.md713 B
- bindings.yaml859 B
- shader.wgsl662 B
README.md
hash_starts
Finishes a spatial hash: given each point's bucket and the permutation that sorts the points by bucket, states for every bucket where its points start and end in the sorted order. Each bucket finds its two places by binary search over the sorted keys, so no bucket needs clearing and the answer is a function of the keys alone. Exact.
Dispatch over the buckets. It reads keys (from hash), order (the sort's
permutation) and the param points, and writes range, two words a bucket: the
places range[2k] .. range[2k + 1] - 1 hold bucket k's points. core.spatial
finishes its index with it, and hash_count, hash_gather, hash_nearest,
hash_repel and hash_hook read range.