English subtitles

← List Ranking Part3 - Intro to Parallel Programming

Get Embed Code
2 Languages

Showing Revision 5 created 05/24/2016 by Udacity Robot.

  1. So let's see how to compute the node that's 2 hops away.
  2. We simply look at our node that's 1 hop away and take its node that's 1 hop away,
  3. and we'll continue as long as the number of hops away isn't greater than number of nodes.
  4. So let's do an example here; we know that the successor--the node that's 1 hop away from node 0 is node 5,
  5. so if we want to compute the node that's 2 hops away from 0,
  6. we'll look to see that the successor to 0 is 5, and the successor to 5 is 2, so we'll fill in a 2 here.
  7. The successor to 1 is 6, and the successor to 6 is node 3, so we'll fill in a 3 here.
  8. The successor to node 2 is 7,
  9. the successor to node 7 is node 4, so we'll fill in a 4 here.
  10. And notice this is a perfectly data parallel operation.
  11. Each one of these vertices can do this computation completely in parallel.