Compact native frontend scans #
Each pass reads both canonical keys and their full multiplicities. It appends only selected keys to a disjoint destination. The singleton-zero arrays are written separately, so empty input needs no exceptional semantics.
Main definitions #
Scan.program: charged compact selection from the radix output.
Key pointer, count pointer and number of distinct keys.
Instances For
Key pointer, count pointer and number of distinct keys.
Instances For
Key pointer, count pointer and number of distinct keys.
Instances For
Output pointer, input cursor and output length.
Instances For
Output pointer, input cursor and output length.
Instances For
Output pointer, input cursor and output length.
Instances For
Address scratch.
Instances For
Load one full key/count pair, compute its selection, optionally append, and advance.
Instances For
Reset both cursors and scan all distinct keys.
Instances For
One charged compacting iteration.
Complete compact scan, with arbitrary old output/scratch memory and an exact memory frame. The source key/count blocks precede the output; their contents and all caller registers that the body does not write are retained.