Charged in-place normalization of an array #
ArrayNormalize.program replaces each word of a supplied interval by its remainder modulo a
supplied positive modulus. It executes actual loads, remainders and stores; the untouched
memory need not already be normalized. This small topic module avoids adding an application
specific transformation to the allocation API.
First address to normalize.
Instances For
Number of words.
Instances For
Positive normalization modulus.
Instances For
Current index.
Instances For
Temporary absolute address.
Instances For
Loaded and normalized word.
Instances For
Normalize one cell with five actual native instructions.
Instances For
Fixed code for in-place normalization of an interval supplied in registers.
Instances For
In-place normalization costs at most 7n+4 native instructions, including every indexed
load/store and loop decision. The input arguments and all outside memory are preserved.