mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 08:34:39 +08:00
add support for absl::Mutex
This commit is contained in:
+5
-1
@@ -13,6 +13,10 @@
|
||||
#if 1
|
||||
#include <mutex>
|
||||
#define MTX std::mutex
|
||||
#elif 0
|
||||
// Abseil's mutexes are very efficient (at least on windows)
|
||||
#include "absl/synchronization/mutex.h"
|
||||
#define MTX absl::Mutex
|
||||
#elif 0
|
||||
#include <boost/thread/locks.hpp>
|
||||
#include <boost/thread/shared_mutex.hpp>
|
||||
@@ -415,7 +419,7 @@ int main(int argc, char ** argv)
|
||||
#endif
|
||||
else if(!strcmp(argv[2], "random"))
|
||||
{
|
||||
fprintf(stderr, "size = %llu\n", sizeof(hash));
|
||||
fprintf(stderr, "size = %zu\n", sizeof(hash));
|
||||
timer = _fill_random2(num_keys, hash);
|
||||
//out("random", num_keys, timer);
|
||||
//fprintf(stderr, "inserted %llu\n", hash.size());
|
||||
|
||||
Reference in New Issue
Block a user