We can simply use (a) to calculate total, use (b) to let
every processor know the total, and then everyone substract
the value of itself and left, right neighbor to get the
value we are now calculating.
Here is a comparation:
Method(c) Method(a)+(b)
Time scale log2P log2P
Space scale(per proc) log2P 1
Message per proc log2P 1
Of course, the method used in (c) could be the best way in
other cases, but who can tell me an example?
(I am mainly dissatisfied by the non-const space scale, that
means we must alloc memory dynamically if we don't want to
waste)
----
NOTE: This message was sent using a WWW form. The address liaody@mit.edu
was typed manually, and may easily be incorrect.
In-Reply-To: 9702160050.AA21047@arachnophobia.MIT.EDU