Lines Matching refs:siz
84 ZEND_API void zend_insert_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_… in zend_insert_sort() argument
90 zend_sort_2(base, (char *)base + siz, cmp, swp); in zend_insert_sort()
93 zend_sort_3(base, (char *)base + siz, (char *)base + siz + siz, cmp, swp); in zend_insert_sort()
97 size_t siz2 = siz + siz; in zend_insert_sort()
98 zend_sort_4(base, (char *)base + siz, (char *)base + siz2, (char *)base + siz + siz2, cmp, swp); in zend_insert_sort()
103 size_t siz2 = siz + siz; in zend_insert_sort()
104 …zend_sort_5(base, (char *)base + siz, (char *)base + siz2, (char *)base + siz + siz2, (char *)base… in zend_insert_sort()
111 char *end = start + (nmemb * siz); in zend_insert_sort()
112 size_t siz2= siz + siz; in zend_insert_sort()
113 char *sentry = start + (6 * siz); in zend_insert_sort()
114 for (i = start + siz; i < sentry; i += siz) { in zend_insert_sort()
115 j = i - siz; in zend_insert_sort()
120 j -= siz; in zend_insert_sort()
122 j += siz; in zend_insert_sort()
126 for (k = i; k > j; k -= siz) { in zend_insert_sort()
127 swp(k, k - siz); in zend_insert_sort()
130 for (i = sentry; i < end; i += siz) { in zend_insert_sort()
131 j = i - siz; in zend_insert_sort()
138 j += siz; in zend_insert_sort()
140 j += siz; in zend_insert_sort()
147 if (j == start + siz) { in zend_insert_sort()
148 j -= siz; in zend_insert_sort()
150 j += siz; in zend_insert_sort()
155 for (k = i; k > j; k -= siz) { in zend_insert_sort()
156 swp(k, k - siz); in zend_insert_sort()
248 ZEND_API void zend_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp) in zend_sort() argument
252 zend_insert_sort(base, nmemb, siz, cmp, swp); in zend_sort()
257 char *end = start + (nmemb * siz); in zend_sort()
259 char *pivot = start + (offset * siz); in zend_sort()
262 size_t delta = (offset >> Z_L(1)) * siz; in zend_sort()
263 zend_sort_5(start, start + delta, pivot, pivot + delta, end - siz, cmp, swp); in zend_sort()
265 zend_sort_3(start, pivot, end - siz, cmp, swp); in zend_sort()
267 swp(start + siz, pivot); in zend_sort()
268 pivot = start + siz; in zend_sort()
269 i = pivot + siz; in zend_sort()
270 j = end - siz; in zend_sort()
273 i += siz; in zend_sort()
278 j -= siz; in zend_sort()
283 j -= siz; in zend_sort()
289 i += siz; in zend_sort()
295 swp(pivot, i - siz); in zend_sort()
296 if ((i - siz) - start < end - i) { in zend_sort()
297 zend_sort(start, (i - start)/siz - 1, siz, cmp, swp); in zend_sort()
299 nmemb = (end - i)/siz; in zend_sort()
301 zend_sort(i, (end - i)/siz, siz, cmp, swp); in zend_sort()
302 nmemb = (i - start)/siz - 1; in zend_sort()