diff --git a/source/elements/oneTBB/source/algorithms/functions/feeder.rst b/source/elements/oneTBB/source/algorithms/functions/feeder.rst index 93a093ff2..dc2a73f72 100644 --- a/source/elements/oneTBB/source/algorithms/functions/feeder.rst +++ b/source/elements/oneTBB/source/algorithms/functions/feeder.rst @@ -33,10 +33,13 @@ Member functions Adds item to a collection of work items to be processed. + **Requirements**: The ``Item`` type must meet the `CopyConstructible` requirements from the [copyconstructible] section of the ISO C++ Standard. + .. cpp:function:: void add( Item&& item ) Same as the above but uses the move constructor of ``Item``, if available. - + + **Requirements**: The ``Item`` type must meet the `MoveConstructible` requirements from the [moveconstructible] section of the ISO C++ Standard. .. caution:: diff --git a/source/elements/oneTBB/source/algorithms/functions/parallel_for_each_func.rst b/source/elements/oneTBB/source/algorithms/functions/parallel_for_each_func.rst index f6712c364..713271b03 100644 --- a/source/elements/oneTBB/source/algorithms/functions/parallel_for_each_func.rst +++ b/source/elements/oneTBB/source/algorithms/functions/parallel_for_each_func.rst @@ -37,8 +37,11 @@ Function template that processes work items in parallel. Requirements: * The ``Body`` type must meet the :doc:`ParallelForEachBody requirements <../../named_requirements/algorithms/par_for_each_body>`. -* The ``InputIterator`` type must meet the `Input Iterator` requirements from the [input.iterators] ISO C++ Standard section. +* The ``InputIterator`` type must meet the `Input Iterator` requirements from the [input.iterators] section of the ISO C++ Standard. +* If ``InputIterator`` type does not meet the `Forward Iterator` requirements from the [forward.iterators] section of the ISO C++ Standard, + the ``std::iterator_traits::value_type`` type must be constructible from ``std::iterator_traits::reference``. * The ``Container`` type must meet the :doc:`ContainerBasedSequence requirements <../../named_requirements/algorithms/container_based_sequence>`. +* The type returned by ``Container::begin()`` must meet the same requirements as the ``InputIterator`` type above. The ``parallel_for_each`` template has two forms. diff --git a/source/elements/oneTBB/source/algorithms/functions/parallel_reduce_func.rst b/source/elements/oneTBB/source/algorithms/functions/parallel_reduce_func.rst index 927cb656c..728972ef0 100644 --- a/source/elements/oneTBB/source/algorithms/functions/parallel_reduce_func.rst +++ b/source/elements/oneTBB/source/algorithms/functions/parallel_reduce_func.rst @@ -50,6 +50,8 @@ Requirements: * The ``Range`` type must meet the :doc:`Range requirements <../../named_requirements/algorithms/range>`. * The ``Body`` type must meet the :doc:`ParallelReduceBody requirements <../../named_requirements/algorithms/par_reduce_body>`. +* The ``Value`` type must meet the `CopyConstructible` requirements from the [copyconstructible] section and + `CopyAssignable` requirements from the [copyassignable] section of the ISO C++ Standard. * The ``Func`` type must meet the :doc:`ParallelReduceFunc requirements <../../named_requirements/algorithms/par_reduce_func>`. * The ``Reduction`` types must meet :doc:`ParallelReduceReduction requirements <../../named_requirements/algorithms/par_reduce_reduction>`. diff --git a/source/elements/oneTBB/source/algorithms/functions/parallel_scan_func.rst b/source/elements/oneTBB/source/algorithms/functions/parallel_scan_func.rst index 1054a1f0c..b8cadad9f 100644 --- a/source/elements/oneTBB/source/algorithms/functions/parallel_scan_func.rst +++ b/source/elements/oneTBB/source/algorithms/functions/parallel_scan_func.rst @@ -32,6 +32,8 @@ Requirements: * The ``Range`` type must meet the :doc:`Range requirement <../../named_requirements/algorithms/range>`. * The ``Body`` type must meet the :doc:`ParallelScanBody requirements <../../named_requirements/algorithms/par_scan_body>`. +* The ``Value`` type must meet the `CopyConstructible` requirements from the [copyconstructible] section and + `CopyAssignable` requirements from the [copyassignable] section of the ISO C++ Standard. * The ``Scan`` type must meet the :doc:`ParallelScanFunc requirements <../../named_requirements/algorithms/par_scan_func>`. * The ``Combine`` type must meet the :doc:`ParallelScanCombine requirements <../../named_requirements/algorithms/par_scan_combine>`. diff --git a/source/elements/oneTBB/source/named_requirements/algorithms/filter_body.rst b/source/elements/oneTBB/source/named_requirements/algorithms/filter_body.rst index e3326ae84..9813fa76e 100644 --- a/source/elements/oneTBB/source/named_requirements/algorithms/filter_body.rst +++ b/source/elements/oneTBB/source/named_requirements/algorithms/filter_body.rst @@ -25,7 +25,7 @@ A type `Body` should meet one of the following requirements depending on the fil .. namespace:: FirstFilterBody -.. cpp:function:: OutputType Body::operator()( oneapi::tbb::flow_control fc ) const +.. cpp:function:: OutputType Body::operator()( oneapi::tbb::flow_control& fc ) const Returns the next item from an input stream. Calls ``fc.stop()`` at the end of an input stream. @@ -45,7 +45,7 @@ A type `Body` should meet one of the following requirements depending on the fil .. namespace:: SingleFilterBody -.. cpp:function:: void Body::operator()( oneapi::tbb::flow_control fc ) const +.. cpp:function:: void Body::operator()( oneapi::tbb::flow_control& fc ) const Processes an element from an input stream. Calls ``fc.stop()`` at the end of an input stream. diff --git a/source/elements/oneTBB/source/named_requirements/algorithms/par_for_index.rst b/source/elements/oneTBB/source/named_requirements/algorithms/par_for_index.rst index e166b526f..6b9f1c3e1 100644 --- a/source/elements/oneTBB/source/named_requirements/algorithms/par_for_index.rst +++ b/source/elements/oneTBB/source/named_requirements/algorithms/par_for_index.rst @@ -25,31 +25,48 @@ A type `Index` satisfies `ParallelForIndex` if it meets the following requiremen Destructor. -.. cpp:function:: void operator=( const Index& ) +.. cpp:function:: Index& operator=( const Index& ) Assignment. - .. note:: +.. cpp:function:: Index& operator++() - The return type ``void`` in the pseudo-signature denotes that - ``operator=`` is not required to return a value. The actual ``operator=`` - can return a value, which will be ignored. + Adjust ``*this`` to the next value. .. cpp:function:: bool operator<( const Index& i, const Index& j ) Value of *i* precedes value of *j*. +.. cpp:function:: bool operator<=( const Index& i, const Index& j ) + + Value of *i* precedes or equal to the value of *j*. + .. cpp:function:: D operator-( const Index& i, const Index& j ) Number of values in range ``[i,j)``. +.. cpp:function:: Index operator+( const Index& i, const Index& j ) + + Sum of *i* and *j* values. + .. cpp:function:: Index operator+( const Index& i, D k ) *k*-th value after *i*. +.. cpp:function:: Index operator*( const Index& i, const Index& j ) + + Multiplication of *i* and *j* values. + +.. cpp:function:: Index operator/( const Index& i, const Index& j ) + + Quotient of *i* and *j* values. + ``D`` is the type of the expression ``j-i``. It can be any integral type that is convertible to ``size_t``. Examples that model the Index requirements are integral types and pointers. +**_NOTE:_** It is recommended to use integral types as ``ParallelForIndex``. See the ``[basic.fundamental]`` +section of the ISO C++ Standard for information about integral types. + See also: * :doc:`parallel_for algorithm <../../algorithms/functions/parallel_for_func>`