Lines Matching defs:nmemb
77 * There two cases. If j == nmemb, select largest of Ki and Kj. If
78 * j < nmemb, select largest of Ki, Kj and Kj+1.
80 #define CREATE(initval, nmemb, par_i, child_i, par, child, size, count, tmp) { \
81 for (par_i = initval; (child_i = par_i * 2) <= nmemb; \
84 if (child_i < nmemb && COMPAR(child, child + size) < 0) { \
112 #define SELECT(par_i, child_i, nmemb, par, child, size, k, count, tmp1, tmp2) { \
113 for (par_i = 1; (child_i = par_i * 2) <= nmemb; par_i = child_i) { \
115 if (child_i < nmemb && COMPAR(child, child + size) < 0) { \
143 heapsort(void *vbase, size_t nmemb, size_t size,
150 if (nmemb <= 1)
162 * Items are numbered from 1 to nmemb, so offset from size bytes
167 for (l = nmemb / 2 + 1; --l;)
168 CREATE(l, nmemb, i, j, t, p, size, cnt, tmp);
175 while (nmemb > 1) {
176 COPY(k, base + nmemb * size, cnt, size, tmp1, tmp2);
177 COPY(base + nmemb * size, base + size, cnt, size, tmp1, tmp2);
178 --nmemb;
179 SELECT(i, j, nmemb, t, p, size, k, cnt, tmp1, tmp2);