Reduces each element in the data aray from all ranks down to a single array 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. Elements within the same array
are not reduced together, but rather elements at the same index in the different arrays are reduced.
| 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 array<T>^ Reduce( int root, array<T>^ data, ReductionOperation<T>^ operation, TimeSpan timeout )
- T
- type of data to reduce
- root (Int32)
- rank of processor that will receive final result
- data (array<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 array at the root, or null at all other ranks