Lines Matching refs:width
45 static void cycle(size_t width, unsigned char* ar[], int n)
56 while(width) {
57 l = sizeof(tmp) < width ? sizeof(tmp) : width;
63 width -= l;
92 static void sift(unsigned char *head, size_t width, cmpfun cmp, void *arg, int pshift, size_t lp[])
100 rt = head - width;
101 lf = head - width - lp[pshift - 2];
116 cycle(width, ar, i);
119 static void trinkle(unsigned char *head, size_t width, cmpfun cmp, void *arg, size_t pp[2], int pshift, int trusty, size_t lp[])
138 rt = head - width;
139 lf = head - width - lp[pshift - 2];
153 cycle(width, ar, i);
154 sift(head, width, cmp, arg, pshift, lp);
158 void __qsort_r(void *base, size_t nel, size_t width, cmpfun cmp, void *arg)
161 size_t i, size = width * nel;
170 high = head + size - width;
172 /* Precompute Leonardo numbers, scaled by element width */
173 for(lp[0]=lp[1]=width, i=2; (lp[i]=lp[i-2]+lp[i-1]+width) < size; i++);
177 sift(head, width, cmp, arg, pshift, lp);
182 trinkle(head, width, cmp, arg, p, pshift, 0, lp);
184 sift(head, width, cmp, arg, pshift, lp);
197 head += width;
200 trinkle(head, width, cmp, arg, p, pshift, 0, lp);
212 trinkle(head - lp[pshift] - width, width, cmp, arg, p, pshift + 1, 1, lp);
215 trinkle(head - width, width, cmp, arg, p, pshift, 1, lp);
217 head -= width;