Runtime-selected gather decoder #
The fixed decoder chooses one field coordinate nonuniformly for every request. For the actual direct-product circuit that coordinate comes from the runtime prefix. This module appends a one-hot coordinate selector to the gather output and compiles the bilinear XOR
XOR_(scalar, bit) selector(request, bit) AND value(request, scalar, bit).
Thus the selected coordinate remains runtime data, while the cost stays linear in the number of gathered field bits. No type-class instances are introduced.
Number of one-hot selector bits appended after the gather records.
Equations
- Algebraic.MassProduction.DynamicGatherDecoder.selectorBitCount totalRequests valueWidth = totalRequests * valueWidth
Instances For
Full input width: gather records followed by row-major selector bits.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A gathered value wire, embedded in the left part of the decoder input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A row-major selector wire, embedded in the right part of the input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Restrict the combined input to its gather-record prefix.
Equations
- Algebraic.MassProduction.DynamicGatherDecoder.gatherInput input index = input (Fin.castAdd (Algebraic.MassProduction.DynamicGatherDecoder.selectorBitCount totalRequests valueWidth) index)
Instances For
Read one request's runtime one-hot selector bit.
Equations
- Algebraic.MassProduction.DynamicGatherDecoder.selectorInput input request bit = input (Algebraic.MassProduction.DynamicGatherDecoder.selectorInputIndex depth keyWidth metadataWidth request bit)
Instances For
Bilinear decoding expression for one request.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Gate count produced for one request.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Complete runtime-selected row-major gather decoder.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Exact De Morgan cost of one request's bilinear decoder.
The full runtime decoder remains linear in the gathered field bits.
A one-hot runtime selector reduces the bilinear decoder to the same coordinate XOR used by the fixed decoder.
Appending a one-hot runtime selector makes the dynamic decoder extensionally equal to the corresponding fixed-coordinate decoder.