llvm::accumulate

accumulate overloads

Synopses

Declared in <llvm/ADT/STLExtras.h>

Accumulate the elements of Range starting from Init.

template<
    typename R,
    typename E>
auto
accumulate(
    R&& Range,
    E&& Init);
» more...

Accumulate the elements of Range with Op starting from Init.

template<
    typename R,
    typename E,
    typename BinaryOp>
auto
accumulate(
    R&& Range,
    E&& Init,
    BinaryOp&& Op);
» more...

Return Value

The accumulated result.

Parameters

NameDescription
RangeRange whose elements are accumulated.
InitInitial value for the accumulation.
OpBinary operator applied during accumulation.