Native Euclidean residue arrays #
The input holds signed encodings. The output holds ordinary unsigned residue keys, ready for histogram construction. In particular a nonnegative encoded integer is explicitly decoded by division by two before it is used as a histogram index.
Main definitions #
Residues.program: a fixed loop producing Euclidean residue keys.
Main results #
Residues.exec: charged execution preserving the input and all cells outside the output.
References #
Encoded integer input base.
Instances For
Unsigned residue output base.
Instances For
Input length.
Instances For
Encoded modulus.
Instances For
Loop counter.
Instances For
Address scratch.
Instances For
Constant one.
Instances For
The signed remainder block followed by explicit unsigned decoding and a store.
Instances For
All parameters are supplied at runtime; registers and code are independent of length and width.
Instances For
Convert n encoded signed integers to unsigned Euclidean residue keys in at most
23n + 4 native instructions. The modulus is positive and encoded in its parameter register;
addresses are ordinary unsigned words. The final halt is excluded.