Are there thread safe graph libraries for C ++?

Basically, I'm looking for a graph library that would have a fine-grained blocking of graph operations, so that different threads affecting different parts of the graph could change it at the same time, and competing changes could be blocked.

I walked a bit and found nothing. Perhaps this is too specific for my needs, but I would suggest that there are a large number of scientific applications that will work on large graphs.

+5
source share
3 answers

You can take a look at the Parallel Boost Graph Library (and possibly the Multithreaded Graph Library ). I have not used myself yet, I just stumbled upon them, considering parallelism as an option to speed up some BGL . (Ah ... it looks like Parallel-BGL is officially officially in boost ! There's a good architectural overview , but maybe their concept of a "distributed graph" is rather rude compared to what you had in mind).

+2
source

, (, , GraphBase), - , , , , , .

, "" - , , , , , , , , - , " ", , , - ( ) , .

( - , ):

? ? ? ? ? , ?

- , - - , , "putIfAbsent", , , -safety - , (, ) .

, - . , - , , - , .

, , , ( ) , (, ) , , .

, , , , ( ) - , ​​ , , ( ) . Java , Vector, ArrayList StringBuffer vs StringBuilder.

, , ( ), , , - . , ++.

. , , , , , , , parallelism , .

+1

Unfortunately, the cost of fine-grained blocking is probably higher than the acceleration from multiple threads. Not to mention the risk of deadlock, locking management becomes much more difficult if you have more than a very small number of mutexes.

+1
source

All Articles