mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-30 17:10:40 +08:00
Merge branch 'master' into mmap
This commit is contained in:
@@ -112,6 +112,7 @@ void mmap_load_parallel_flat_hash_map() {
|
||||
mp2[6771 + i] = i;
|
||||
}
|
||||
std::cout << "[debug] map capacity: " << mp2.capacity() << ", size: " << mp2.size() << std::endl;
|
||||
|
||||
for (const auto& n : mp2)
|
||||
std::cout << "key: " << n.first << ", value: " << n.second << "\n";
|
||||
}
|
||||
|
||||
Vendored
+1
-2
@@ -2329,7 +2329,7 @@ class parallel_hash_set
|
||||
KeyArg<IsTransparent<Eq>::value && IsTransparent<Hash>::value>;
|
||||
|
||||
static_assert(N <= 12, "N = 12 means 4096 hash tables!");
|
||||
constexpr static size_t num_tables = 1 << N;
|
||||
constexpr static size_t num_tables = 1 N;
|
||||
constexpr static size_t mask = num_tables - 1;
|
||||
|
||||
public:
|
||||
@@ -3162,7 +3162,6 @@ public:
|
||||
|
||||
template<typename InputArchive>
|
||||
bool mmap_load(InputArchive& ar);
|
||||
|
||||
private:
|
||||
template <class Container, typename Enabler>
|
||||
friend struct phmap::container_internal::hashtable_debug_internal::HashtableDebugAccess;
|
||||
|
||||
@@ -72,7 +72,6 @@ TEST(DumpLoad, ParallelFlatHashMap_uint64_uint32) {
|
||||
BinaryInputArchive ar_in("./dump.data");
|
||||
|
||||
EXPECT_TRUE(mp2.load(ar_in));
|
||||
|
||||
EXPECT_EQ(6, mp2.size());
|
||||
EXPECT_EQ(99, mp2[100]);
|
||||
EXPECT_EQ(299, mp2[300]);
|
||||
@@ -133,7 +132,6 @@ TEST(MmapDumpLoad, ParallelFlatHashMap_uint64_uint32) {
|
||||
MmapInputArchive ar_in("./dump.data");
|
||||
|
||||
EXPECT_TRUE(mp2.mmap_load(ar_in));
|
||||
|
||||
EXPECT_EQ(6, mp2.size());
|
||||
EXPECT_EQ(99, mp2[100]);
|
||||
EXPECT_EQ(299, mp2[300]);
|
||||
|
||||
Reference in New Issue
Block a user