Lines Matching refs:swp
28 …zend_qsort(void *base, size_t nmemb, size_t siz, compare_func_t compare, swap_func_t swp) /* {{{ */ in zend_qsort() argument
49 swp(begin, begin + (offset - (offset % siz))); in zend_qsort()
64 swp(seg1, seg2); in zend_qsort()
70 swp(begin, seg2); in zend_qsort()
93 static inline void zend_sort_2(void *a, void *b, compare_func_t cmp, swap_func_t swp) /* {{{ */ { in zend_sort_2() argument
95 swp(a, b); in zend_sort_2()
100 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
105 swp(b, c); in zend_sort_3()
107 swp(a, b); in zend_sort_3()
112 swp(a, c); in zend_sort_3()
115 swp(a, b); in zend_sort_3()
117 swp(b, c); in zend_sort_3()
122 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
123 zend_sort_3(a, b, c, cmp, swp); in zend_sort_4()
125 swp(c, d); in zend_sort_4()
127 swp(b, c); in zend_sort_4()
129 swp(a, b); in zend_sort_4()
136 …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
137 zend_sort_4(a, b, c, d, cmp, swp); in zend_sort_5()
139 swp(d, e); in zend_sort_5()
141 swp(c, d); in zend_sort_5()
143 swp(b, c); in zend_sort_5()
145 swp(a, b); in zend_sort_5()
153 …d_insert_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp) /* {{{ */{ in zend_insert_sort() argument
159 zend_sort_2(base, (char *)base + siz, cmp, swp); in zend_insert_sort()
162 zend_sort_3(base, (char *)base + siz, (char *)base + siz + siz, cmp, swp); in zend_insert_sort()
167 zend_sort_4(base, (char *)base + siz, (char *)base + siz2, (char *)base + siz + siz2, cmp, swp); in zend_insert_sort()
173 …)base + siz, (char *)base + siz2, (char *)base + siz + siz2, (char *)base + siz2 + siz2, cmp, swp); in zend_insert_sort()
196 swp(k, k - siz); in zend_insert_sort()
225 swp(k, k - siz); in zend_insert_sort()
317 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
321 zend_insert_sort(base, nmemb, siz, cmp, swp); in zend_sort()
332 zend_sort_5(start, start + delta, pivot, pivot + delta, end - siz, cmp, swp); in zend_sort()
334 zend_sort_3(start, pivot, end - siz, cmp, swp); in zend_sort()
336 swp(start + siz, pivot); in zend_sort()
357 swp(i, j); in zend_sort()
364 swp(pivot, i - siz); in zend_sort()
366 zend_sort(start, (i - start)/siz - 1, siz, cmp, swp); in zend_sort()
370 zend_sort(i, (end - i)/siz, siz, cmp, swp); in zend_sort()