Selecting a successful candidate and its clean prefix #
Each candidate consists of flagged request records. First sort the request records of every candidate by their flags. A candidate succeeds precisely when its last required prefix position is flagged. Then sort whole candidate blocks by this success bit and select the first block by free wiring.
The carried candidate blocks may be large, but the outer comparison key is only one bit. The total cost remains linear in the candidate-request product apart from record widths and squared sorting depths.
Bit length of one candidate's request array.
Equations
- Algebraic.MassProduction.Nonuniform.CandidateSelection.rowBits requestDepth payloadWidth = Algebraic.MassProduction.Sorting.networkBits requestDepth (1 + payloadWidth)
Instances For
One candidate's row in the flat input array.
Equations
- Algebraic.MassProduction.Nonuniform.CandidateSelection.row input candidate bit = input (finProdFinEquiv (candidate, bit))
Instances For
Sort each candidate's requests with clean records first.
Equations
- One or more equations did not get rendered due to their size.
Instances For
One flag sort per candidate row.
Each output row is exactly its independent flag sort.
The final position in the required clean prefix.
Equations
Instances For
Add each candidate's success bit before its complete sorted row.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Packing preserves the row and prefixes its selected threshold flag.
The complete selection circuit returns the first sorted candidate block.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Candidate selection has exactly the gates of its row sorts, its packing layer, and its final flag sort.
If any candidate has enough clean requests, the selected complete row comes from one candidate and all required prefix positions are clean.
Explicit cost for inner request sorts and the outer candidate-block sort.