From: Martin Mares Date: Sat, 10 Feb 2007 18:14:31 +0000 (+0100) Subject: Radix-sorting is not compatible with custom presort. X-Git-Tag: holmes-import~506^2~13^2~148 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=a8933d0fae1331ed903bd314eb170754a6d1ddf7;p=libucw.git Radix-sorting is not compatible with custom presort. --- diff --git a/lib/sorter/govern.c b/lib/sorter/govern.c index 388fac4a..c1ef332c 100644 --- a/lib/sorter/govern.c +++ b/lib/sorter/govern.c @@ -171,7 +171,9 @@ sorter_twoway(struct sort_context *ctx, struct sort_bucket *b) static uns sorter_radix_bits(struct sort_context *ctx, struct sort_bucket *b) { - if (!b->hash_bits || !ctx->radix_split || (sorter_debug & SORT_DEBUG_NO_RADIX)) + if (!b->hash_bits || !ctx->radix_split || + (b->flags & SBF_CUSTOM_PRESORT) || + (sorter_debug & SORT_DEBUG_NO_RADIX)) return 0; u64 in = sbuck_size(b); @@ -187,7 +189,7 @@ sorter_radix_bits(struct sort_context *ctx, struct sort_bucket *b) } static void - sorter_radix(struct sort_context *ctx, struct sort_bucket *b, uns bits) +sorter_radix(struct sort_context *ctx, struct sort_bucket *b, uns bits) { uns nbuck = 1 << bits; SORT_XTRACE(2, "Running radix sort on %s with %d bits of %d (expected size %s)",