Lines Matching refs:curr
271 size_t curr; in COUNT_RUN() local
285 curr = start + 2; in COUNT_RUN()
290 if (curr == size - 1) { in COUNT_RUN()
294 if (SORT_CMP(dst[curr - 1], dst[curr]) > 0) { in COUNT_RUN()
298 curr++; in COUNT_RUN()
301 return curr - start; in COUNT_RUN()
305 if (curr == size - 1) { in COUNT_RUN()
309 if (SORT_CMP(dst[curr - 1], dst[curr]) <= 0) { in COUNT_RUN()
313 curr++; in COUNT_RUN()
317 REVERSE_ELEMENTS(dst, start, curr - 1); in COUNT_RUN()
318 return curr - start; in COUNT_RUN()
375 const size_t curr = stack[stack_curr - 2].start; in TIM_SORT_MERGE() local
383 memcpy(storage, &dst[curr], A * sizeof(SORT_TYPE)); in TIM_SORT_MERGE()
385 j = curr + A; in TIM_SORT_MERGE()
387 for (k = curr; k < curr + A + B; k++) { in TIM_SORT_MERGE()
388 if ((i < A) && (j < curr + A + B)) { in TIM_SORT_MERGE()
402 memcpy(storage, &dst[curr + A], B * sizeof(SORT_TYPE)); in TIM_SORT_MERGE()
404 j = curr + A; in TIM_SORT_MERGE()
405 k = curr + A + B; in TIM_SORT_MERGE()
407 while (k-- > curr) { in TIM_SORT_MERGE()
408 if ((i > 0) && (j > curr)) { in TIM_SORT_MERGE()
493 size_t *curr) { in PUSH_NEXT() argument
494 size_t len = COUNT_RUN(dst, *curr, size); in PUSH_NEXT()
497 if (run > size - *curr) { in PUSH_NEXT()
498 run = size - *curr; in PUSH_NEXT()
502 BINARY_INSERTION_SORT_START(&dst[*curr], len, run); in PUSH_NEXT()
506 run_stack[*stack_curr].start = *curr; in PUSH_NEXT()
509 *curr += len; in PUSH_NEXT()
511 if (*curr == size) { in PUSH_NEXT()
535 size_t curr = 0; in TIM_SORT() local
554 if (!PUSH_NEXT(dst, size, store, minrun, run_stack, &stack_curr, &curr)) { in TIM_SORT()
558 if (!PUSH_NEXT(dst, size, store, minrun, run_stack, &stack_curr, &curr)) { in TIM_SORT()
562 if (!PUSH_NEXT(dst, size, store, minrun, run_stack, &stack_curr, &curr)) { in TIM_SORT()
572 if (!PUSH_NEXT(dst, size, store, minrun, run_stack, &stack_curr, &curr)) { in TIM_SORT()