Lines Matching refs:nmemb
108 * There are two cases. If j == nmemb, select largest of Ki and Kj. If
109 * j < nmemb, select largest of Ki, Kj and Kj+1.
111 #define CREATE(initval, nmemb, par_i, child_i, par, child, size, count, tmp) { \
112 for (par_i = initval; (child_i = par_i * 2) <= nmemb; \
115 if (child_i < nmemb && \
144 #define SELECT(par_i, child_i, nmemb, par, child, size, k, count, tmp1, tmp2) { \
145 for (par_i = 1; (child_i = par_i * 2) <= nmemb; par_i = child_i) { \
147 if (child_i < nmemb && \
177 kheapsort_r(void *vbase, size_t nmemb, size_t size,
182 heapsort_r(void *vbase, size_t nmemb, size_t size,
196 if (nmemb <= 1)
212 * Items are numbered from 1 to nmemb, so offset from size bytes
217 for (l = nmemb / 2 + 1; --l;)
218 CREATE(l, nmemb, i, j, t, p, size, cnt, tmp);
225 while (nmemb > 1) {
226 COPY(k, base + nmemb * size, cnt, size, tmp1, tmp2);
227 COPY(base + nmemb * size, base + size, cnt, size, tmp1, tmp2);
228 --nmemb;
229 SELECT(i, j, nmemb, t, p, size, k, cnt, tmp1, tmp2);