Lines Matching refs:swp
24 static inline void zend_sort_2(void *a, void *b, compare_func_t cmp, swap_func_t swp) /* {{{ */ { in zend_sort_2() argument
26 swp(a, b); in zend_sort_2()
31 static inline void zend_sort_3(void *a, void *b, void *c, compare_func_t cmp, swap_func_t swp) /* {… in zend_sort_3() argument
36 swp(b, c); in zend_sort_3()
38 swp(a, b); in zend_sort_3()
43 swp(a, c); in zend_sort_3()
46 swp(a, b); in zend_sort_3()
48 swp(b, c); in zend_sort_3()
53 static void zend_sort_4(void *a, void *b, void *c, void *d, compare_func_t cmp, swap_func_t swp) /*… in zend_sort_4() argument
54 zend_sort_3(a, b, c, cmp, swp); in zend_sort_4()
56 swp(c, d); in zend_sort_4()
58 swp(b, c); in zend_sort_4()
60 swp(a, b); in zend_sort_4()
67 …ort_5(void *a, void *b, void *c, void *d, void *e, compare_func_t cmp, swap_func_t swp) /* {{{ */ { in zend_sort_5() argument
68 zend_sort_4(a, b, c, d, cmp, swp); in zend_sort_5()
70 swp(d, e); in zend_sort_5()
72 swp(c, d); in zend_sort_5()
74 swp(b, c); in zend_sort_5()
76 swp(a, b); in zend_sort_5()
84 …d_insert_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp) /* {{{ */{ 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()
98 zend_sort_4(base, (char *)base + siz, (char *)base + siz2, (char *)base + siz + siz2, cmp, swp); in zend_insert_sort()
104 …)base + siz, (char *)base + siz2, (char *)base + siz + siz2, (char *)base + siz2 + siz2, cmp, swp); in zend_insert_sort()
127 swp(k, 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()
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()
288 swp(i, j); in zend_sort()
295 swp(pivot, i - siz); in zend_sort()
297 zend_sort(start, (i - start)/siz - 1, siz, cmp, swp); in zend_sort()
301 zend_sort(i, (end - i)/siz, siz, cmp, swp); in zend_sort()