https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104722

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #6)
> Perhaps _GLIBCXX_PARALLEL should parallelize std::accumulate only if
> binary_op is known to be associative?

Or just don't parallelize it, since it breaks the guarantees of
std::accumulate. That's why the C++17 parallel algos add std::reduce, which
doesn't have the same guarantees.

Reply via email to