fn() sumReturns the sum of all elements in a sequence.
Returns the sum of all elements in a sequence.
Defined in | <seqan/parallel.h> |
---|---|
Signature |
TValue sum(seq[, parallelTag]);
|
Parameters
seq
|
The sequence to sum up, o ftype TSequence. |
---|---|
parallelTag
|
Tag to enable/disable parallelism, one of Serial and Parallel, default is Serial. |
Return Values
TValue |
The sum of the elements in seq, of type Value<TSequence>::Type. |
---|
Detailed Description
The sequence alphabet must support the operator+ and conversion from zero.
Data Races
Thread safety unknown!