Reduces data from all ranks down to a single data variable that is sent to the root.
The reduction is a binary tree reduction - each node reduces itself with it's children,
and then sends its result to its parent, finally reaching the root
| C# | Visual Basic | Visual C++ |
public virtual T Reduce<T>( int root, T data, ReductionOperation<T> operation, TimeSpan timeout )
Public Overridable Function Reduce(Of T) ( _ root As Integer, _ data As T, _ operation As ReductionOperation(Of T), _ timeout As TimeSpan _ ) As T
public: generic<typename T> virtual T Reduce( int root, T data, ReductionOperation<T>^ operation, TimeSpan timeout )
- T
- type of data to reduce
- root (Int32)
- rank of processor that will receive final result
- data (T)
- data from the current processor that will be used in the associative reduction operation
- operation (ReductionOperation<(Of <(T>)>))
- delegate to the reduction method
- timeout (TimeSpan)
- timeout
Reduced value at the root, or a default T at all other ranks