Pure Mpi.NET Library
Reduce<(Of <(T>)>) Method (root, data, operation, timeout)
NamespacesMpiCommReduce<(Of <(T>)>)(Int32, array<T>[]()[], ReductionOperation<(Of <(T>)>), TimeSpan)
Reduces each element in the data aray from all ranks down to a single array that is sent to the root. The reduction is a binary tree reduction - each node reduces itself with it's children, and then sends its result to its parent, finally reaching the root. Elements within the same array are not reduced together, but rather elements at the same index in the different arrays are reduced.
Declaration Syntax
C#Visual BasicVisual C++
public virtual T[] Reduce<T>(
	int root,
	T[] data,
	ReductionOperation<T> operation,
	TimeSpan timeout
)
Public Overridable Function Reduce(Of T) ( _
	root As Integer, _
	data As T(), _
	operation As ReductionOperation(Of T), _
	timeout As TimeSpan _
) As T()
public:
generic<typename T>
virtual array<T>^ Reduce(
	int root, 
	array<T>^ data, 
	ReductionOperation<T>^ operation, 
	TimeSpan timeout
)
Generic Template Parameters
T
type of data to reduce
Parameters
root (Int32)
rank of processor that will receive final result
data (array<T>[]()[])
data from the current processor that will be used in the associative reduction operation
operation (ReductionOperation<(Of <(T>)>))
delegate to the reduction method
timeout (TimeSpan)
timeout
Return Value
Reduced array at the root, or null at all other ranks

Assembly: Mpi (Module: Mpi) Version: 1.0.0.3 (1.0.0.3)