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


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++
generic<typename T>
array<T>^ Allreduce(
	array<T>^ values, 
	ReductionOperation<T>^ op


Type: array< T >[]()[]
The local values that will be combined with the values provided by other processes.
Type: MPI..::.ReductionOperation<(Of <(T>)>)
The operation used to combine two values. This operation must be associative.

Type Parameters

Any serializable type.

Return Value

The values that result from combining all of the values in values element-by-element. If needed, this array will be resized to the same size as inValues.

See Also