This repository was archived by the owner on Sep 27, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/include/common/container Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 18
18
#include < cstdio>
19
19
20
20
#include " libcuckoo/cuckoohash_map.hh"
21
+ #include " libcuckoo/default_hasher.hh"
21
22
22
23
namespace peloton {
23
24
24
25
// CUCKOO_MAP_TEMPLATE_ARGUMENTS
25
26
#define CUCKOO_MAP_TEMPLATE_ARGUMENTS template <typename KeyType, \
26
- typename ValueType>
27
+ typename ValueType, typename HashType >
28
+
29
+ // CUCKOO_MAP_DEFAULT_ARGUMENTS
30
+ #define CUCKOO_MAP_DEFAULT_ARGUMENTS template <typename KeyType, \
31
+ typename ValueType, typename HashType = DefaultHasher<KeyType> >
27
32
28
33
// CUCKOO_MAP_TYPE
29
- #define CUCKOO_MAP_TYPE CuckooMap<KeyType, ValueType>
34
+ #define CUCKOO_MAP_TYPE CuckooMap<KeyType, ValueType, HashType >
30
35
31
36
// Iterator type
32
37
#define CUCKOO_MAP_ITERATOR_TYPE \
33
38
typename cuckoohash_map<KeyType, ValueType>::locked_table
34
39
35
- CUCKOO_MAP_TEMPLATE_ARGUMENTS
40
+ CUCKOO_MAP_DEFAULT_ARGUMENTS
36
41
class CuckooMap {
37
42
public:
38
43
@@ -72,7 +77,7 @@ class CuckooMap {
72
77
private:
73
78
74
79
// cuckoo map
75
- typedef cuckoohash_map<KeyType, ValueType> cuckoo_map_t ;
80
+ typedef cuckoohash_map<KeyType, ValueType, HashType > cuckoo_map_t ;
76
81
77
82
cuckoo_map_t cuckoo_map;
78
83
};
You can’t perform that action at this time.
0 commit comments