Documentation

CslibFrontier.Algorithms.WordRAM.ExactTriangle.CallableFixedPrime.Program

Caller-safe fixed-prime native code #

The fixed 640-register standard program protects the selector's entire low 160-register bank. Arguments 600–607 are raw n,D,g,p, signed AB/BC/AC pointers and workspace base. They survive. Raw verdict/witness/scans return in 632–636. Registers 160–578 embed the complete translated 416-register fixed-prime solver and its three memory-window registers.

The adapter copies exactly the three original arrays into its workspace, accumulating their actual raw words. It writes five original-input headers and computes its own source modulus with native ceiling-logarithm and power loops. No caller catalogue or reserved window is cleared or copied. The real catalogue prefix feeds one physical record slot. Each record is consumed immediately, then its heap is reset before the next logical record.

@[reducible, inline]

Original side length.

@[reducible, inline]

Runtime inner dimension, required to be a power of four by the correctness theorem.

@[reducible, inline]

Runtime piece parameter.

@[reducible, inline]

Runtime fixed prime.

@[reducible, inline]

Canonical signed AB source pointer.

@[reducible, inline]

Canonical signed BC source pointer.

@[reducible, inline]

Canonical signed AC source pointer.

@[reducible, inline]

Caller-owned base of the dirty working interval.

@[reducible, inline]

Computed raw-word sum of all three original matrices.

@[reducible, inline]

Computed square side length.

@[reducible, inline]

Header store address.

@[reducible, inline]

Constant one used for the five header stores.

@[reducible, inline]

Header constant, finally five.

@[reducible, inline]

Raw zero/one original ET verdict.

@[reducible, inline]

Original AB-row coordinate on success.

@[reducible, inline]

Original middle coordinate on success.

@[reducible, inline]

Original AC-column coordinate on success.

@[reducible, inline]

Total actual original-weight scans over all visited records.

The complete solver and its compiler registers move as one bank, above the selector.

An unchanged source register in the high physical bank.

The copy/sum loop uses eight disjoint setup registers.

Ceiling-logarithm setup uses the first four copy temporaries.

Power setup uses the first five copy temporaries.

Write the actual original-input length and four raw scalar headers.

Prepare the first original matrix and initialize its actual raw-word accumulator.

Advance the destination by one copied square, retaining the actual running word sum.

Only the original matrix spans are copied. Every loaded word also contributes to the computed source-width argument; no external magnitude/exponent certificate is read.

Deliver the computed exponent and base to the actual power routine.

Deliver the computed power and runtime base to the memory-window compiler bank.

Compute the actual source modulus and normalize the fixed source register bank. Neither the dirty memory window nor the caller's register bank is cleared.

Every original solver load/store has actual runtime address translation and normalization.

Return raw verdict, original coordinates and the single accumulated scan counter.

One uniform callable solver; all copies, setup, invocation and return instructions are real.