From: Martin Mares Date: Sun, 16 Sep 2007 20:16:21 +0000 (+0200) Subject: Fixed a silly bug in the parallel radix-sorter. X-Git-Tag: holmes-import~506^2~13^2~8 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=c17cb4c9cab83f2d7430ed7a0dc3d6b7dc984e31;p=libucw.git Fixed a silly bug in the parallel radix-sorter. --- 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;