1 #ifndef CGPERF_HASH_TABLE_H
2 #define CGPERF_HASH_TABLE_H
6 /*------------------------------------------------------------------------------------------------*/
7 #include "namespace/hash-table.h"
8 #include "namespace/keyword.h"
9 /*------------------------------------------------------------------------------------------------*/
10 /*{{{ constants and types */
11 /* to make double hashing efficient, there need to be enough spare entries */
17 /* a detail of the comparison function */
19 /* Statistics: Number of collisions so far. */
23 /* size of the vector */
25 /* vector of entries */
26 struct Keyword
**table
;
27 /*}}} private -- END */
29 /*}}} constants and types -- END */
30 /*{{{ public static methods */
31 static struct Hash_Table
*ht_new(u32 size
, bool ignore_length
);
32 static void ht_del(struct Hash_Table
*t
);
33 static struct Keyword
*ht_insert(struct Hash_Table
*t
, struct Keyword
*item
);
34 static void ht_dump(struct Hash_Table
*t
);
35 /*}}} public static methods -- END */
36 /*{{{ private static methods */
37 static bool ht_equal(struct Hash_Table
*t
, struct Keyword
*item1
, struct Keyword
*item2
);
38 /*}}} private static methods -- END */
39 /*------------------------------------------------------------------------------------------------*/
41 #include "namespace/hash-table.h"
42 #include "namespace/keyword.h"
44 /*------------------------------------------------------------------------------------------------*/