X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fsorter%2Fs-fixint.h;h=7aafa7de8965dce8e096b9fc8a256b21a3c121fa;hb=15a2b6d5ef43218fc66b95e4c24b152934feb77e;hp=6eac13bb49780fc5c78c5d8daa4796d94fcc7ee6;hpb=0ce1209ffd78ede3a5d353393e281cc6a7995cd3;p=libucw.git diff --git a/lib/sorter/s-fixint.h b/lib/sorter/s-fixint.h index 6eac13bb..7aafa7de 100644 --- a/lib/sorter/s-fixint.h +++ b/lib/sorter/s-fixint.h @@ -13,6 +13,9 @@ #define ASORT_KEY_TYPE P(key) #define ASORT_LT(x,y) (P(compare)(&(x), &(y)) < 0) #define ASORT_PAGE_ALIGNED +#ifdef SORT_INTERNAL_RADIX +#define ASORT_HASH(x) P(hash)(&(x)) +#endif #include "lib/sorter/array.h" /* @@ -30,7 +33,7 @@ static size_t P(internal_workspace)(void) #ifdef SORT_UNIFY workspace = sizeof(P(key) *); #endif -#ifdef SORT_HASH_BITS // FIXME: Another switch? +#ifdef SORT_INTERNAL_RADIX workspace = MAX(workspace, sizeof(P(key))); #endif return workspace; @@ -68,7 +71,7 @@ static int P(internal)(struct sort_context *ctx, struct sort_bucket *bin, struct timestamp_t timer; init_timer(&timer); buf = P(array_sort)(buf, n, -#ifdef SORT_HASH_BITS +#ifdef SORT_INTERNAL_RADIX workspace, bin->hash_bits #else NULL, 0