10-30-2009 11:15 PM
hii all. iam a student. i implemented the parallel version of kruskal using tbb as a project. iam attaching the code files. now the problem i hav is wen the number of nodes is greater than 300 the the edges and weights of the edges are changing to 1. i.e., after calling parallel_sort function in kruskalApply function. i donno the reason :( it works fine for small number of nodes. iam intrested in any suggestions as well. thankyou
10-31-2009 12:34 AM
07-01-2010 04:42 AM
I think you used the map in a wrong way. In maps, you have to use
pairs but you use the weights as key. It seems wrong. please review this:http://www.cplusplus.com/reference/stl/map/.
Another point, you call "ed.push_back(e);" but what is ed? it is not declared.
You can give a try with TBB 3.