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

Adapting iterator requirements for parallel algorithms #2733

Merged
merged 22 commits into from Jul 11, 2017

Conversation

@hkaiser
Member

hkaiser commented Jul 1, 2017

This makes the iterator requirements of the parallel algorithms conforming to C++17. It mainly strengthens those requirements by not allowing pure input or output iterators.

This fixes #2699.

This also applies some flyby changes:

  • consistently using hpx::util::invoke to call predicates
  • all lambda function now have explicit return types specified

@hkaiser hkaiser added this to the 1.1.0 milestone Jul 1, 2017

@hkaiser hkaiser changed the title from Adapting iterator rquirements for parallel algorithms to Adapting iterator requirements for parallel algorithms Jul 1, 2017

Show outdated Hide outdated CMakeLists.txt
Show outdated Hide outdated hpx/parallel/algorithms/copy.hpp
Show outdated Hide outdated hpx/parallel/algorithms/copy.hpp
Show outdated Hide outdated hpx/parallel/algorithms/fill.hpp

@taeguk taeguk referenced this pull request Jul 8, 2017

Merged

Implement parallel::partition_copy. #2716

10 of 10 tasks complete
@hkaiser

This comment has been minimized.

Show comment
Hide comment
@hkaiser

hkaiser Jul 8, 2017

Member

@taeguk Ok, I'm done with the renaming, please review.

Member

hkaiser commented Jul 8, 2017

@taeguk Ok, I'm done with the renaming, please review.

Show outdated Hide outdated hpx/parallel/algorithms/adjacent_difference.hpp
inline typename std::enable_if<
execution::is_execution_policy<ExPolicy>::value,
typename util::detail::algorithm_result<ExPolicy, bool>::type
>::type
none_of(ExPolicy && policy, InIter first, InIter last, F && f)
none_of(ExPolicy && policy, FwdIter first, FwdIter last, F && f)

This comment has been minimized.

@taeguk

taeguk Jul 9, 2017

Member

There is tiny inconsistent thing.
When there is only one forward iterator type in parameters,
FwdIter is used in some places, but FwdIter1 is used in others.

@taeguk

taeguk Jul 9, 2017

Member

There is tiny inconsistent thing.
When there is only one forward iterator type in parameters,
FwdIter is used in some places, but FwdIter1 is used in others.

This comment has been minimized.

@hkaiser

hkaiser Jul 10, 2017

Member

This one is actually correct, I believe.

@hkaiser

hkaiser Jul 10, 2017

Member

This one is actually correct, I believe.

Show outdated Hide outdated hpx/parallel/algorithms/detail/transfer.hpp
Show outdated Hide outdated hpx/parallel/algorithms/detail/transfer.hpp
Show outdated Hide outdated hpx/parallel/algorithms/detail/transfer.hpp
Show outdated Hide outdated hpx/parallel/algorithms/set_difference.hpp
Show outdated Hide outdated hpx/parallel/algorithms/swap_ranges.hpp
Show outdated Hide outdated hpx/parallel/algorithms/transform.hpp
Show outdated Hide outdated hpx/parallel/algorithms/transform_exclusive_scan.hpp
Show outdated Hide outdated hpx/parallel/segmented_algorithms/detail/transfer.hpp

taeguk added a commit to taeguk/hpx that referenced this pull request Jul 9, 2017

taeguk added a commit to taeguk/hpx that referenced this pull request Jul 9, 2017

/// if the execution policy is of type
/// \a sequenced_task_policy or
/// \a parallel_task_policy and
/// returns \a tagged_pair<tag::in(BidirIter), tag::out(OutIter)>
/// returns \a tagged_pair<tag::in(BidirIter), tag::out(FwdIter)>
/// otherwise.
/// The \a copy algorithm returns the pair of the input iterator

This comment has been minimized.

@taeguk

taeguk Jul 11, 2017

Member

Tiny typo
\a copy -> \a reverse_copy

@taeguk

taeguk Jul 11, 2017

Member

Tiny typo
\a copy -> \a reverse_copy

This comment has been minimized.

@taeguk

taeguk Jul 11, 2017

Member

But it is so tiny. So, I'll approve this PR.

@taeguk

taeguk Jul 11, 2017

Member

But it is so tiny. So, I'll approve this PR.

@taeguk

taeguk approved these changes Jul 11, 2017

Thank you for your efforts to fix the issue which I suggested.

@hkaiser hkaiser merged commit c3d8bdf into master Jul 11, 2017

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@hkaiser hkaiser deleted the fixing_2699 branch Jul 11, 2017

@hkaiser hkaiser added this to Merged to master in Standard Algorithms Jul 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment