-
|
I would like to concurrently iterate over a parallel_flat_hash_map (read-only access). I could imagine that this is possible if for each thread I could assign a begin(), end() range that doesn't overlap, and I could imagine this would be efficient if I could get a begin() and end() for each of the submaps. Is there a public API for that, or is there an easy way to do it nevertheless? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Yes, this is definitely possible. You can also use |
Beta Was this translation helpful? Give feedback.
-
|
Looks good! |
Beta Was this translation helpful? Give feedback.
Yes, this is definitely possible.
You can use
with_submaporwith_submap_m(see here ) - use the second version with_mif you mutate the submaps.You can also use
get_inner. I don't have it in a current example, but here is a code fragment: