[This is preliminary documentation and is subject to change.]
Scan is a collective algorithm that performs partial reductions on data provided by
each process in the communicator. Scan combines the arrays stored by each process into
partial results delivered to each process. The arrays are combined in a user-defined way,
specified via a delegate that will be applied elementwise to the values in each arrays.
If array(0), array(1), ..., array(N-1) are the arrays provided by the
N processes in the communicator, the resulting array for the process with
rank P will be array(0) op array(1) op ... op array(P). The processor with rank N-1 will
receive the same result as if one had performed a
Reduce<(Of <(T>)>)(array<T>[]()[], ReductionOperation<(Of <(T>)>), Int32, array<T>[]()[]%)
operation with root N-1.
Scan is sometimes called an "inclusive" scan, because the result returned to each process
includes the contribution of that process. For an "exclusive" scan (that does not include the contribution
of the calling process in its result), use ExclusiveScan<(Of <(T>)>)(array<T>[]()[], ReductionOperation<(Of <(T>)>), array<T>[]()[]%).
Namespace:
MPIAssembly: MPI (in MPI.dll)
Version: 0.6.0.0 (0.6.0.0)
Syntax
| C# |
|---|
public void Scan<T>( T[] inValues, ReductionOperation<T> op, ref T[] outValues ) |
| Visual Basic (Declaration) |
|---|
Public Sub Scan(Of T) ( _ inValues As T(), _ op As ReductionOperation(Of T), _ ByRef outValues As T() _ ) |
| Visual C++ |
|---|
public: generic<typename T> void Scan( array<T>^ inValues, ReductionOperation<T>^ op, array<T>^% outValues ) |
Parameters
- inValues
- Type: array<
T
>[]()[]
The array contributed by the calling process. The arrays provided by each process must have the same length.
- op
- Type: MPI..::.ReductionOperation<(Of <(T>)>)
Operation used to combine two values from different processes.
- outValues
- Type:
array<
T
>[]()[]
%
The array array(0) op array(1) op ... op array(Rank)
Type Parameters
- T
- Any serializable type.