Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[oneTBB] Add spec changes for std::invoke feature #497

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,27 @@ A ``partitioner`` type may be one of the following entities:
Requirements:

* The ``Range`` type must meet the :doc:`Range requirements <../../named_requirements/algorithms/range>`.
* The ``Body`` type must meet the :doc:`ParallelForBody requirements <../../named_requirements/algorithms/par_for_body>`.
* The ``Index`` type must meet the :doc:`ParallelForIndex requirements <../../named_requirements/algorithms/par_for_index>`.

Until C++17:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Until C++17:
Before C++17:


* The ``Body`` type must meet the :doc:`ParallelForBody requirements <../../named_requirements/algorithms/par_for_body>`.
* The ``Func`` type must meet the :doc:`ParallelForFunc requirements <../../named_requirements/algorithms/par_for_func>`.

Since C++17:

* The ``Body`` type must meet the :doc:`Cpp17ParallelForBody requirements <../../named_requirements/algorithms/cpp17_par_for_body>`.
* The ``Func`` type must meet the :doc:`Cpp17ParallelForFunc requirements <../../named_requirements/algorithms/cpp17_par_for_func>`.

The ``oneapi::tbb::parallel_for(first, last, step, f)`` overload represents parallel execution of the loop:

.. code:: cpp

for (auto i = first; i < last; i += step) f(i);

The loop must not wrap around. The step value must be positive. If omitted, it is implicitly 1.
There is no guarantee that the iterations run in parallel. A deadlock may occur if a lesser
iteration waits for a greater iteration. The partitioning strategy is ``auto_partitioner`` when
The loop must not wrap around. The step value must be positive. If omitted, it is implicitly 1.
There is no guarantee that the iterations run in parallel. A deadlock may occur if a lesser
iteration waits for a greater iteration. The partitioning strategy is ``auto_partitioner`` when
the parameter is not specified.

The ``parallel_for(range,body,partitioner)`` overload provides a more general form of parallel
Expand Down Expand Up @@ -100,4 +108,3 @@ the space complexity is *O(P log(N))*, where *N* is the size of the range and *P
See also:

* :ref:`Partitioners <Partitioners>`

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ filter
======
**[algorithms.parallel_pipeline.filter]**

A ``filter`` class template represents a strongly-typed filter in a ``parallel_pipeline`` algorithm,
A ``filter`` class template represents a strongly-typed filter in a ``parallel_pipeline`` algorithm,
with its template parameters specifying the filter input and output types.
A ``filter`` can be constructed from a functor or by composing two ``filter`` objects with
``operator&()``. The same ``filter`` object can be reused in multiple ``&`` expressions.
Expand All @@ -17,7 +17,7 @@ The ``filter`` class should only be used in conjunction with ``parallel_pipeline
.. code:: cpp

// Defined in header <oneapi/tbb/parallel_pipeline.h>

