Guest User

Untitled

a guest
May 21st, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1.  
  2. for (iteration = 1; iteration < k; iteration++){
  3.  
  4. //for (iteration = 1; iteration < 4; iteration++){
  5.  
  6. printf ("iteration = %d\n",iteration);
  7.  
  8. mstConnectCandidate <<< noOfBlockv, noOfThreadv >>> (dev_Gka, dev_v, dev_colorVector, dev_neighborVector, dev_colorVectorToLookAhead, dev_neighborVectorToLookAhead, noOfVertices, iteration, k);
  9.  
  10. printf ("\nmstConnectCandidate\n");
  11. mstReColor <<< noOfBlockv, noOfThreadv >>> (dev_v, dev_colorVector,dev_neighborVector ,noOfVertices);
  12. printf ("\nmstReColor\n");
  13. mstRemoveCycles <<< noOfBlockv, noOfThreadv >>> (dev_Gka, dev_v, dev_colorVector, dev_neighborVector, noOfVertices);
  14.  
  15. printf ("\nmstRemoveCycles\n");
  16. mstInitNextCandidate <<< noOfBlockv, noOfThreadv >>> (dev_v, dev_nextCandidateIndex, noOfVertices);
  17. printf ("\nmstInitNextCandidate\n");
  18.  
  19. cudaDeviceSynchronize();
  20.  
  21. cudaMemcpy(v, dev_v, noOfVertices * sizeof(vertexStruct), cudaMemcpyDeviceToHost);
  22. //CUDACHECK(cudaMemcpy(v, dev_v, noOfVertices * sizeof(vertexStruct), cudaMemcpyDeviceToHost), 0);
  23. printf ("\ncudaMemcpy D-H (v)\n");
  24.  
  25.  
  26. for (int l=0;l<noOfVertices;l++){
  27. printf ("\n%d %d %d %d %f\n",v[l].color,v[l].virtualColor,v[l].noOfElement,v[l].minOutEdgeIndex,v[l].minOutEdgeWeight);
  28. }
  29.  
  30.  
  31. mstFindNextCandidate <<< noOfBlockv, noOfThreadv >>> (dev_Gka, dev_v, dev_nextCandidateIndex, noOfVertices, iteration, k);
  32. printf ("\nmstFindNextCandidate\n");
  33.  
  34. //cudaMemcpy(v, dev_v, noOfVertices * sizeof(vertexStruct), cudaMemcpyDeviceToHost);
  35. //printf ("\ncudaMemcpy D-H (v)\n");
  36. cudaMemcpy(nextCandidateIndex, dev_nextCandidateIndex, noOfVertices * sizeof(int), cudaMemcpyDeviceToHost);
  37. printf ("\ncudaMemcpy D-H (nextCandidateIndex)\n");
  38.  
  39. mstConnectNextCandidate(Gka, v, nextCandidateIndex, noOfVertices, noOfEdges, iteration, k );
  40.  
  41. printf ("\nmstConnectNextCandidate\n");
  42. cudaMemcpy(dev_v, v, noOfVertices * sizeof(vertexStruct), cudaMemcpyHostToDevice);
  43.  
  44. cudaDeviceSynchronize();
  45. printf ("\ncudaMemcpy H-T\n");
  46.  
  47. //cudaMemcpy(Gka, dev_Gka, noOfEdges * sizeof(edgeStruct), cudaMemcpyDeviceToHost);
  48. //mstPartition1(Gka, dev_Gka, v, dev_v, dev_colorVector, dev_neighborVector, dev_colorVectorToLookAhead, dev_neighborVectorToLookAhead, colorVector, neighborVector, colorVectorToLookAhead, neighborVectorToLookAhead, noOfVertices, noOfEdges, iteration, k, noOfBlockv, noOfThreadv);
  49.  
  50.  
  51. }
Add Comment
Please, Sign In to add comment