Lines Matching refs:cmp
24 static inline void zend_sort_2(void *a, void *b, compare_func_t cmp, swap_func_t swp) /* {{{ */ { in zend_sort_2() argument
25 if (cmp(a, b) > 0) { 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
32 if (!(cmp(a, b) > 0)) { in zend_sort_3()
33 if (!(cmp(b, c) > 0)) { in zend_sort_3()
37 if (cmp(a, b) > 0) { in zend_sort_3()
42 if (!(cmp(c, b) > 0)) { in zend_sort_3()
47 if (cmp(b, c) > 0) { 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()
55 if (cmp(c, d) > 0) { in zend_sort_4()
57 if (cmp(b, c) > 0) { in zend_sort_4()
59 if (cmp(a, b) > 0) { in zend_sort_4()
67 static void zend_sort_5(void *a, void *b, void *c, void *d, void *e, compare_func_t cmp, swap_func_… in zend_sort_5() argument
68 zend_sort_4(a, b, c, d, cmp, swp); in zend_sort_5()
69 if (cmp(d, e) > 0) { in zend_sort_5()
71 if (cmp(c, d) > 0) { in zend_sort_5()
73 if (cmp(b, c) > 0) { in zend_sort_5()
75 if (cmp(a, b) > 0) { in zend_sort_5()
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()
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()
116 if (!(cmp(j, i) > 0)) { in zend_insert_sort()
121 if (!(cmp(j, i) > 0)) { in zend_insert_sort()
132 if (!(cmp(j, i) > 0)) { in zend_insert_sort()
137 if (!(cmp(j, i) > 0)) { in zend_insert_sort()
139 if (!(cmp(j, i) > 0)) { in zend_insert_sort()
149 if (cmp(i, j) > 0) { 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()
272 while (cmp(pivot, i) > 0) { in zend_sort()
282 while (cmp(j, pivot) > 0) { 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()