2918. Possible need for extra storage in inner_product

Section: 29.8.4 [inner.product] Status: Resolved Submitter: United States Opened: 2017-02-03 Last modified: 2017-03-20

Priority: Not Prioritized

View all issues with Resolved status.

Discussion:

Addresses US 161

There is a surprising sequential operation applying BinaryOp1 in inner_product that may, for example, require additional storage for the parallel algorithms to enable effective distribution of work, and is likely to be a performance bottleneck. GENERALIZED_SUM is probably intended here for the parallel version of the algorithm, with the corresponding strengthening on constraints on BinaryOp1 to allow arbitrary order of evaluation.

Proposed change: For the overloads taking an execution policy, copy the current specification, but replace algorithm in Effects with

GENERALIZED_SUM(plus<>(), init, multiplies<>(*i1, *i2), ...)
GENERALIZED_SUM(binary_op1, init, binary_op2(*i1, *i2), ...)

[2017-03-12, post-Kona]

Resolved by P0623R0.

Proposed resolution: