Template Function ADS::parallelExclusiveScan

Function Documentation

template<Executor E, std::random_access_iterator I, std::random_access_iterator O, class T, class Op = std::plus<>>
T ADS::parallelExclusiveScan(E &ex, I in, std::size_t n, O out, T init, Op op = Op())

out[ i ] = init op in[ 0 ] op … op in[ i - 1 ], for the n items from in; in and out may be the same; the sum of all of them with init