-
Notifications
You must be signed in to change notification settings - Fork 102
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] Rework the parallel_for_each algorithm requirements #348
[oneTBB] Rework the parallel_for_each algorithm requirements #348
Conversation
Signed-off-by: Kochin, Ivan <kochin.ivan@intel.com>
@kboyarinov , @alexandraepan pls review |
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
Signed-off-by: Kochin, Ivan <kochin.ivan@intel.com>
Signed-off-by: Kochin, Ivan <kochin.ivan@intel.com>
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
@kboyarinov, @alexandraepan please review one more time! |
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
`tbb::parallel_for_each algorithm <../../algorithms/functions/parallel_for_each_func>` | ||
requires the Body::operator() call with an object of type const value_type& or value_type&& to be well-formed if: | ||
|
||
* the iterator does not meet all of the `Forward iterator` requirements described in the [forward.iterators] section of the ISO C++ Standard |
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.
What are we trying to say in this point? Could you please clarify the use-case?
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.
I agree that this case seems unclear, but here we are trying to describe the case when the iterator meets input iterator requirements but does not meet forward iterator requirements.
Please, consider the following replacement:
#348 (comment)
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.
It seems better for me, but I would swap the bullets:
... if all of the following requirements are met:
- The iterator meets the requirements of Input Iterator
- The iterator does not meet the requirements of Forward Iterator
As well, I would use the simple form "meets the requirements" instead of "meets all of the requirements". This "all of" is a little confusing for me
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.
@kboyarinov, @alexandraepan please review the update
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.
I am OK with the change
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: kboyarinov <konstantin.boyarinov@intel.com>
`tbb::parallel_for_each algorithm <../../algorithms/functions/parallel_for_each_func>` | ||
requires the Body::operator() call with an object of type const value_type& or value_type&& to be well-formed if: | ||
|
||
* the iterator does not meet all of the `Forward iterator` requirements described in the [forward.iterators] section of the ISO C++ Standard |
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.
I agree that this case seems unclear, but here we are trying to describe the case when the iterator meets input iterator requirements but does not meet forward iterator requirements.
Please, consider the following replacement:
#348 (comment)
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
`tbb::parallel_for_each algorithm <../../algorithms/functions/parallel_for_each_func>` | ||
requires the Body::operator() call with an object of type const value_type& or value_type&& to be well-formed if: | ||
|
||
* the iterator does not meet all of the `Forward iterator` requirements described in the [forward.iterators] section of the ISO C++ Standard |
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.
It seems better for me, but I would swap the bullets:
... if all of the following requirements are met:
- The iterator meets the requirements of Input Iterator
- The iterator does not meet the requirements of Forward Iterator
As well, I would use the simple form "meets the requirements" instead of "meets all of the requirements". This "all of" is a little confusing for me
Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
source/elements/oneTBB/source/named_requirements/algorithms/par_for_each_body.rst
Outdated
Show resolved
Hide resolved
The rest looks good to me! |
…r_for_each_body.rst Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
@rscohn2 please review and merge, if possible |
@ivankochin please change .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation to .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation |
@rscohn2 all comments were resolved, so please merge if possible |
Merged. We can add more maintainers with the ability to merge PR's if you need it. |
Now the
parallel_for_each
algorithm body named requirements contain unclear and incorrect formulation. This patch fixes it and makes it more clear.Signed-off-by: Kochin, Ivan kochin.ivan@intel.com