From c17cb4c9cab83f2d7430ed7a0dc3d6b7dc984e31 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 16 Sep 2007 22:16:21 +0200 Subject: [PATCH] Fixed a silly bug in the parallel radix-sorter. --- lib/sorter/array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sorter/array.c b/lib/sorter/array.c index cb8c7aa7..e1805245 100644 --- a/lib/sorter/array.c +++ b/lib/sorter/array.c @@ -332,7 +332,7 @@ rs_radix(struct asort_context *ctx, void *array, void *buffer, uns num_elts, uns uns n = cnt[i] - pos; if (!n) continue; - if (n * ctx->elt_size < sorter_thread_threshold) + if (n * ctx->elt_size < sorter_thread_threshold || shift < ASORT_MIN_SHIFT) { struct rs_work *w = ep_alloc(ctx->eltpool); w->w.priority = 0; -- 2.39.2