Home / Function/ lsIntroSort() — netty Function Reference

lsIntroSort() — netty Function Reference

Architecture documentation for the lsIntroSort() function in Bzip2DivSufSort.java from the netty codebase.

Function java Buffer Allocators calls 8 called by 1

Entity Profile

Dependency Diagram

graph TD
  b1b8f883_b30c_f3e3_fb38_5b1b8977d8d5["lsIntroSort()"]
  5a60cb70_bf06_95bf_9c73_ed3a4dc24eba["Bzip2DivSufSort"]
  b1b8f883_b30c_f3e3_fb38_5b1b8977d8d5 -->|defined in| 5a60cb70_bf06_95bf_9c73_ed3a4dc24eba
  3d921cb0_f13e_75a1_dd66_01c31c095e3a["lsSort()"]
  3d921cb0_f13e_75a1_dd66_01c31c095e3a -->|calls| b1b8f883_b30c_f3e3_fb38_5b1b8977d8d5
  4c249bdc_e1de_688c_e0ef_eef3cf5d1d8e["trLog()"]
  b1b8f883_b30c_f3e3_fb38_5b1b8977d8d5 -->|calls| 4c249bdc_e1de_688c_e0ef_eef3cf5d1d8e
  7eb66a35_f63d_2360_9104_c44d45edb4e6["trInsertionSort()"]
  b1b8f883_b30c_f3e3_fb38_5b1b8977d8d5 -->|calls| 7eb66a35_f63d_2360_9104_c44d45edb4e6
  0b62cdbf_da8d_5a4f_a35f_229e259044c1["lsUpdateGroup()"]
  b1b8f883_b30c_f3e3_fb38_5b1b8977d8d5 -->|calls| 0b62cdbf_da8d_5a4f_a35f_229e259044c1
  c78162df_9286_60d4_6559_0e9faf4d41b8["trHeapSort()"]
  b1b8f883_b30c_f3e3_fb38_5b1b8977d8d5 -->|calls| c78162df_9286_60d4_6559_0e9faf4d41b8
  f0480673_1fb7_0aeb_3cd1_591ddf267014["trGetC()"]
  b1b8f883_b30c_f3e3_fb38_5b1b8977d8d5 -->|calls| f0480673_1fb7_0aeb_3cd1_591ddf267014
  26cc1f74_19a2_7ef0_44ac_3c7506a18ac4["trPivot()"]
  b1b8f883_b30c_f3e3_fb38_5b1b8977d8d5 -->|calls| 26cc1f74_19a2_7ef0_44ac_3c7506a18ac4
  6cd08680_5bba_3632_1ac7_b77001ad18fa["swapElements()"]
  b1b8f883_b30c_f3e3_fb38_5b1b8977d8d5 -->|calls| 6cd08680_5bba_3632_1ac7_b77001ad18fa
  8c543c23_a272_46a8_3a5c_8091f5ca961f["StackEntry()"]
  b1b8f883_b30c_f3e3_fb38_5b1b8977d8d5 -->|calls| 8c543c23_a272_46a8_3a5c_8091f5ca961f
  style b1b8f883_b30c_f3e3_fb38_5b1b8977d8d5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2DivSufSort.java lines 1145–1295

    private void lsIntroSort(final int isa, final int isaD, final int isaN, int first, int last) {
        final int[] SA = this.SA;

        final StackEntry[] stack = new StackEntry[STACK_SIZE];

        int a, b, c, d, e, f;
        int s, t;
        int limit;
        int v, x = 0;
        int ssize;

        for (ssize = 0, limit = trLog(last - first);;) {
            if (last - first <= INSERTIONSORT_THRESHOLD) {
                if (1 < last - first) {
                    trInsertionSort(isa, isaD, isaN, first, last);
                    lsUpdateGroup(isa, first, last);
                } else if (last - first == 1) {
                    SA[first] = -1;
                }
                if (ssize == 0) {
                    return;
                }
                StackEntry entry = stack[--ssize];
                first = entry.a;
                last = entry.b;
                limit = entry.c;
                continue;
            }

            if (limit-- == 0) {
                trHeapSort(isa, isaD, isaN, first, last - first);
                for (a = last - 1; first < a; a = b) {
                    for (x = trGetC(isa, isaD, isaN, SA[a]), b = a - 1;
                            first <= b && trGetC(isa, isaD, isaN, SA[b]) == x;
                            --b) {
                        SA[b] = ~SA[b];
                    }
                }
                lsUpdateGroup(isa, first, last);
                if (ssize == 0) {
                    return;
                }
                StackEntry entry = stack[--ssize];
                first = entry.a;
                last = entry.b;
                limit = entry.c;
                continue;
            }

            a = trPivot(isa, isaD, isaN, first, last);
            swapElements(SA, first, SA, a);
            v = trGetC(isa, isaD, isaN, SA[first]);

            b = first + 1;
            while (b < last && (x = trGetC(isa, isaD, isaN, SA[b])) == v) {
                ++b;
            }
            if ((a = b) < last && x < v) {
                while (++b < last && (x = trGetC(isa, isaD, isaN, SA[b])) <= v) {
                    if (x == v) {
                        swapElements(SA, b, SA, a);
                        ++a;
                    }
                }
            }

            c = last - 1;
            while (b < c && (x = trGetC(isa, isaD, isaN, SA[c])) == v) {
                --c;
            }
            if (b < (d = c) && x > v) {
                while (b < --c && (x = trGetC(isa, isaD, isaN, SA[c])) >= v) {
                    if (x == v) {
                        swapElements(SA, c, SA, d);
                        --d;
                    }
                }
            }
            while (b < c) {
                swapElements(SA, b, SA, c);
                while (++b < c && (x = trGetC(isa, isaD, isaN, SA[b])) <= v) {

Domain

Subdomains

Called By

Frequently Asked Questions

What does lsIntroSort() do?
lsIntroSort() is a function in the netty codebase, defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2DivSufSort.java.
Where is lsIntroSort() defined?
lsIntroSort() is defined in codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2DivSufSort.java at line 1145.
What does lsIntroSort() call?
lsIntroSort() calls 8 function(s): StackEntry, lsUpdateGroup, swapElements, trGetC, trHeapSort, trInsertionSort, trLog, trPivot.
What calls lsIntroSort()?
lsIntroSort() is called by 1 function(s): lsSort.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free