* 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_THRESHOLD threshold for switching between quicksort and insertsort
- * ASORT_PAGE_ALIGNED the array is guaranteed to be aligned to a multiple of CPU_PAGE_SIZE (FIXME: Do we need this?)
* ASORT_HASH(x) a monotone hash function (safisfying hash(x) < hash(y) => x<y)
- * ASORT_RADIX_BITS FIXME
- * ASORT_SWAP FIXME: probably keep private
+ * ASORT_LONG_HASH hashes are 64-bit numbers (default is 32 bits)
+ *
+ * Fine-tuning parameters: (if you really insist)
+ *
+ * ASORT_THRESHOLD threshold for switching between quicksort and insertsort
+ * ASORT_RADIX_BITS how many bits of the hash functions are to be used at once for
+ * radix-sorting.
*
* After including this file, a function
* ASORT_KEY_TYPE *ASORT_PREFIX(sort)(ASORT_KEY_TYPE *array, uns num_elts, ASORT_KEY_TYPE *buf, uns hash_bits)
#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))
+# define ASORT_HASH(x) P(hash)(&(x))
+# ifdef SORT_LONG_HASH
+# define ASORT_LONG_HASH
+# endif
#endif
#include "lib/sorter/array.h"
#define ASORT_PREFIX(x) SORT_PREFIX(array_##x)
#define ASORT_KEY_TYPE P(internal_item_t)
#define ASORT_LT(x,y) (P(compare)((x).key, (y).key) < 0)
- #define ASORT_PAGE_ALIGNED
+#ifdef SORT_INTERNAL_RADIX
+# define ASORT_HASH(x) P(hash)((x).key)
+# ifdef SORT_LONG_HASH
+# define ASORT_LONG_HASH
+# endif
+#endif
#include "lib/sorter/array.h"
/*