Initialized signed weights to native residue classes #
The flat input is an unsigned (n,p) header followed by the signed encodings of the three
n×n weight matrices. Native arithmetic allocates a residue array, class counts and disjoint
query blocks. The existing signed residue kernel processes every weight before the class scanner
reads the A–B residues. Neither residues nor class/layout tables are input certificates.
Main definitions #
ResidueClasses.input: the mixed unsigned-header/signed-weight encoding.ResidueClasses.programAt: the same preparation at a fixed caller header offset.ResidueClasses.program: fixed thirty-two-register native preparation.ResidueClasses.addressBound: explicit arithmetic and allocation bound.
Main results #
ResidueClasses.exec_at: callable execution from a fixed caller header.ResidueClasses.exec_input: initialized execution, residues, class counts, queries and frame.
Header cursor and class-scanner source register.
Class-scanner side register.
Signed-residue source register.
Signed-residue destination register.
Signed-residue length register.
Signed modulus and subsequent class-count pointer register.
Class-scanner query pointer register.
Class-scanner modulus register.
Unsigned side length.
Unsigned positive modulus.
Start of the signed weights.
Start of all three unsigned residue matrices.
Start of the computed class-count array.
Start of the class query blocks.
Area of one weight matrix.
Constant one, preserved by both callees.
A fitting value covering every allocation endpoint and temporary for a caller header.
The adjacent header cells contain n,p, followed by the three signed matrices.
The standard input places its n,p header immediately after the machine's length cell.
The existing signed residue conversion, including unsigned decoding of each remainder.
Reuse the complete native class scanner.
Read a fixed caller header and compute all array bases, lengths and the encoded modulus. The offset is a code parameter; the complete ET caller uses one fixed input format.
Read the standard initialized input header.
Deliver the five actual scanner arguments after residue conversion.
Native setup, reduction and enumeration for a fixed caller header.
All setup, reduction and enumeration is native code.
Changing the fixed header offset changes constants but not the instruction graph.
Fixed instruction graph, independent of dimensions and physical width.
Callable residue/class preparation from a concrete caller header and signed matrix words.
The fixed offset selects the adjacent n,p cells; no initialized-memory shape is assumed outside
that payload. The cost and output frame include every setup, signed reduction and class scan.
Read the input header, compute all three residue matrices and enumerate the A–B queries.
The signed width is w, and execution uses the existing signed compiler's w+2 unsigned width.
The cost includes every header, reduction, argument-delivery and class-scan instruction; the
final halt is excluded. This subroutine does not choose a prime or solve an instance.