[This is preliminary documentation and is subject to change.]

ExclusiveScan is a collective algorithm that performs partial reductions on data provided by each process in the communicator. ExclusiveScan combines the arrays stored by each process into partial results delivered to each process. The values are combined in a user-defined way, specified via a delegate that will be applied elementwise to the values in the arrays. If array1, array2, ..., arrayN are the values provided by the N processes in the communicator, the resulting value for the process with rank P > 0 will be array1 op array2 op ... op arrayP. The rank 0 process receives a null array. ExclusiveScan is sometimes called an "exclusive" scan, because the result returned to each process does not include the contribution of that process. For an "inclusive" scan (that does include the contribution of the calling process in its result), use Scan<(Of <(T>)>)(array<T>[]()[], ReductionOperation<(Of <(T>)>)). Note that the results provided by ExclusiveScan are the same as those provided by Scan, except that with ExclusiveScan, the process with rank i will receive the result that rank i-1 would have received from Scan, i.e., ExclusiveScan gives the same results but shifted to the right.

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


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


Type: array< T >[]()[]
The values contributed by the calling process. The lengths of the arrays provided by all of the processes must be the same.
Type: MPI..::.ReductionOperation<(Of <(T>)>)
Operation used to combine two values from different processes. This operation must be associative.
Type: array< T >[]()[] %
If the rank of the calling process is not zero, this will receive the value array1 op array2 op ... op arrayP, where P is the rank of the calling process. Otherwise, this value will be replaced with null.

Type Parameters

Any serializable type.

See Also