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:  MPI
Assembly:  MPI (in MPI.dll)
Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public T Allreduce<T>(
	T value,
	ReductionOperation<T> op
)
Visual Basic (Declaration)
Public Function Allreduce(Of T) ( _
	value As T, _
	op As ReductionOperation(Of T) _
) As T
Visual C++
public:
generic<typename T>
T Allreduce(
	T value, 
	ReductionOperation<T>^ op
)

Parameters

value
Type: T
The local value 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.

Type Parameters

T
Any serializable type.

Return Value

The result of the reduction. The same value will be returned to all processes in a group.

See Also