Skip to content

Commit

Permalink
Remove parallel copy_backward() and move_backward() (#2627)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanTLavavej authored Apr 4, 2022
1 parent 57b28c7 commit 2127ea0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 38 deletions.
18 changes: 0 additions & 18 deletions stl/inc/xutility
Original file line number Diff line number Diff line change
Expand Up @@ -4346,15 +4346,6 @@ _CONSTEXPR20 _BidIt2 copy_backward(_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest)
return _Dest;
}

#if _HAS_CXX17
template <class _ExPo, class _BidIt1, class _BidIt2, _Enable_if_execution_policy_t<_ExPo> = 0>
_BidIt2 copy_backward(_ExPo&&, _BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest) noexcept /* terminates */ {
// copy [_First, _Last) backwards to [..., _Dest)
// not parallelized as benchmarks show it isn't worth it
return _STD copy_backward(_First, _Last, _Dest);
}
#endif // _HAS_CXX17

template <class _InIt, class _OutIt>
_CONSTEXPR20 _OutIt _Move_unchecked(_InIt _First, _InIt _Last, _OutIt _Dest) {
// move [_First, _Last) to [_Dest, ...)
Expand Down Expand Up @@ -4428,15 +4419,6 @@ _CONSTEXPR20 _BidIt2 move_backward(_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest)
return _Dest;
}

#if _HAS_CXX17
template <class _ExPo, class _BidIt1, class _BidIt2, _Enable_if_execution_policy_t<_ExPo> = 0>
_BidIt2 move_backward(_ExPo&&, _BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest) noexcept /* terminates */ {
// move [_First, _Last) backwards to [..., _Dest)
// not parallelized as benchmarks show it isn't worth it
return _STD move_backward(_First, _Last, _Dest);
}
#endif // _HAS_CXX17


template <class _Ty>
struct _Is_character : false_type {}; // by default, not a character type
Expand Down
18 changes: 0 additions & 18 deletions tests/std/include/instantiate_algorithms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,27 +582,9 @@ namespace std_testing {
#endif // _HAS_CXX17
}

#if HAS_PARALLEL_ALGORITHMS
template <typename Bid1, typename Bid2, typename ExecutionPolicy>
void test_exec_bid1_bid2_xxx_backward(ExecutionPolicy&& exec, Bid1 bid1, Bid2 bid2) {
// SPLIT_MODE 2
std::copy_backward(std::forward<ExecutionPolicy>(exec), bid1, bid1, bid2);
std::move_backward(std::forward<ExecutionPolicy>(exec), bid1, bid1, bid2);
}
#endif // HAS_PARALLEL_ALGORITHMS

template <typename Bid1, typename Bid2>
void test_bid1_bid2_xxx_backward(Bid1 bid1, Bid2 bid2) {
// SPLIT_MODE 2
#if HAS_PARALLEL_ALGORITHMS
test_exec_bid1_bid2_xxx_backward(std::execution::seq, bid1, bid2);
test_exec_bid1_bid2_xxx_backward(std::execution::par, bid1, bid2);
test_exec_bid1_bid2_xxx_backward(std::execution::par_unseq, bid1, bid2);
#if _HAS_CXX20
test_exec_bid1_bid2_xxx_backward(std::execution::unseq, bid1, bid2);
#endif // _HAS_CXX20
#endif // HAS_PARALLEL_ALGORITHMS

std::copy_backward(bid1, bid1, bid2);
std::move_backward(bid1, bid1, bid2);
}
Expand Down
2 changes: 0 additions & 2 deletions tests/std/tests/Dev11_0253803_debug_pointer/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,7 @@ int main() {
copy(par, nil, nil, nil);
copy_if(par, nil, nil, nil, pred);
copy_n(par, nil, zero, nil);
copy_backward(par, nil, nil, nil);
move(par, nil, nil, nil);
move_backward(par, nil, nil, nil);
swap_ranges(par, nil, nil, nil);
transform(par, nil, nil, nil, unop);
transform(par, nil, nil, nil, nil, binop);
Expand Down

0 comments on commit 2127ea0

Please sign in to comment.