Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (iteration = 1; iteration < k; iteration++){
- //for (iteration = 1; iteration < 4; iteration++){
- printf ("iteration = %d\n",iteration);
- mstConnectCandidate <<< noOfBlockv, noOfThreadv >>> (dev_Gka, dev_v, dev_colorVector, dev_neighborVector, dev_colorVectorToLookAhead, dev_neighborVectorToLookAhead, noOfVertices, iteration, k);
- printf ("\nmstConnectCandidate\n");
- mstReColor <<< noOfBlockv, noOfThreadv >>> (dev_v, dev_colorVector,dev_neighborVector ,noOfVertices);
- printf ("\nmstReColor\n");
- mstRemoveCycles <<< noOfBlockv, noOfThreadv >>> (dev_Gka, dev_v, dev_colorVector, dev_neighborVector, noOfVertices);
- printf ("\nmstRemoveCycles\n");
- mstInitNextCandidate <<< noOfBlockv, noOfThreadv >>> (dev_v, dev_nextCandidateIndex, noOfVertices);
- printf ("\nmstInitNextCandidate\n");
- cudaDeviceSynchronize();
- cudaMemcpy(v, dev_v, noOfVertices * sizeof(vertexStruct), cudaMemcpyDeviceToHost);
- //CUDACHECK(cudaMemcpy(v, dev_v, noOfVertices * sizeof(vertexStruct), cudaMemcpyDeviceToHost), 0);
- printf ("\ncudaMemcpy D-H (v)\n");
- for (int l=0;l<noOfVertices;l++){
- printf ("\n%d %d %d %d %f\n",v[l].color,v[l].virtualColor,v[l].noOfElement,v[l].minOutEdgeIndex,v[l].minOutEdgeWeight);
- }
- mstFindNextCandidate <<< noOfBlockv, noOfThreadv >>> (dev_Gka, dev_v, dev_nextCandidateIndex, noOfVertices, iteration, k);
- printf ("\nmstFindNextCandidate\n");
- //cudaMemcpy(v, dev_v, noOfVertices * sizeof(vertexStruct), cudaMemcpyDeviceToHost);
- //printf ("\ncudaMemcpy D-H (v)\n");
- cudaMemcpy(nextCandidateIndex, dev_nextCandidateIndex, noOfVertices * sizeof(int), cudaMemcpyDeviceToHost);
- printf ("\ncudaMemcpy D-H (nextCandidateIndex)\n");
- mstConnectNextCandidate(Gka, v, nextCandidateIndex, noOfVertices, noOfEdges, iteration, k );
- printf ("\nmstConnectNextCandidate\n");
- cudaMemcpy(dev_v, v, noOfVertices * sizeof(vertexStruct), cudaMemcpyHostToDevice);
- cudaDeviceSynchronize();
- printf ("\ncudaMemcpy H-T\n");
- //cudaMemcpy(Gka, dev_Gka, noOfEdges * sizeof(edgeStruct), cudaMemcpyDeviceToHost);
- //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);
- }
Add Comment
Please, Sign In to add comment