Disjoint memory layout for complete native Chan–He node construction #
Three supplied signed input arrays precede base. The allocated block consists of three
count-prefixed heavy arrays (capacities n₀,n₁,n₂), the 4N packed cells, a reusable residue
array of capacity n₀+n₁+n₂, and M histogram cells. Empty arrays still have a count cell.
Main definitions #
NodePacking.Layout: concrete bases and a polynomial resource envelope.
References #
This memory layout is an original implementation choice.
Runtime sizes and the fresh allocation base for one complete node.
Total input capacity, shared by the reusable residue workspace.
Count cell immediately preceding a compact heavy array.
Compact heavy output data starts one cell after its count.
All three compact output capacities precede the packed array.
A reusable residue array, after every permanent output.
A reusable histogram, after the full residue capacity.
One-past-end address of the complete allocated block.
The ordinary one-array tag, 3(2U+1)+1.
Positive tag for the selected packed column.
Polynomial envelope for all addresses, signed values, encodings and histogram counters. Its fixed constant also covers code labels and all setup constants.
Every descriptor is inside its allocated output prefix.
Every descriptor precedes the packed array, including for empty inputs.