Skip to content

Commit 68826e1

Browse files
committed
Update the named requirements for reductions to work with rvalues
1 parent f0cc309 commit 68826e1

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

source/elements/oneTBB/source/named_requirements/algorithms/par_reduce_func.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
==================
66
ParallelReduceFunc
77
==================
8-
**[req.parallel_reduce_body]**
8+
**[req.parallel_reduce_func]**
99

1010
A type `Func` satisfies `ParallelReduceFunc` if it meets the following requirements:
1111

1212
-----------------------------------------------------------------------------------------------------
1313

1414
**ParallelReduceFunc Requirements: Pseudo-Signature, Semantics**
1515

16-
.. cpp:function:: Value Func::operator()(const Range& range, const Value& x) const
16+
.. cpp:function:: Value Func::operator()(const Range& range, Value&& x) const
1717

18-
Accumulates result for a subrange, starting with initial value ``x``.
19-
``Range`` type must meet the :doc:`Range requirements <range>`.
20-
``Value`` type must be the same as a corresponding template parameter for the
21-
:doc:`parallel_reduce algorithm <../../algorithms/functions/parallel_reduce_func>` algorithm.
18+
Accumulates values over a subrange, starting with the initial value ``x``.
19+
The ``Range`` type must meet the :doc:`Range requirements <range>`.
20+
The ``Value`` type must be the same as the corresponding template parameter for the
21+
:doc:`parallel_reduce algorithm <../../algorithms/functions/parallel_reduce_func>`.
2222

2323
See also:
2424

source/elements/oneTBB/source/named_requirements/algorithms/par_reduce_reduction.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ A type `Reduction` satisfies `ParallelReduceReduction` if it meets the following
1313

1414
**ParallelReduceReduction Requirements: Pseudo-Signature, Semantics**
1515

16-
.. cpp:function:: Value Reduction::operator()(const Value& x, const Value& y) const
16+
.. cpp:function:: Value Reduction::operator()(Value&& x, Value&& y) const
1717

18-
Combines results ``x`` and ``y``.
19-
``Value`` type must be the same as a corresponding template parameter for the
20-
:doc:`parallel_reduce algorithm <../../algorithms/functions/parallel_reduce_func>` algorithm.
18+
Combines the results ``x`` and ``y``.
19+
The ``Value`` type must be the same as the corresponding template parameter for the
20+
:doc:`parallel_reduce algorithm <../../algorithms/functions/parallel_reduce_func>`.
2121

2222
See also:
2323

0 commit comments

Comments
 (0)