Commit Graph

171 Commits

Author SHA1 Message Date
greg7mdp 45edb98cd9 Replace custom CompressedTuple with std::tuple. 2023-04-30 11:00:37 -04:00
greg7mdp 002f58edd1 Fix another clang-tidy warning 2023-04-23 19:51:43 -04:00
greg7mdp 16287ccca6 Cleanup some clang-tidy issues 2023-04-23 19:40:33 -04:00
greg7mdp 78071573aa Fix issue #117 - segfault when out of memory.
when constructing an object to be inserted throws std::bad_alloc, the slot was mark as used
(even though the object was not properly constructed), so eventually the destructor of a
non-initialized object was called causing a segfault.

Solution: mark the slot used only after the object is successfully constructed.
2023-04-15 20:22:50 -04:00
greg7mdp 3a4f3983a1 Fix a couple return type mismatches reported by clang-tidy. 2023-04-15 16:02:43 -04:00
greg7mdp 8540627c91 issue #187 - swap allocators only if permitted by AllocTraits 2023-04-08 21:12:42 -04:00
greg7mdp c36739b79f fix typo in comment (erase instead of _erase) 2022-11-29 09:19:25 -05:00
greg7mdp ab663358bc Remove deprecated use of std::aligned_storage. Issue #171 2022-11-05 16:11:40 -04:00
greg7mdp dc5bd3620e Disable assert causing duplicated hash calls when NDEBUG is not defined - issue #168 2022-10-03 09:09:34 -04:00
greg7mdp cc5b24b42c Fix file mode issue 2022-10-01 00:02:25 -04:00
greg7mdp a10ad015db Update phmap::Hash so that std::hash<Foo*> can be overridden - issue #168 2022-10-01 00:01:18 -04:00
greg7mdp f0409c6d05 Fix access of protected member, and add test for templated swap() 2022-09-11 12:16:35 -04:00
greg7mdp 0d912f754f Allow swapping parallel hash maps/sets with different mutex types 2022-09-11 10:07:32 -04:00
greg7mdp d62b8472a3 Add doc for parallel hashmap extended APIs, and remove some unnecessary casts in phmap.hpp 2022-07-25 22:57:43 -04:00
greg7mdp d24c47fdce Add with_submap api for parallel maps allowing access to submaps under lock protection 2022-07-25 21:37:43 -04:00
greg7mdp f71777d540 Small cleanup in StringHashEqT definition 2022-07-22 19:03:02 -04:00
greg7mdp 8650bcc503 Fix compiler warning in btree - issue #156 2022-07-22 10:22:44 -04:00
Patrick Fasano 6fc51c1b49 execution: Overloads of for_each and for_each_m taking ExecutionPolicy
* Adds additional overloads to `for_each` and `for_each_m` that accept execution policies.
* Execution policy is applied to the loop over subsets.
2022-07-21 12:19:58 -04:00
greg7mdp 01ea8093e6 use ADL lookup for erase_if instead of adding to std (gtl reported issue) 2022-06-25 14:55:26 -04:00
greg7mdp ce7710e9c3 Fix HashtableDebugAccess as in gtl 2022-06-21 21:03:16 -04:00
stdpain 40afe134cb fix wrong function type for parallel_hash_set::lazy_emplace_with_hash
in flat_hash_set the proto type is `iterator lazy_emplace_with_hash(const key_arg<K>& key, size_t& hashval, F&& f)`.
2022-06-21 20:54:33 +08:00
greg7mdp c34bb0e9a3 tentative fix for issue #145 2022-06-20 20:51:40 -04:00
greg7mdp 9e87d79404 Fix example to reflect new usage of lazy_emplace_l - issue #143 2022-06-20 19:54:26 -04:00
stdpain b03e4d38f1 Implement HashtableDebugAccess for parallel_hash_set 2022-06-20 19:45:17 +08:00
greg d8274d45ab add support for std::erase_if for hash containers - issue #141 2022-05-07 10:12:35 -04:00
greg 8c2d84b138 Better fix for iussue #136 2022-04-01 14:20:10 -04:00
greg 4368cd39f2 operator=() should preserve load_factor - issue #136 2022-04-01 14:01:39 -04:00
greg fd2a3f9b4a add some comments 2022-03-31 11:14:33 -04:00
greg 73be7c2ab2 manually merge some changes from abseil-cpp 2022-03-06 16:54:03 -05:00
greg bf2d3fe7a2 fix msvc support for issue #128 when flag /Zc:__cplusplus not specified 2022-02-08 14:10:10 -05:00
greg 7970234626 Fix for issue #128? 2022-02-05 21:39:20 -05:00
greg dab73d4b0e Undo latest change as I have issues building it with g++ 2022-01-31 20:53:22 -05:00
greg 22121fa3ce Fix compilation issue redux2 2022-01-31 18:00:43 -05:00
greg 0bd7be75e7 Fix compilation issue redux 2022-01-31 17:46:36 -05:00
greg 02923b2944 Fix compilation issue. 2022-01-31 17:33:48 -05:00
greg 0672f7d582 Fix compilation issue. 2022-01-31 17:28:25 -05:00
greg ed229ad169 Actual fix for issue #125 2022-01-31 17:19:09 -05:00
greg 7c092b78e3 remove unnecessary references 2022-01-25 08:59:48 -05:00
greg 43c4c86479 support most extended APIs for sets as we do for maps. 2022-01-22 21:15:55 -05:00
greg eaf6471e84 added insert_single API (issue #122) 2022-01-13 21:35:52 -05:00
greg 870e6eb9b5 Add binary dump/load cereal support for flat hash maps - Issue #120 2021-12-26 19:47:45 -05:00
greg 8a18882ca7 Revert "Fix (hopefully) part #2 of issue #117 for non-parallel hash maps"
This reverts commit 3f02d81926.
2021-11-18 22:02:51 -05:00
greg 3f02d81926 Fix (hopefully) part #2 of issue #117 for non-parallel hash maps 2021-11-18 21:47:59 -05:00
greg b0ac9ef70a tentative fix for issue #117 2021-11-18 20:41:45 -05:00
greg 07b740bd99 serialize.cc example doesn't seem to work with cereal #116 2021-11-09 21:32:08 -05:00
greg 3b5ecf0c2a add for_each extension api for safe keys iteration #113
Thanks @amitma1 for the changes
2021-11-02 16:50:45 -04:00
yanz 24a2418e4b add emplace_with_hash function to phmap::flat_hash_set 2021-09-23 18:34:37 +08:00
Binglin Chang fa18404b0e Add prefetch_hash for parrallel hash map/set 2021-09-07 14:25:00 +08:00
Brian McKinnon 1557461428 Performance improvement to if_contains and modify_if. Works with pointers rather than constructing iterators. A test I conducted which heavily uses these functions a ~10% improvement in runtime. 2021-05-12 19:59:02 -05:00
Gregory Popovitch b4efc91e7f use find_as_pair in erase_if_impl as well. 2021-05-08 07:07:50 -04:00