folly::reproducible_accumulator::add

add overloads

Synopses

Declared in <folly/math/ReproducibleAccumulator.h>

Add x to the binned fp

void
add(ftype const x);
» more...

Add elements from a range to the binned fp.

template<std::ranges::input_range R>
requires std::is_arithmetic_v<std::ranges::range_value_t<R>>
void
add(R&& range);
» more...

Add arithmetics in the range [first, last) to the binned fp.] For random-access iterators, uses multiple independent accumulators to exploit instruction-level parallelism. The [[gnu::flatten]] attribute forces full inlining so the compiler and OOO engine can see across all deposits simultaneously.

template<typename InputIt>
void
add(
    InputIt first,
    InputIt last);
» more...

Parameters

NameDescription
xThe value to add.
rangeThe range of arithmetic values to add.
firstThe beginning of the range to add.
lastThe end of the range to add.