[This is preliminary documentation and is subject to change.]
Allreducec> is a collective algorithm that combines the values stored by each process into a
single value available to all processes. The values are combined in a user-defined way, specified via
a delegate. When provided with arrays, Allreduce combines the ith value of each of the arrays
passed to each process. Thus, Allreduce on arrays is the same as calling
Allreduce<(Of <(T>)>)(T, ReductionOperation<(Of <(T>)>)) for each inValues[i].
An Allreduce is equivalent to a Reduce<(Of <(T>)>)(array<T>[]()[], ReductionOperation<(Of <(T>)>), Int32, array<T>[]()[]%)
followed by a Broadcast<(Of <(T>)>)(array<T>[]()[]%, Int32).
Namespace:
MPIAssembly: MPI (in MPI)
Version: 0.5.0.0 (0.5.0.0)
Syntax
| C# |
|---|
public T[] Allreduce<T>( T[] values, ReductionOperation<T> op ) |
| Visual Basic (Declaration) |
|---|
Public Function Allreduce(Of T) ( _ values As T(), _ op As ReductionOperation(Of T) _ ) As T() |
| Visual C++ |
|---|
public: generic<typename T> array<T>^ Allreduce( array<T>^ values, ReductionOperation<T>^ op ) |
Parameters
- values
- Type: array<T>[]()[]
The local values that will be combined with the values provided by other processes.
- op
- Type: MPI..::.ReductionOperation<(Of <(T>)>)
The operation used to combine two values. This operation must be associative.
Type Parameters
- T
- Any serializable type.