Advertisement
Guest User

Untitled

a guest
Jun 26th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. iff --git a/benchmarks/bfs/src/hip/kernel.cc b/benchmarks/bfs/src/hip/kernel.cc
  2. index 985436d..89f8c2e 100644
  3. --- a/benchmarks/bfs/src/hip/kernel.cc
  4. +++ b/benchmarks/bfs/src/hip/kernel.cc
  5. @@ -225,16 +225,17 @@ BFS_in_GPU_kernel(grid_launch_parm lp,
  6. int tid = hipBlockIdx_x*MAX_THREADS_PER_BLOCK + hipThreadIdx_x;
  7. if( tid<no_of_nodes)
  8. {
  9. - int pid;
  10. - if(tot_sum == 0)//this is the first BFS level of current kernel call
  11. - pid = q1[tid];
  12. - else
  13. - pid = next_wf[tid];//read the current frontier info from last level's propagation
  14. -
  15. // Visit a node from the current frontier; update costs, colors, and
  16. // output queue
  17. - visit_node(pid, hipThreadIdx_x & MOD_OP, g_graph_nodes, g_graph_edges,
  18. - local_q, overflow, g_color, g_cost, gray_shade);
  19. + if (tot_sum == 0) {^M
  20. + //this is the first BFS level of current kernel call^M
  21. + visit_node(q1[tid], hipThreadIdx_x & MOD_OP, g_graph_nodes, g_graph_edges,^M
  22. + local_q, overflow, g_color, g_cost, gray_shade);^M
  23. + } else {^M
  24. + //read the current frontier info from last level's propagation^M
  25. + visit_node(next_wf[tid], hipThreadIdx_x & MOD_OP, g_graph_nodes, g_graph_edges,^M
  26. + local_q, overflow, g_color, g_cost, gray_shade);^M
  27. + }^M
  28. }
  29. __syncthreads();
  30. if(hipThreadIdx_x == 0){
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement