Searched refs:ISAd (Results 1 – 2 of 2) sorted by relevance
/freebsd/contrib/libdivsufsort/lib/ |
H A D | trsort.c | 79 tr_insertionsort(const saidx_t *ISAd, saidx_t *first, saidx_t *last) { in tr_insertionsort() argument 84 for(t = *a, b = a - 1; 0 > (r = ISAd[t] - ISAd[*b]);) { in tr_insertionsort() 98 tr_fixdown(const saidx_t *ISAd, saidx_t *SA, saidx_t i, saidx_t size) { in tr_fixdown() argument 103 for(v = SA[i], c = ISAd[v]; (j = 2 * i + 1) < size; SA[i] = SA[k], i = k) { in tr_fixdown() 104 d = ISAd[SA[k = j++]]; in tr_fixdown() 105 if(d < (e = ISAd[SA[j]])) { k = j; d = e; } in tr_fixdown() 114 tr_heapsort(const saidx_t *ISAd, saidx_t *SA, saidx_t size) { in tr_heapsort() argument 121 if(ISAd[SA[m / 2]] < ISAd[SA[m]]) { SWAP(SA[m], SA[m / 2]); } in tr_heapsort() 124 for(i = m / 2 - 1; 0 <= i; --i) { tr_fixdown(ISAd, SA, i, m); } in tr_heapsort() 125 if((size % 2) == 0) { SWAP(SA[0], SA[m]); tr_fixdown(ISAd, SA, 0, m); } in tr_heapsort() [all …]
|
/freebsd/sys/contrib/zstd/lib/dictBuilder/ |
H A D | divsufsort.c | 927 tr_insertionsort(const int *ISAd, int *first, int *last) { in tr_insertionsort() argument 932 for(t = *a, b = a - 1; 0 > (r = ISAd[t] - ISAd[*b]);) { in tr_insertionsort() 946 tr_fixdown(const int *ISAd, int *SA, int i, int size) { in tr_fixdown() argument 951 for(v = SA[i], c = ISAd[v]; (j = 2 * i + 1) < size; SA[i] = SA[k], i = k) { in tr_fixdown() 952 d = ISAd[SA[k = j++]]; in tr_fixdown() 953 if(d < (e = ISAd[SA[j]])) { k = j; d = e; } in tr_fixdown() 962 tr_heapsort(const int *ISAd, int *SA, int size) { in tr_heapsort() argument 969 if(ISAd[SA[m / 2]] < ISAd[SA[m]]) { SWAP(SA[m], SA[m / 2]); } in tr_heapsort() 972 for(i = m / 2 - 1; 0 <= i; --i) { tr_fixdown(ISAd, SA, i, m); } in tr_heapsort() 973 if((size % 2) == 0) { SWAP(SA[0], SA[m]); tr_fixdown(ISAd, SA, 0, m); } in tr_heapsort() [all …]
|