greg7mdp
65775fa09f
Update version to 1.3.12
v1.3.12
2024-01-28 23:18:32 -05:00
Gregory Popovitch
946ebad67a
Fix warnings with msvc. ( #225 )
...
* Fix warnings with msvc.
* Fix more warnings.
2023-12-09 12:23:51 -05:00
greg7mdp
d3f0b986bf
tentative fix for #224 .
2023-12-09 08:59:03 -05:00
Gregory Popovitch
0f0ecf724c
implement erase using erase_if_impl ( #223 )
2023-11-30 10:15:46 -05:00
Gregory Popovitch
4c93cf00f2
Remove the Upgrade lock stuff. ( #221 )
...
* Remove the `Upgrade` lock stuff.
* Need to repeat the `find()` if we released the mutex to get a write lock.
* Add a couple `assert`s.
2023-11-29 13:16:09 -05:00
bpmckinnon
7556c955d4
Add access to the slot in the lazy constructor. There is a specific use case where I want to cache a pointer to the newly created lazy object. If the capacity of the map does not change between the first and second call of my function, then I use the pointer instead of repeating the lookup. ( #219 )
...
Fixed an initialization order issue in ReadWriteLock
Fix the return value of lazy_emplace and lazy_emplace_with_hash.
2023-11-29 09:15:02 -05:00
greg7mdp
9248dcf07e
Add support for Windows phmap::srwlock
2023-11-19 18:14:48 -05:00
greg7mdp
d51c761733
Reduce verbosity with using directives.
2023-11-19 17:38:36 -05:00
Gregory Popovitch
4d7b07f526
Support ReadWriteLocks in more parallel map APIs. ( #217 )
2023-11-19 15:57:03 -05:00
greg7mdp
2ee44550e1
Whitespace changes (cleanup)
2023-11-18 23:29:47 -05:00
Gregory Popovitch
0046905791
Merge pull request #216 from greg7mdp/try_emplace_fine_locking
...
For parallel maps with read-capable mutexes, do read lock for lookup in `try_emplace_l`
2023-11-15 18:30:26 -05:00
greg7mdp
ff7bd78206
Take care of the case where another thread inserts the same key between unlock()/lock()
2023-11-13 09:48:49 -05:00
greg7mdp
21f14d7a8e
Add support for read/write locks
2023-11-12 18:50:18 -05:00
Gregory Popovitch
401552da80
Merge pull request #211 from bpmckinnon/OptimizeEraseIf
...
Optimization for parallel hash map erase_if function
2023-10-19 14:53:20 -04:00
Brian McKinnon
749a283bf3
Optimization for parallel hash map erase_if function. Deals only with inner set iterators to avoid overhead of using parallel map iterators.
...
Silence a constexpr warning in allocator test
2023-10-19 13:26:47 -05:00
greg7mdp
9f52b30958
Fix incorrect constant in reserve.
2023-10-09 17:24:06 -04:00
greg7mdp
b6ad902d48
Add reserve in p_bench.cc
2023-10-09 17:15:37 -04:00
greg7mdp
7e2b66c2b2
set include_directories only when needed.
2023-10-08 21:03:15 -04:00
greg7mdp
623f4c06d9
Add interesting benchmark by @samuelpmish
2023-10-08 20:00:32 -04:00
Gregory Popovitch
c2fabc9ac0
Merge pull request #209 from jendrikseipp/patch-1
...
Allow compiling with -Wfloat-conversion
2023-10-01 17:25:05 -04:00
Gregory Popovitch
0412b85b08
Static cast to float after division.
2023-10-01 17:24:20 -04:00
Jendrik Seipp
b0f117d58e
Allow compiling with -Wfloat-conversion
2023-10-01 23:05:30 +02:00
greg7mdp
a7909d547c
Unused variable warning (issue #208 ) and remove c++17 dependency.
2023-09-29 10:36:21 -04:00
Gregory Popovitch
81ca453769
Merge pull request #206 from ecatmur/try-emplace-p
...
Add try_emplace_p extension method
2023-09-11 20:16:37 -04:00
Ed Catmur
4468822524
Add try_emplace_p extension method
...
Iterators are invalidated by concurrent insertion (rehash, resize, etc...) whereas for node-based containers, pointers are only invalidated by erase/clear.
2023-09-12 00:31:30 +01:00
greg7mdp
3362017f22
Fix issue with my previous change for issue #205
2023-09-03 23:48:09 -04:00
greg7mdp
38ded9bba8
Simplify clear() and avoid iterating when values have trivial destructor.
...
Resolves #205 .
2023-09-02 14:47:18 -04:00
greg7mdp
df7935aca3
Fix iteration and union display in phmap_lldb.py - issue #204
2023-07-30 11:34:00 -04:00
Gregory Popovitch
77cab8192a
Merge pull request #202 from ecatmur/clang-cc17
...
Fix C++17 detection for clang
2023-06-28 15:47:56 -04:00
Ed Catmur
2ac0518a81
Fix C++17 detection for clang
...
Clang (even recent, e.g. llvm 16) sets __GNUC__ to 4, so the check for C++17 fails.
This results in the check for invoke_result_t in phmap_base.h failing, so it uses std::result_of, which is removed entirely in recent libc++, breaking the build.
2023-06-28 14:30:07 -05:00
greg7mdp
93201da2ba
Add hash_bench benchmark for hash functions.
2023-06-25 21:36:38 -04:00
greg7mdp
548b7f6629
Update .gitignore
2023-06-25 19:42:10 -04:00
greg7mdp
f67dadd00a
Fix compilation errors with gcc 4.8.5
...
Thanks to @aengusjiang for the initial PR, which I updated to simplify and fix compilation issues on windows.
2023-06-25 14:48:33 -04:00
greg7mdp
292c29dd9d
Cleanup some compilation warnings with old gcc compiler.
2023-06-25 14:48:00 -04:00
Gregory Popovitch
79cbd2dafd
Merge pull request #197 from ilobilo/master
...
remove unnecessary creation of std *_error objects
2023-06-11 13:43:33 -04:00
ilobilo
b54ef015de
remove unnecessary creation of std *_error objects
...
remove creation and then casting to (void) of std::*_error objects if exceptions are disabled
2023-06-11 21:11:32 +04:00
greg7mdp
714d70b6ca
Fix clang "thread-safety-analysis" warnings - issue #196
2023-06-11 10:02:00 -04:00
Gregory Popovitch
a4ae6cc1be
Merge pull request #195 from LisaLuty/fix/add_growth_left_for_dump_and_load
...
Fix issue when using `phmap_dump/load` where `growth_left` is not restored correctly.
2023-05-30 08:25:21 -04:00
Gregory Popovitch
07e93a8d91
minor change and add comment
2023-05-30 08:22:17 -04:00
tingyu
875d5e48e5
fix: add version to make dump & load compatible with previous files
2023-05-30 14:21:39 +08:00
lisa0916lisa@163.com
8c8550dcb5
fix: add growth_left for dump and load, to fix the bug that when loading from a phmap which has a lot of deleted slots may cause further inserts to hang
2023-05-30 00:09:40 +08:00
greg7mdp
1df34e5616
remove commented lines
2023-05-21 17:14:47 -04:00
greg7mdp
a68a9b50b0
Fix unused variable warning (issue #194 )
2023-05-17 10:32:47 -04:00
Gregory Popovitch
a93855202b
Merge pull request #193 from barracuda156/darwin
...
Fixes for macOS and 32-bit
2023-05-16 09:53:13 -04:00
Sergey Fedorov
4b113aac1b
Update parallel_hashmap/phmap_config.h
...
Co-authored-by: Gregory Popovitch <greg7mdp@gmail.com >
2023-05-16 21:11:08 +08:00
Sergey Fedorov
47ee627eab
Unbreak build on Apple with GCC: do not use clangism
...
Fixes: https://github.com/greg7mdp/parallel-hashmap/issues/192
2023-05-16 20:06:11 +08:00
Sergey Fedorov
0e534ee7e0
Warn on 4-byte char, not err out
2023-05-16 20:03:36 +08:00
greg7mdp
56a2e5344e
remove sizeof checks which differ between windows and linux.
2023-04-30 11:48:50 -04:00
greg7mdp
2e552bb112
remove sizeof checks which differ between windows and linux.
2023-04-30 11:29:59 -04:00
greg7mdp
45edb98cd9
Replace custom CompressedTuple with std::tuple.
2023-04-30 11:00:37 -04:00