Assume that the problem size is n and there are p processors in the system. For the global sum example shown in the textbook pp.4~5, each processor is responsible for computing the local sum, I.e.,
for (my_i = my_first_i; my_i < my_last_i; my_i++) {
my_x = compute_next_value(..);
my_sum += my_x;
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
30 | 31 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 1 | 2 | 3 |
Get Free Quote!
361 Experts Online