Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

graph algorithms

sushiljacksparrow
417 Views
hello.. i am student and i am looking to implement a graph library using tbb.. i am running out of ideas on following points...

1) how to store the graph
2) how to determine the grainsize
3) how to implement basic functionalities like graph traversal using dfs,bfs or determing if graph is bipartite or not... sm1 please help....!!!!
0 Kudos
4 Replies
vu64
Beginner
417 Views
hello.. i am student and i am looking to implement a graph library using tbb.. i am running out of ideas on following points...

1) how to store the graph
2) how to determine the grainsize
3) how to implement basic functionalities like graph traversal using dfs,bfs or determing if graph is bipartite or not... sm1 please help....!!!!
Have a look at the Boost Graph Library. Download Boost C++ library (boost.org) and look in the folder boost_1_40_0/libs/graph_parallel. You will find both the code and documentation. (There is also a serial version. This new parallel version has just been intergrated into Boost and the documentation on the website has not been updated. Use the doc in the libs directory). It would be nice if you can reimplement the Boost Graph library in TBB.
0 Kudos
Bartlomiej
New Contributor I
417 Views
Also have a look at TBB examples - the one concerning parallel_do is about traversing a directed acycyclic graph.

0 Kudos
sushiljacksparrow
417 Views
Quoting - Bartlomiej
Also have a look at TBB examples - the one concerning parallel_do is about traversing a directed acycyclic graph.

i am not sure how much it helps.. i am finding it very clumsy.. to say atleast...
0 Kudos
Bartlomiej
New Contributor I
417 Views
i am not sure how much it helps.. i am finding it very clumsy.. to say atleast...

You, know, I'm not a TBB developer, so don't blame me for the code, but what exactly do you see clumsy about this code?
0 Kudos
Reply