Documentation

CslibFrontier.Algorithms.WordRAM.ExactTriangle.Parameters

Native ExactTriangle splitting parameters #

The program computes the existing integer parameters sOf, queryCap, pieceSize and numPieces. Both square roots call the charged native successive-squares program; all products, quotients and ceilings are native instructions. The modulus is supplied separately by the outer prime-selection host.

Main definitions #

Main results #

@[reducible, inline]

Square-root input and arithmetic scratch.

@[reducible, inline]

Square-root result.

@[reducible, inline]

Input matrix side.

@[reducible, inline]

Target middle dimension.

@[reducible, inline]

Piece-size divisor.

@[reducible, inline]

Output floor square root of the middle dimension.

@[reducible, inline]

Output query chunk capacity.

@[reducible, inline]

Output maximum piece length.

@[reducible, inline]

Output number of pieces.

@[reducible, inline]

Square of the outer dimension.

@[reducible, inline]

Constant one, outside the square-root register bank.

Both natural ceilings use the existing (a+b-1)/b convention, including zero divisors.

Fixed code; only the square-root loops depend on the runtime inputs.

Compute the finite splitting parameters from actual runtime dimensions. The two explicit ceiling-addition fits cover their temporary sums, and the fourth-power bound covers the square formed before dividing by D. The final halt is excluded.