namespace oneapi {
namespace tbb {

Expand Down Expand Up @@ -48,11 +48,20 @@ The ``filter`` class should only be used in conjunction with ``parallel_pipeline

Requirements:

Until C++17:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Until C++17:
Before C++17:


* If `InputType` is ``void``, a ``Body`` type must meet the :doc:`StartFilterBody requirements <../../../named_requirements/algorithms/filter_body>`.
* If `OutputType` is ``void``, a ``Body`` type must meet the :doc:`OutputFilterBody requirements <../../../named_requirements/algorithms/filter_body>`.
* If `InputType` and `OutputType` are not ``void``, a ``Body`` type must meet the :doc:`MiddleFilterBody requirements <../../../named_requirements/algorithms/filter_body>`.
* If `InputType` and `OutputType` are ``void``, a ``Body`` type must meet the :doc:`SingleFilterBody requirements <../../../named_requirements/algorithms/filter_body>`.

Since C++17:

* If `InputType` is ``void``, a ``Body`` type must meet the :doc:`StartFilterBody requirements <../../../named_requirements/algorithms/filter_body>`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* If `InputType` is ``void``, a ``Body`` type must meet the :doc:`StartFilterBody requirements <../../../named_requirements/algorithms/filter_body>`.
* If `InputType` is ``void``, the ``Body`` type must meet the :doc:`StartFilterBody requirements <../../../named_requirements/algorithms/filter_body>`.

* If `OutputType` is ``void``, a ``Body`` type must meet the :doc:`Cpp17OutputFilterBody requirements <../../../named_requirements/algorithms/cpp17_filter_body>`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* If `OutputType` is ``void``, a ``Body`` type must meet the :doc:`Cpp17OutputFilterBody requirements <../../../named_requirements/algorithms/cpp17_filter_body>`.
* If `OutputType` is ``void``, the ``Body`` type must meet the :doc:`Cpp17OutputFilterBody requirements <../../../named_requirements/algorithms/cpp17_filter_body>`.

* If `InputType` and `OutputType` are not ``void``, a ``Body`` type must meet the :doc:`Cpp17MiddleFilterBody requirements <../../../named_requirements/algorithms/cpp17_filter_body>`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* If `InputType` and `OutputType` are not ``void``, a ``Body`` type must meet the :doc:`Cpp17MiddleFilterBody requirements <../../../named_requirements/algorithms/cpp17_filter_body>`.
* If `InputType` and `OutputType` are not ``void``, the ``Body`` type must meet the :doc:`Cpp17MiddleFilterBody requirements <../../../named_requirements/algorithms/cpp17_filter_body>`.

* If `InputType` and `OutputType` are ``void``, a ``Body`` type must meet the :doc:`SingleFilterBody requirements <../../../named_requirements/algorithms/filter_body>`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* If `InputType` and `OutputType` are ``void``, a ``Body`` type must meet the :doc:`SingleFilterBody requirements <../../../named_requirements/algorithms/filter_body>`.
* If `InputType` and `OutputType` are ``void``, the ``Body`` type must meet the :doc:`SingleFilterBody requirements <../../../named_requirements/algorithms/filter_body>`.


filter_mode Enumeration
-----------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,19 @@ A ``partitioner`` type may be one of the following entities:
Requirements:

* The ``Range`` type must meet the :doc:`Range requirements <../../named_requirements/algorithms/range>`.

Until C++17:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Until C++17:
Before C++17:


* The ``Body`` type must meet the :doc:`ParallelReduceBody requirements <../../named_requirements/algorithms/par_reduce_body>`.
* 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>`.

Until C++17:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Until C++17:
Before C++17:


* The ``Body`` type must meet the :doc:`Cpp17ParallelReduceBody requirements <../../named_requirements/algorithms/cpp17_par_reduce_body>`.
* The ``Func`` type must meet the :doc:`Cpp17ParallelReduceFunc requirements <../../named_requirements/algorithms/cpp17_par_reduce_func>`.
* The ``Reduction`` types must meet :doc:`Cpp17ParallelReduceReduction requirements <../../named_requirements/algorithms/cpp17_par_reduce_reduction>`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The ``Reduction`` types must meet :doc:`Cpp17ParallelReduceReduction requirements <../../named_requirements/algorithms/cpp17_par_reduce_reduction>`.
* The ``Reduction`` type must meet :doc:`Cpp17ParallelReduceReduction requirements <../../named_requirements/algorithms/cpp17_par_reduce_reduction>`.


The function template ``parallel_reduce`` has two forms:
The functional form is designed to be easy to use in conjunction with lambda expressions.
The imperative form is designed to minimize copying of data.
Expand Down Expand Up @@ -161,4 +170,3 @@ expressions and the functional form of ``parallel_reduce``.
See also:

* :ref:`Partitioners <Partitioners>`

Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,19 @@ A ``partitioner`` type may be one of the following entities:
Requirements:

* The ``Range`` type must meet the :doc:`Range requirement <../../named_requirements/algorithms/range>`.

Until C++17:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Until C++17:
Before C++17:


* The ``Body`` type must meet the :doc:`ParallelScanBody requirements <../../named_requirements/algorithms/par_scan_body>`.
* 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>`.

Since C++17:

* The ``Body`` type must meet the :doc:`Cpp17ParallelScanBody requirements <../../named_requirements/algorithms/cpp17_par_scan_body>`.
* The ``Scan`` type must meet the :doc:`Cpp17ParallelScanFunc requirements <../../named_requirements/algorithms/cpp17_par_scan_func>`.
* The ``Combine`` type must meet the :doc:`Cpp17ParallelScanCombine requirements <../../named_requirements/algorithms/cpp17_par_scan_combine>`.

The function template ``parallel_scan`` computes a parallel prefix, also known as a parallel scan.
This computation is an advanced concept in parallel computing that is sometimes useful in scenarios
that appear to have inherently serial dependences.
Expand Down Expand Up @@ -183,4 +192,3 @@ See also:

* :doc:`blocked_range class <../../algorithms/blocked_ranges/blocked_range_cls>`
* :doc:`parallel_reduce algorithm <../../algorithms/functions/parallel_reduce_func>`

13 changes: 10 additions & 3 deletions source/elements/oneTBB/source/flow_graph/async_node_cls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,15 @@ Requirements:
* The ``Input`` type must meet the `DefaultConstructible` requirements from [defaultconstructible]
and the `CopyConstructible` requirements from [copyconstructible] ISO C++ Standard sections.
* The type ``Policy`` can be specified as :doc:`lightweight, queueing and rejecting policies<functional_node_policies>` or defaulted.

Until C++17:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Until C++17:
Before C++17:


* The type ``Body`` must meet the :doc:`AsyncNodeBody requirements <../named_requirements/flow_graph/async_node_body>`.

Since C++17:

* The type ``Body`` must meet the :doc:`Cpp17AsyncNodeBody requirements <../named_requirements/flow_graph/cpp17_async_node_body>`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The type ``Body`` must meet the :doc:`Cpp17AsyncNodeBody requirements <../named_requirements/flow_graph/cpp17_async_node_body>`.
* The ``Body`` type must meet the :doc:`Cpp17AsyncNodeBody requirements <../named_requirements/flow_graph/cpp17_async_node_body>`.


``async_node`` executes a user-provided body on incoming messages. The body typically submits the
messages to an external activity for processing outside of the graph. It is responsibility of
``body`` to be able to pass the message to an external activity. This node also provides the
Expand All @@ -61,8 +68,8 @@ messages to an external activity for processing outside of the graph. It is resp
The user can also provide a value of type ``std::size_t`` to limit concurrency to a value between 1 and
:doc:`tbb::flow::unlimited <predefined_concurrency_limits>`.

The body object passed to a ``async_node`` is copied. Updates to member variables do not affect the original object used to construct the node.
If the state held within a body object must be inspected from outside of the node,
The body object passed to a ``async_node`` is copied. Updates to member variables do not affect the original object used to construct the node.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The body object passed to a ``async_node`` is copied. Updates to member variables do not affect the original object used to construct the node.
The body object passed to ``async_node`` is copied. The updates to member variables do not affect the original object used to construct the node.

If the state held within a body object must be inspected from outside of the node,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If the state held within a body object must be inspected from outside of the node,
If the state that held within a body object must be inspected from the outside of the node,

the :doc:`copy_body <copy_body_func>` function can be used to obtain an updated copy.

Member types
Expand All @@ -79,7 +86,7 @@ Member functions
async_node( graph &g, size_t concurrency, Body body,
node_priority_t priority = no_priority );

Constructs an ``async_node`` that invokes a copy of ``body``. The ``concurrency`` value limits the number of simultaneous
Constructs an ``async_node`` that invokes a copy of ``body``. The ``concurrency`` value limits the number of simultaneous
``body`` invocations for the node.

This function specifies :doc:`node priority<node_priorities>`.
Expand Down
7 changes: 7 additions & 0 deletions source/elements/oneTBB/source/flow_graph/func_node_cls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,15 @@ Requirements:
* The ``Output`` type must meet the `CopyConstructible` requirements from
[copyconstructible] ISO C++ Standard section.
* The type ``Policy`` may be specified as :doc:`lightweight, queueing and rejecting policies<functional_node_policies>` or defaulted.

Until C++17:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Until C++17:
Before C++17:


* The type ``Body`` must meet the :doc:`FunctionNodeBody requirements <../named_requirements/flow_graph/function_node_body>`.

Since C++17:

* The type ``Body`` must meet the :doc:`Cpp17FunctionNodeBody requirements <../named_requirements/flow_graph/cpp17_function_node_body>`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The type ``Body`` must meet the :doc:`Cpp17FunctionNodeBody requirements <../named_requirements/flow_graph/cpp17_function_node_body>`.
* The ``Body`` type must meet the :doc:`Cpp17FunctionNodeBody requirements <../named_requirements/flow_graph/cpp17_function_node_body>`.


``function_node`` has a user-settable concurrency limit. It can be set to one of :doc:`predefined values <predefined_concurrency_limits>`.
The user can also provide a value of type ``std::size_t`` to limit concurrency to a value between 1 and :doc:`tbb::flow::unlimited <predefined_concurrency_limits>`.

Expand Down
7 changes: 7 additions & 0 deletions source/elements/oneTBB/source/flow_graph/join_node_cls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,15 @@ Requirements:
[copyassignable] ISO C++ Standard sections.
* The ``JoinPolicy`` type must be specified as one of :doc:`buffering policies <join_node_policies>` for ``join_node``.
* The ``KHash`` type must meet the :doc:`HashCompare requirements <../named_requirements/containers/hash_compare>`.

Until C++17:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Until C++17:
Before C++17:


* The ``Bi`` types must meet the :doc:`JoinNodeFunctionObject requirements <../named_requirements/flow_graph/join_node_func_obj>`.

Since C++17:

* The ``Bi`` types must meet the :doc:`Cpp17JoinNodeFunctionObject requirements <../named_requirements/flow_graph/cpp17_join_node_func_obj>`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The ``Bi`` types must meet the :doc:`Cpp17JoinNodeFunctionObject requirements <../named_requirements/flow_graph/cpp17_join_node_func_obj>`.
* The ``Bi`` type must meet the :doc:`Cpp17JoinNodeFunctionObject requirements <../named_requirements/flow_graph/cpp17_join_node_func_obj>`.


A ``join_node`` is a ``graph_node`` and a ``sender<OutputTuple>``.
It contains a tuple of input ports, each of which is a ``receiver<Type>`` for each `Type` in
``OutputTuple``. It supports multiple input receivers with distinct types and broadcasts a tuple
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,15 @@ Requirements:
* The ``Input`` type must meet the `DefaultConstructible` requirements from [defaultconstructible]
and the `CopyConstructible` requirements from [copyconstructible] ISO C++ Standard sections.
* The type ``Policy`` can be specified as :doc:`lightweight, queueing and rejecting policies<functional_node_policies>` or defaulted.

Until C++17:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Until C++17:
Before C++17:


* The type ``Body`` must meet the :doc:`MultifunctionNodeBody requirements <../named_requirements/flow_graph/multifunction_node_body>`.

Since C++17:

* The type ``Body`` must meet the :doc:`Cpp17MultifunctionNodeBody requirements <../named_requirements/flow_graph/cpp17_multifunction_node_body>`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The type ``Body`` must meet the :doc:`Cpp17MultifunctionNodeBody requirements <../named_requirements/flow_graph/cpp17_multifunction_node_body>`.
* The ``Body`` type must meet the :doc:`Cpp17MultifunctionNodeBody requirements <../named_requirements/flow_graph/cpp17_multifunction_node_body>`.


``multifunction_node`` has a user-settable concurrency limit. It can be set to one of :doc:`predefined values <predefined_concurrency_limits>`.
The user can also provide a value of type ``std::size_t`` to limit concurrency to a value between 1 and :doc:`tbb::flow::unlimited <predefined_concurrency_limits>`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,17 @@ Requirements:

* The type ``T`` must meet the `CopyConstructible` requirements from [copyconstructible] and
`CopyAssignable` requirements from [copyassignable] ISO C++ Standard sections.

Until C++17:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Until C++17:
Before C++17:


* The type ``Sequencer`` must meet the :doc:`Sequencer requirements <../named_requirements/flow_graph/sequencer>`
If ``Sequencer`` instance throws an exception, behavior is undefined.

Since C++17:

The type ``Sequencer`` must meet the :doc:`Cpp17Sequencer requirements <../named_requirements/flow_graph/cpp17_sequencer>`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The type ``Sequencer`` must meet the :doc:`Cpp17Sequencer requirements <../named_requirements/flow_graph/cpp17_sequencer>`
The ``Sequencer`` type must meet the :doc:`Cpp17Sequencer requirements <../named_requirements/flow_graph/cpp17_sequencer>`

If ``Sequencer`` instance throws an exception, behavior is undefined.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If ``Sequencer`` instance throws an exception, behavior is undefined.
If the ``Sequencer`` instance throws an exception, the behavior is undefined.


``sequencer_node`` forwards messages in a sequence order to a single successor in its successor set.

``sequencer_node`` is a ``graph_node``, ``receiver<T>`` and ``sender<T>``.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation
.. SPDX-FileCopyrightText: 2019-2023 Intel Corporation

..
.. SPDX-License-Identifier: CC-BY-4.0

=============================================
Cpp17MiddleFilterBody and Cpp17LastFilterBody
=============================================
**[req.cpp17_parallel_for_function]**

Cpp17MiddleFilterBody
---------------------

A type `Filter` satisfies `Cpp17MiddleFilterBody` if it meets
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A type `Filter` satisfies `Cpp17MiddleFilterBody` if it meets
The ``Filter`` type satisfies `Cpp17MiddleFilterBody` if it:

the `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``InputType`` and return the type ``OutputType``
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``InputType`` and return the type ``OutputType``
- Meets the `Callable` requirements from [func.wrap.func] section of the ISO C++ Standard for the ``InputType`` arguments types.
- Returns the ``OutputType`` type.

where ``InputType`` and ``OutputTypes`` type is the same as passed to ``filter``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
where ``InputType`` and ``OutputTypes`` type is the same as passed to ``filter``.
Where ``InputType`` and ``OutputTypes`` types are the same as the ones passed to a ``filter``.


Considering ``filter`` to be an object of type ``const Filter`` and ``input`` to be an object of type ``InputType``,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Considering ``filter`` to be an object of type ``const Filter`` and ``input`` to be an object of type ``InputType``,
Considering ``filter`` to be an object of the ``const Filter`` type and ``input`` to be an object of the ``InputType`` type,

applying ``std::invoke(filter, input)`` processes the received item and then returns it.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
applying ``std::invoke(filter, input)`` processes the received item and then returns it.
applying ``std::invoke(filter, input)`` processes the received item and returns it.


**_NOTE:_** It allows to pass pointer-to-function of the class ``InputType`` as a body of ``parallel_pipeline``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**_NOTE:_** It allows to pass pointer-to-function of the class ``InputType`` as a body of ``parallel_pipeline``.
**_NOTE:_** You can pass a pointer-to-function of the ``InputType`` class as a body of ``parallel_pipeline``.


Cpp17LastFilterBody
-------------------

A type `Filter` satisfies `Cpp17LastFilterBody` if it meets
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A type `Filter` satisfies `Cpp17LastFilterBody` if it meets
The ``Filter`` type satisfies `Cpp17LastFilterBody` if it:

the `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``InputType`` and return the type ``void``
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``InputType`` and return the type ``void``
- Meets the `Callable` requirements from [func.wrap.func] section of the ISO C++ Standard for ``InputType`` arguments types.
- Returns the ``void`` type.

where ``InputType`` and ``OutputTypes`` type is the same as passed to ``filter``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
where ``InputType`` and ``OutputTypes`` type is the same as passed to ``filter``.
Where ``InputType`` and ``OutputTypes`` types are the same as the ones passed to a ``filter``.


Considering ``filter`` to be an object of type ``const Filter`` and ``input`` to be an object of type ``InputType``,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Considering ``filter`` to be an object of type ``const Filter`` and ``input`` to be an object of type ``InputType``,
Considering ``filter`` to be an object of the ``const Filter`` type and ``input`` to be an object of the ``InputType`` type ,

applying ``std::invoke(filter, input)`` processes the received item.

**_NOTE:_** It allows to pass pointer-to-function of the class ``InputType`` as a body of ``parallel_pipeline``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**_NOTE:_** It allows to pass pointer-to-function of the class ``InputType`` as a body of ``parallel_pipeline``.
**_NOTE:_** You can pass a pointer-to-function of the ``InputType`` class as a body of ``parallel_pipeline``.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. SPDX-FileCopyrightText: 2019-2023 Intel Corporation
..
.. SPDX-License-Identifier: CC-BY-4.0

====================
Cpp17ParallelForBody
====================
**[req.cpp17_parallel_for_body]**

A type `Body` satisfies `Cpp17ParallelForBody` if it meets the following requirements:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A type `Body` satisfies `Cpp17ParallelForBody` if it meets the following requirements:
The ``Body`` type satisfies `Cpp17ParallelForBody` if it meets the following requirements:


* The `CopyConstructible` requirements from [copyconstructible] ISO C++ Standard section
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The `CopyConstructible` requirements from [copyconstructible] ISO C++ Standard section
* The `CopyConstructible` requirements from the [copyconstructible] section of the ISO C++ Standard.

* The `Destructible` requirements from [destructible] ISO C++ Standard section
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The `Destructible` requirements from [destructible] ISO C++ Standard section
* The `Destructible` requirements from the [destructible] section of the ISO C++ Standard.

* The `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``Range&`` and return the type ``void``
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``Range&`` and return the type ``void``
* The `Callable` requirements from the [func.wrap.func] section of the ISO C++ Standard for ``Range&`` arguments types, and returns the ``void`` type.

where ``Range`` type is the same as passed to ``parallel_for``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
where ``Range`` type is the same as passed to ``parallel_for``.
Where the ``Range`` type is the same as the one passed to a ``parallel_for``.


Considering ``body`` to be an object of type ``const Body`` and ``range`` to be an object of type ``Range&``,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Considering ``body`` to be an object of type ``const Body`` and ``range`` to be an object of type ``Range&``,
Considering the ``body`` to be an object of the ``const Body`` type and ``range`` to be an object of the ``Range&`` type,

applying ``std::invoke(body, range)`` applies a body to the given range.

**_NOTE:_** It allows to pass pointer-to-function of the class ``Range`` as a body of ``parallel_for``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**_NOTE:_** It allows to pass pointer-to-function of the class ``Range`` as a body of ``parallel_for``.
**_NOTE:_** You can pass pointer-to-function of the ``Range`` class as a body of ``parallel_for``.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. SPDX-FileCopyrightText: 2019-2023 Intel Corporation
..
.. SPDX-License-Identifier: CC-BY-4.0

========================
Cpp17ParallelForFunction
========================
**[req.cpp17_parallel_for_function]**

A type `Func` satisfies `Cpp17ParallelForFunction` if it meets
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A type `Func` satisfies `Cpp17ParallelForFunction` if it meets
The ``Func`` type satisfies `Cpp17ParallelForFunction` if it:

the `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``Index`` and return the type ``void``
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``Index`` and return the type ``void``
- Meets the `Callable` requirements from the [func.wrap.func] section of the ISO C++ Standard for ``Index`` arguments types.
- Returns the ``void`` type.

where ``Index`` type is the same as passed to ``parallel_for``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
where ``Index`` type is the same as passed to ``parallel_for``.
Where the ``Index`` type is the same as the one passed to a ``parallel_for``.


Considering ``func`` to be an object of type ``const Func`` and ``index`` to be an object of type ``Index``,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Considering ``func`` to be an object of type ``const Func`` and ``index`` to be an object of type ``Index``,
Considering ``func`` to be an object of the ``const Func`` type and ``index`` to be an object of the ``Index`` type ,

applying ``std::invoke(func, index)`` applies a function to the index.

**_NOTE:_** It allows to pass pointer-to-function of the class ``Range`` as a body of ``parallel_for``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**_NOTE:_** It allows to pass pointer-to-function of the class ``Range`` as a body of ``parallel_for``.
**_NOTE:_** You can pass a pointer-to-function of the ``Range`` class as a body of ``parallel_for``.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. SPDX-FileCopyrightText: 2019-2023 Intel Corporation
..
.. SPDX-License-Identifier: CC-BY-4.0

=======================
Cpp17ParallelReduceFunc
=======================
**[req.cpp17_parallel_reduce_func]**

A type `Func` satisfies `Cpp17ParallelReduceFunc` if it meets
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A type `Func` satisfies `Cpp17ParallelReduceFunc` if it meets
The ``Func`` type satisfies `Cpp17ParallelReduceFunc` if it:

the `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``const Range&, const Value&`` and return the type ``Value``
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``const Range&, const Value&`` and return the type ``Value``
- Meets the `Callable` requirements from the [func.wrap.func] section of the ISO C++ Standard for the ``const Range&, const Value&`` arguments types.
- Returns the ``Value`` type.

where ``Range`` and ``Value`` are the same as passed to ``parallel_reduce``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
where ``Range`` and ``Value`` are the same as passed to ``parallel_reduce``.
Where the ``Range`` and ``Value`` are the same as the ones passed to a ``parallel_reduce``.


Considering ``func`` to be an object of type ``const Func``, ``range`` to be an object of type ``const Range&`` and ``value`` to be an object of type ``const Value&``,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Considering ``func`` to be an object of type ``const Func``, ``range`` to be an object of type ``const Range&`` and ``value`` to be an object of type ``const Value&``,
Considering:
* The ``func`` to be an object of the ``const Func`` type
* The ``range`` to be an object of the ``const Range&`` type
* The ``value`` to be an object of the ``const Value&`` type

applying ``std::invoke(func, range, value)`` accumulates the result fot a subrange ``range`` starting with the initial value ``value``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
applying ``std::invoke(func, range, value)`` accumulates the result fot a subrange ``range`` starting with the initial value ``value``.
applying ``std::invoke(func, range, value)`` accumulates the result for a ``range`` subrange starting with the initial ``value`` value.


**_NOTE:_** It allows to pass pointer-to-function of the class ``Range`` as a body of ``parallel_reduce``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**_NOTE:_** It allows to pass pointer-to-function of the class ``Range`` as a body of ``parallel_reduce``.
**_NOTE:_** You can pass a pointer-to-function of the ``Range`` class as a body of ``parallel_reduce``.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. SPDX-FileCopyrightText: 2019-2023 Intel Corporation
..
.. SPDX-License-Identifier: CC-BY-4.0

============================
Cpp17ParallelReduceReduction
============================
**[req.cpp17_parallel_reduce_reduction]**

A type `Reduction` satisfies `Cpp17ParallelReduceReduction` if it meets
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A type `Reduction` satisfies `Cpp17ParallelReduceReduction` if it meets
The ``Reduction`` type satisfies `Cpp17ParallelReduceReduction` if it:

the `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``const Value&, const Value&`` and return the type ``Value``
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``const Value&, const Value&`` and return the type ``Value``
- Meets the `Callable` requirements from the [func.wrap.func] section of the ISO C++ Standard for the ``const Value&, const Value&`` arguments types.
- Returns the ``Value`` type.

where ``Value`` is the same as passed to ``parallel_reduce``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
where ``Value`` is the same as passed to ``parallel_reduce``.
Where ``Value`` is the same as the one passed to a ``parallel_reduce``.


Considering ``reduction`` to be an object of type ``const Reduction`` and ``x`` and ``y`` to be objects of type ``const Value&``,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Considering ``reduction`` to be an object of type ``const Reduction`` and ``x`` and ``y`` to be objects of type ``const Value&``,
Considering ``reduction`` to be an object of the ``const Reduction`` type and ``x`` and ``y`` to be objects of the ``const Value&`` type ,

applying ``std::invoke(reduction, x, y)`` combines results ``x`` and ``y``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
applying ``std::invoke(reduction, x, y)`` combines results ``x`` and ``y``.
applying ``std::invoke(reduction, x, y)`` combines the ``x`` and ``y`` results.


**_NOTE:_** It allows to pass pointer-to-function of the class ``Value`` as a reduction of ``parallel_reduce``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**_NOTE:_** It allows to pass pointer-to-function of the class ``Value`` as a reduction of ``parallel_reduce``.
**_NOTE:_** You can pass a pointer-to-function of the ``Value`` class as a reduction of ``parallel_reduce``.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. SPDX-FileCopyrightText: 2019-2023 Intel Corporation
..
.. SPDX-License-Identifier: CC-BY-4.0

========================
Cpp17ParallelScanCombine
========================
**[req.cpp17_parallel_scan_combine]**

A type `Combine` satisfies `Cpp17ParallelScanCombine` if it meets
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A type `Combine` satisfies `Cpp17ParallelScanCombine` if it meets
The ``Combine`` type satisfies `Cpp17ParallelScanCombine` if it:

the `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``const Value&, const Value&`` and return the type ``Value``
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``const Value&, const Value&`` and return the type ``Value``
- Meets the `Callable` requirements from the [func.wrap.func] section of the ISO C++ Standard for the ``const Value&, const Value&`` arguments types.
- Returns the ``Value`` type.

where ``Value`` is the same as passed to ``parallel_scan``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
where ``Value`` is the same as passed to ``parallel_scan``.
Where ``Value`` is the same as the one passed to a ``parallel_scan``.


Considering ``combine`` to be an object of type ``const Combine`` and ``x`` and ``y`` to be objects of type ``Value``,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Considering ``combine`` to be an object of type ``const Combine`` and ``x`` and ``y`` to be objects of type ``Value``,
Considering ``combine`` to be an object of the ``const Combine`` type and ``x`` and ``y`` to be objects of the ``Value`` type,

applying ``std::invoke(combine, x, y)`` combines summaries ``x`` and ``y``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
applying ``std::invoke(combine, x, y)`` combines summaries ``x`` and ``y``.
applying ``std::invoke(combine, x, y)`` combines the ``x`` and ``y`` summaries.


**_NOTE:_** It allows to pass pointer-to-function of the class ``Value`` as a reduction of ``parallel_scan``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**_NOTE:_** It allows to pass pointer-to-function of the class ``Value`` as a reduction of ``parallel_scan``.
**_NOTE:_** You can pass a pointer-to-function of the ``Value`` class as a reduction of ``parallel_scan``.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. SPDX-FileCopyrightText: 2019-2023 Intel Corporation
..
.. SPDX-License-Identifier: CC-BY-4.0

=====================
Cpp17ParallelScanFunc
=====================
**[req.cpp17_parallel_scan_func]**

A type `Func` satisfies `Cpp17ParallelScanFunc` if it meets
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A type `Func` satisfies `Cpp17ParallelScanFunc` if it meets
The ``Func`` type satisfies `Cpp17ParallelScanFunc` if it:

the `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``const Range&, const Value&, bool`` and return the type ``Value``
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``const Range&, const Value&, bool`` and return the type ``Value``
- Meets the `Callable` requirements from the [func.wrap.func] section of the ISO C++ Standard for the ``const Range&, const Value&, bool`` arguments types.
- Returns the ``Value`` type.

where ``Range`` and ``Value`` are the same as passed to ``parallel_scan``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
where ``Range`` and ``Value`` are the same as passed to ``parallel_scan``.
Where the ``Range`` and ``Value`` are the same as the ones passed to a ``parallel_scan``.


Considering ``func`` to be an object of type ``const Func``, ``range`` to be an object of type ``Range``, ``sum`` be an object of type ``Value``
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Considering ``func`` to be an object of type ``const Func``, ``range`` to be an object of type ``Range``, ``sum`` be an object of type ``Value``
Considering:
* The ``func`` to be an object of ``const Func`` type
* The ``range`` to be an object of the ``Range`` type * The ``sum`` be an object of the ``Value`` type

and ``is_final`` be an object of type ``bool``,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
and ``is_final`` be an object of type ``bool``,
* The ``is_final`` to be an object of the ``bool`` type

applying ``std::invoke(func, range, sum, is_final)`` starting with ``sum``, computes the summary and, for ``is_final == true``,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
applying ``std::invoke(func, range, sum, is_final)`` starting with ``sum``, computes the summary and, for ``is_final == true``,
applying ``std::invoke(func, range, sum, is_final)``, starting with a ``sum``, computes the summary and, for ``is_final == true``,

the scan result for range ``range``. Returns the computed summary.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the scan result for range ``range``. Returns the computed summary.
the scan result for the ``range`` range. Returns the computed summary.


**_NOTE:_** It allows to pass pointer-to-function of the class ``Range`` as a body of ``parallel_scan``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**_NOTE:_** It allows to pass pointer-to-function of the class ``Range`` as a body of ``parallel_scan``.
**_NOTE:_** You can pass a pointer-to-function of the ``Range`` class as a body of ``parallel_scan``.

Loading
Loading