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[] 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 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 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.

See Also