fn() partialSum
Computes the partial sum of a sequence.

Defined in <seqan/parallel.h>
Signature TValue partialSum(target, source[, parallelTag]);

Parameters

source A sequence of elements that should be partially summed. The sequence alphabet must support the operator+ and conversion from zero, the type is TSource.
parallelTag Tag to enable/disable parallelism, one of Serial, Parallel, default is Serial.
target The resulting partial sum. This sequence will have the same length as source and contains at position i the sum of elements source[0], source[1], ..., source[i].

Return Values

TValue The sum of all elements in source. The returned value equals the last value in target. TValue is Value<TSource>::Type.

Data Races

Thread safety unknown!

See Also