]> mj.ucw.cz Git - libucw.git/commitdiff
Fixed a silly bug in the parallel radix-sorter.
authorMartin Mares <mj@ucw.cz>
Sun, 16 Sep 2007 20:16:21 +0000 (22:16 +0200)
committerMartin Mares <mj@ucw.cz>
Sun, 16 Sep 2007 20:16:21 +0000 (22:16 +0200)
lib/sorter/array.c

index cb8c7aa79f81f3d33511888aea9bced6f80d2382..e1805245ff4b1a609903fecca20120f7a8014416 100644 (file)
@@ -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;