]> mj.ucw.cz Git - libucw.git/blobdiff - lib/sorter/array.h
Use a different file access method for small inputs.
[libucw.git] / lib / sorter / array.h
index 0f18741b451d1f4a1223c5817b29ac78a6726dcb..8cb05d3a445359397cdc807816b42b07b96044dc 100644 (file)
@@ -23,7 +23,7 @@
  *  ASORT_PREFIX(x) [*]        add a name prefix (used on all global names
  *                     defined by the sorter)
  *  ASORT_KEY_TYPE  [*]        data type of a single array entry key
- *  ASORT_LT(x,y)      x < y for ASORT_TYPE (default: "x<y")
+ *  ASORT_LT(x,y)      x < y for ASORT_KEY_TYPE (default: "x<y")
  *  ASORT_HASH(x)      a monotone hash function (safisfying hash(x) < hash(y) => x<y)
  *  ASORT_LONG_HASH    hashes are 64-bit numbers (default is 32 bits)
  *
@@ -62,7 +62,7 @@ typedef ASORT_KEY_TYPE Q(key);
 #endif
 
 #ifndef ASORT_RADIX_BITS
-#define ASORT_RADIX_BITS 12            // FIXME: Tune automatically?
+#define ASORT_RADIX_BITS CONFIG_UCW_RADIX_SORTER_BITS
 #endif
 #define ASORT_RADIX_MASK ((1 << (ASORT_RADIX_BITS)) - 1)
 
@@ -308,15 +308,14 @@ static Q(key) *Q(sort)(Q(key) *array, uns num_elts
   return ctx.array;
 }
 
-/* FIXME */
-#undef ASORT_PREFIX
+#undef ASORT_HASH
 #undef ASORT_KEY_TYPE
+#undef ASORT_LONG_HASH
 #undef ASORT_LT
-#undef ASORT_SWAP
-#undef ASORT_THRESHOLD
 #undef ASORT_PAGE_ALIGNED
-#undef ASORT_HASH
+#undef ASORT_PREFIX
 #undef ASORT_RADIX_BITS
 #undef ASORT_RADIX_MASK
-#undef ASORT_LONG_HASH
+#undef ASORT_SWAP
+#undef ASORT_THRESHOLD
 #undef Q