Allreduce

From Mesham
Revision as of 19:36, 10 January 2010 by Polas (talk | contribs) (Created page with '== Syntax == allreduce[operation] == Semantics == Similar to the reduce type, but the reduction will be performed on each process and the result is also available to all. …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Syntax

allreduce[operation]

Semantics

Similar to the reduce type, but the reduction will be performed on each process and the result is also available to all.

Example

var x:Int::allocated[multiple[]];
var p;
par p from 0 to 3
{
   (x::allreduce["min"]):=p;
};

In this case all processes will perform the reduction on p and all processes will have the minimum value of p placed into their copy of x.