Implement concurrent data structures for Issue #2235#6897
Implement concurrent data structures for Issue #2235#6897hkaiser merged 21 commits intoTheHPXProject:masterfrom
Conversation
21b5c5e to
0e8bded
Compare
|
Can one of the admins verify this patch? |
hkaiser
left a comment
There was a problem hiding this comment.
Thank you for working on this!
However, I believe the data structures you added are not thread-safe in the sense that they expose non-safe iterators and allow direct access to the stored data elements through unsafe access functions (like operator[]()).
0e8bded to
9bed640
Compare
06c91ef to
ce0e874
Compare
hkaiser
left a comment
There was a problem hiding this comment.
Similar comments apply to the other data structures you proposed.
9b60756 to
355df91
Compare
4c4a452 to
cf3f1e1
Compare
b7d3b5a to
5218e5a
Compare
hkaiser
left a comment
There was a problem hiding this comment.
@guptapratykshh This pr starts to get in shape. There is still the issue fo the iterator interface exposed by the new concurrent_vector. Also we need to make a decision on whether to (conditionally) support the transparent key functionality introduced in C++26. I'd love to hear your oppinion on the latter.
|
thanks for the feedback,on the iterators, you are right. the current std::vector wrapper is definitely a bottleneck. i will redo internal storage using a segmented design to ensure iterators stay stable even when the vector grows i did also support transparent keys. avoiding temporary allocations on lookups is a clear performance win that fits HPX perfectly |
I don't think we need iterators to be exposed from the
If you want to add those, you will need to add a feature test that ensures transparent keys are supported by the underlying standard containers. |
|
inspect is unhappy still as well: |
177fe5e to
0588fe6
Compare
|
There are still open comments, please have a look. Also, please rebase this onto current master to resolve potential compilation problems. |
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
…ents Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
…n signature Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
- Removed non-thread-safe random access iterators from concurrent_vector. - Added thread-safe for_each iteration API (consistent with Map/Set). - Modified grow_by to return the index (size_type) instead of an iterator. - Added unit tests for new for_each and grow_by behavior in vector. Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
…e exports Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
…ke-format Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
…plication Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
0588fe6 to
0adb5f4
Compare
|
@hkaiser i think this is ready to be shipped, if any reviews will look into that |
|
@guptapratykshh Thank you for your patience with this! Good job! |
Fixes #2235
Proposed Changes
Any background context you want to provide?
Checklist
Not all points below apply to all pull requests.