]> mj.ucw.cz Git - libucw.git/blobdiff - lib/sorter/s-fixint.h
Merge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git#dev-sorter
[libucw.git] / lib / sorter / s-fixint.h
index 6eac13bb49780fc5c78c5d8daa4796d94fcc7ee6..d901a064d34d4881a8393835b90e652b81f37335 100644 (file)
 #define ASORT_PREFIX(x) SORT_PREFIX(array_##x)
 #define ASORT_KEY_TYPE P(key)
 #define ASORT_LT(x,y) (P(compare)(&(x), &(y)) < 0)
 #define ASORT_PREFIX(x) SORT_PREFIX(array_##x)
 #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))
+#    ifdef SORT_LONG_HASH
+#      define ASORT_LONG_HASH
+#    endif
+#endif
 #include "lib/sorter/array.h"
 
 /*
 #include "lib/sorter/array.h"
 
 /*
@@ -30,7 +35,7 @@ static size_t P(internal_workspace)(void)
 #ifdef SORT_UNIFY
   workspace = sizeof(P(key) *);
 #endif
 #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;
   workspace = MAX(workspace, sizeof(P(key)));
 #endif
   return workspace;
@@ -68,7 +73,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,
   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
     workspace, bin->hash_bits
 #else
     NULL, 0