Allreduce is a collective algorithm that combines the values supplied by each process of the other group
into a single value available to all processes. The values are combined in a user-defined way, specified via
a delegate. If value1, value2, ..., valueN are the values provided by the
N processes in the communicator, the result will be the value value1 op value2 op ... op valueN.
Namespace:
MPIAssembly: MPI (in MPI.dll)
Version: 1.0.0.0 (1.0.0.0)
Syntax
| C# |
|---|
public void Allreduce<T>( T[] inValues, ReductionOperation<T> op, ref T[] outValues ) |
| Visual Basic (Declaration) |
|---|
Public Sub Allreduce(Of T) ( _ inValues As T(), _ op As ReductionOperation(Of T), _ ByRef outValues As T() _ ) |
| Visual C++ |
|---|
public: generic<typename T> void Allreduce( array<T>^ inValues, ReductionOperation<T>^ op, array<T>^% outValues ) |
Parameters
- inValues
- Type: array<
T
>[]()[]
The local values that will be combined with the values provided by other processes and sent to each process in the other group.
- op
- Type: MPI..::.ReductionOperation<(Of <(T>)>)
The operation used to combine two values. This operation must be associative.
- outValues
- Type:
array<
T
>[]()[]
%
The values that result from combining all of the values in values (as provided by the processes of the other group) element-by-element. If needed, this array will be resized to the same size as inValues. Supply this argument when you have pre-allocated space for the resulting array.
Type Parameters
- T
- Any serializable type.