greg7mdp
7ef2e73341
Minor changes, mostly formatting and avoiding nvcc warnings.
2024-03-16 16:30:31 -04:00
Ali Ghaffaari
50fa648ae0
Fix nvcc warning about missing return statement ( #235 )
2024-03-11 18:21:20 -04:00
greg7mdp
67c24619e4
Fix nvcc warnings - issue #229
2024-02-04 10:18:44 -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
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
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
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
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
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
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
292c29dd9d
Cleanup some compilation warnings with old gcc compiler.
2023-06-25 14:48:00 -04: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
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