-
Notifications
You must be signed in to change notification settings - Fork 110
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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. | ||||||
|
@@ -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 { | ||||||
|
||||||
|
@@ -48,11 +48,20 @@ The ``filter`` class should only be used in conjunction with ``parallel_pipeline | |||||
|
||||||
Requirements: | ||||||
|
||||||
Until C++17: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 `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>`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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>`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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>`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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>`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
filter_mode Enumeration | ||||||
----------------------- | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
* 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: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
* 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>`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
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. | ||||||
|
@@ -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 | ||||
---|---|---|---|---|---|---|
|
@@ -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: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
* 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. | ||||||
|
@@ -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>` | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
* 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>`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
``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 | ||||||
|
@@ -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. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
the :doc:`copy_body <copy_body_func>` function can be used to obtain an updated copy. | ||||||
|
||||||
Member types | ||||||
|
@@ -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>`. | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
* 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>`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
``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>`. | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
* 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>`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
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 | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
* 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>`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
``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>`. | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
* 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>` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
If ``Sequencer`` instance throws an exception, behavior is undefined. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
``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>``. | ||||||
|
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,32 @@ | ||||||||
.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
.. | ||||||||
.. SPDX-License-Identifier: CC-BY-4.0 | ||||||||
|
||||||||
============================================= | ||||||||
Cpp17MiddleFilterBody and Cpp17LastFilterBody | ||||||||
============================================= | ||||||||
**[req.cpp17_parallel_for_function]** | ||||||||
|
||||||||
Cpp17MiddleFilterBody | ||||||||
--------------------- | ||||||||
|
||||||||
A type `Filter` satisfies `Cpp17MiddleFilterBody` if it meets | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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`` | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``, | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
Cpp17LastFilterBody | ||||||||
------------------- | ||||||||
|
||||||||
A type `Filter` satisfies `Cpp17LastFilterBody` if it meets | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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`` | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``, | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
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``. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
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: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
* The `CopyConstructible` requirements from [copyconstructible] ISO C++ Standard section | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
* The `Destructible` requirements from [destructible] ISO C++ Standard section | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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`` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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&``, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
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``. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
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 | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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`` | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``, | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
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``. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
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 | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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`` | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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&``, | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
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 | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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`` | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
where ``Value`` is the same as passed to ``parallel_reduce``. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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&``, | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
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 | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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`` | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
where ``Value`` is the same as passed to ``parallel_scan``. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``, | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
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 | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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`` | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``. | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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`` | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
and ``is_final`` be an object of type ``bool``, | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``, | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
the scan result for range ``range``. Returns the computed summary. | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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``. | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.