Documentation

Complexity.Algorithms.WordRAM.ThreeSum.Frontend.Program

Initialized-input native distinct-position frontend #

The ABI has 128 registers. Radix uses 0–15; frontend locals use 16–63; the existing parameter program uses 64–87. Registers 88–90 return descriptor base, descriptor count and heap end. Each descriptor has six words (length, pointer) for its three compact injective arrays. Each array has capacity n+1, including the singleton zeros required when n=0.

Main definitions #

@[reducible, inline]

Original input length and label-bit budget.

Instances For
    @[reducible, inline]

    Original input length and label-bit budget.

    Instances For
      @[reducible, inline]

      Number of split triples, total triple count and total array count.

      Instances For
        @[reducible, inline]

        Number of split triples, total triple count and total array count.

        Instances For
          @[reducible, inline]

          Number of split triples, total triple count and total array count.

          Instances For
            @[reducible, inline]

            Capacity per compact array.

            Instances For
              @[reducible, inline]

              Next payload address.

              Instances For
                @[reducible, inline]

                Descriptor table base.

                Instances For
                  @[reducible, inline]

                  Current array index, current triple and slot.

                  Instances For
                    @[reducible, inline]

                    Current array index, current triple and slot.

                    Instances For
                      @[reducible, inline]

                      Current array index, current triple and slot.

                      Instances For
                        @[reducible, inline]

                        Arithmetic temporary and final heap endpoint.

                        Instances For
                          @[reducible, inline]

                          Arithmetic temporary and final heap endpoint.

                          Instances For

                            Write the singleton-zero array, including on empty input.

                            Instances For

                              Compute the exact array selection mode for the two multiplicity triples.

                              Instances For

                                Decode β, then β', then [false,true], and scan the indicated one of three arrays.

                                Instances For

                                  Split setup followed by the complete compacting scan.

                                  Instances For

                                    Native choice between the split prefix and the two multiplicity triples.

                                    Instances For

                                      Write a compact array's two descriptor words and advance the allocation cursor.

                                      Instances For

                                        One complete array and its two descriptor words.

                                        Instances For

                                          Initialize every constant, layout and cursor, then enumerate every array, including empties.

                                          Instances For

                                            Embed the 24-register parameter program above both native kernels.

                                            Instances For

                                              Embed the 16-register radix program in the low registers.

                                              Instances For

                                                Embed the 48-register frontend program between radix and parameters.

                                                Instances For
                                                  @[reducible, inline]

                                                  Final descriptor base, descriptor count and one-past-end payload address.

                                                  Instances For
                                                    @[reducible, inline]

                                                    Final descriptor base, descriptor count and one-past-end payload address.

                                                    Instances For
                                                      @[reducible, inline]

                                                      Final descriptor base, descriptor count and one-past-end payload address.

                                                      Instances For

                                                        Setup for the lower-level sorter with the magnitude-derived bit bound, never physical width.

                                                        Instances For

                                                          Transfer actual parameters and radix outputs into the concrete frontend ABI.

                                                          Instances For

                                                            Return metadata while preserving parameter outputs and full radix key/count arrays.

                                                            Instances For

                                                              Native frontend after the existing complete parameter program.

                                                              Instances For

                                                                One finite native program for each fixed polynomial magnitude exponent.

                                                                Instances For