Checked mask-and-multiply compression #
The multiplier is supplied as three precomputed half-word digits. The query arrives as one physical word: masking and conversion to digits are part of the charged execution. The retained window fits inside the third product digit, including at odd physical widths.
Main definitions #
CompressProgram.code: a fixed standard-basis compression program.
Main results #
CompressProgram.exec: checked execution of mask-and-multiply compression.CompressProgram.exec_approximateSketch: execution of the arithmetic fusion sketch.
Node preprocessing and loading the constants are separate from query execution.
References #
Embed the multiplication workspace in the first sixteen registers.
Instances For
Query word, preserved.
Instances For
Input position mask, preserved.
Instances For
Retained output mask, preserved.
Instances For
Offset w - 2 * (w / 2), supplied by the caller and preserved.
Instances For
Conversion scratch and final compressed result.
Instances For
Half-word radix workspace.
Instances For
Lowest query digit.
Instances For
Middle query digit.
Instances For
Highest query digit.
Instances For
Third product digit, containing the retained window.
Instances For
Mask the query and split it using division and remainder by the half-word radix. No squared radix is ever installed in a physical register.
Instances For
The exact data after query conversion, with an already initialized radix.
Instances For
A multiplier of at most w + L bits has three bounded half-word digits whenever the
retained window fits. This is a preprocessing representation theorem; loading is separate.
Initialize the radix, convert the query, multiply three digits by three digits, and extract the retained window. Registers 7--9 contain the precomputed multiplier digits.
Instances For
In 94 checked standard instructions, compute the masked product window. The query and
all node parameters are preserved, as is memory. Only registers 0--6, 10--15 and 20 may
change. Multiplier digits in registers 7--9 must be preloaded; conversion of the physical
query word is charged. The retained mask occupies L bits and satisfies the stated
half-word window condition.
Specialize the actual execution to the arithmetic approximate sketch. The collision-free parameter construction and comparison theorem are independent of this execution theorem. The caller supplies the position and retained masks and three multiplier digits.