A collective operation that first performs a reduction on the given values (see Reduce<(Of <(T>)>)(array<T>[]()[], ReductionOperation<(Of <(T>)>), Int32, array<T>[]()[]%) and then scatters the results by sending some elements to each process. The reduction will be performed on the entire array of values (like the array form of Reduce<(Of <(T>)>)(array<T>[]()[], ReductionOperation<(Of <(T>)>), Int32, array<T>[]()[]%)). Then, the array will be scattered, with process i receiving counts[i] elements. The process with rank 0 will receive the first counts[0] elements, the process with rank 1 will receive the next counts[1] elements, and so on.

Namespace:  MPI
Assembly:  MPI (in MPI.dll)
Version: (


public void ReduceScatter<T>(
	T[] inValues,
	ReductionOperation<T> op,
	int[] counts,
	ref T[] outValues
Visual Basic (Declaration)
Public Sub ReduceScatter(Of T) ( _
	inValues As T(), _
	op As ReductionOperation(Of T), _
	counts As Integer(), _
	ByRef outValues As T() _
Visual C++
generic<typename T>
void ReduceScatter(
	array<T>^ inValues, 
	ReductionOperation<T>^ op, 
	array<int>^ counts, 
	array<T>^% outValues


Type: array< T >[]()[]
An array of values that will be reduced. The length of this array must equal to sum of the counts in counts.
Type: MPI..::.ReductionOperation<(Of <(T>)>)
The operation used to combine the elements in inValues. This operation must be associative.
Type: array< System..::.Int32 >[]()[]
An array whose ith element states the number of elements from the reduced result that will be returned to the process with rank i.
Type: array< T >[]()[] %
An array of length counts[Rank] containing the reduced results destined for the calling process.

Type Parameters

Any serializable type.

See Also