Previous | Next --- Slide 28 of 59
Back to Lecture Thumbnails
doodooloo

Anyone remember what is the problem with the implementation in this case?

mperron

@doodooloo Since there are only 2 processors available, it would be better, as stated in the next slide, to do have each processor do a simple sequential scan on half of the array. After it is completed, have P1 add the base of from the first half of the array to the first half of the sum generated by p2, and p2 add the base to the second half. This method in the slide has to jump to many different locations of the array and perform many more operations than the method described above.

kayvonf

Student challenge: I think someone should code up the two solutions on a modern CPU using two threads and report on their performance.