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

Conversation

aepanchi
Copy link
Contributor

@aepanchi aepanchi commented Sep 6, 2023

No description provided.

* 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:

@@ -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>`.

Since 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:`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` 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:`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` 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:`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>`.
* 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>`.

A type `Sequencer` satisfies `Cpp17FunctionNodeBody` if it meets the following requirements:

* The `CopyConstructible` requirements from [copyconstructible] ISO C++ Standard section
* 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 `CopyConstructible` requirements from [copyconstructible] ISO C++ Standard section
* The `Destructible` requirements from [destructible] ISO C++ Standard section
* The `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``const T&`` and return the type ``size_t``
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 T&`` and return the type ``size_t``
* The `Callable` requirements from the [func.wrap.func] section of the ISO C++ Standard for the ``const T&`` arguments types, and returns the ``size_t`` type.

* The `CopyConstructible` requirements from [copyconstructible] ISO C++ Standard section
* The `Destructible` requirements from [destructible] ISO C++ Standard section
* The `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``const T&`` and return the type ``size_t``
where ``T`` is the corresponding template argument of the ``sequencer_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
where ``T`` is the corresponding template argument of the ``sequencer_node``.
Where ``T`` is the corresponding template argument of the ``sequencer_node``.

* The `Callable` requirements from [func.wrap.func] ISO C++ Standard section for arguments types ``const T&`` and return the type ``size_t``
where ``T`` is the corresponding template argument of the ``sequencer_node``.

Considering ``s`` to be an object of type ``Sequencer`` and ``v`` to be an object of type ``const T&``,
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 ``s`` to be an object of type ``Sequencer`` and ``v`` to be an object of type ``const T&``,
Considering ``s`` to be an object of the ``Sequencer`` type and ``v`` to be an object of the ``const T&`` type,

Considering ``s`` to be an object of type ``Sequencer`` and ``v`` to be an object of type ``const T&``,
applying ``std::invoke(s, v)`` returns the sequence number for the provided message ``v``.

**_NOTE:_** It allows to pass pointer-to-function or pointer-to-member of the class ``T`` as a body of ``sequencer_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
**_NOTE:_** It allows to pass pointer-to-function or pointer-to-member of the class ``T`` as a body of ``sequencer_node``.
**_NOTE:_** You can pass a pointer-to-function or a pointer-to-member of the ``T`` class as a body of ``sequencer_node``.

@aepanchi
Copy link
Contributor Author

aepanchi commented Sep 6, 2023

You should also include all of the new files to the toctree.

@akukanov akukanov self-requested a review September 9, 2023 18:27
@rscohn2
Copy link
Member

rscohn2 commented Sep 11, 2023

Ready to merge?

@akukanov
Copy link
Contributor

akukanov commented Nov 3, 2023

Closing this PR in favor of #510

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants