English subtitles

← Generate CSR - Intro to Parallel Programming

Get Embed Code
2 Languages

Showing Revision 4 created 05/25/2016 by Udacity Robot.

  1. So if you recall the value array, it is simply the non-zero elements of this input array,
  2. which we'll just fill in here.
  3. The index array here is which column each of these array elements are in.
  4. So the 1 is in column 0, the 2 is in column 2,
  5. the 2 here is in column 0, the 1 here is in column 1,
  6. this 1 is also in column 1, and this final 3 is in column 2.
  7. Finally, what are the indices of each one of these elements that actually begins a row?
  8. So we should look for the index of this 1, the index of this 2, and the index of this 1
  9. because they are what begin each one of these rows.
  10. That's this element, this element, and this element.
  11. This element is the zeroth element, this element is the second element,
  12. and this element here is the fourth element.
  13. So this is the CSR representation of this sparse matrix here.