6004c17b4d
Enhance those algos overloads to generalize existing optimization for __gnu_debug::_Safe_iterator w/o _GLIBCXX_DEBUG mode and for std::deque iterators. Also extend __copy_move_a2 ostreambuf_iterator overloads to std::vector and std::deque iterators. * include/bits/stl_algobase.h (__copy_move_a1<>(_II, _II, _OI)): New. (__copy_move_a1<>(_Deque_iterator<>, _Deque_iterator<>, _OI)): New. (__copy_move_a1<>(_Deque_iterator<>, _Deque_iterator<>, _Deque_iterator<>)): New. (__copy_move_a1<>(_II, _II, _Deque_iterator<>)): New. (__copy_move_a<>(_II, _II, _OI)): Adapt, call __copy_move_a1<>. (__copy_move_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&, _OI)): New. (__copy_move_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&, const _Safe_iterator<>&)): New. (__copy_move_a<>(_II, _II, const _Safe_iterator<>&)): New. (copy, move): Adapt, call __copy_move_a. (__copy_move_backward_a1<>(_II, _II, _OI)): New, call __copy_move_backward_a2. (__copy_move_backward_a1<>(_Deque_iterator<>, _Deque_iterator<>, _OI)): New. (__copy_move_backward_a1<>(_Deque_iterator<>, _Deque_iterator<>, _Deque_iterator<>)): New. (__copy_move_backward_a1<>(_II, _II, _Deque_iterator<>)): New. (__copy_move_backward_a<>(_II, _II, _OI)): Adapt, call __copy_move_backward_a1<>. (__copy_move_backward_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&, _OI)): New. (__copy_move_backward_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&, const _Safe_iterator<>&)): New. (__copy_move_backward_a<>(_II, _II, const _Safe_iterator<>&)): New. (copy_backward, move_backward): Adapt, call __copy_move_backward_a<>. (__fill_a): Rename into... (__fill_a1): ... this. (__fill_a1(__normal_iterator<>, __normal_iterator<>, const _Tp&)): New. (__fill_a1(const _Deque_iterator<>&, const _Deque_iterator<>&, _VTp)): New. (__fill_a(_FIte, _FIte, const _Tp&)): New, call __fill_a1. (__fill_a(const _Safe_iterator<>&, const _Safe_iterator<>&, const _Tp&)): New. (fill): Adapt, remove __niter_base usage. (__fill_n_a): Rename into... (__fill_n_a1): ...this. (__fill_n_a(const _Safe_iterator<>&, _Size, const _Tp&, input_iterator_tag)): New. (__fill_n_a(_OI, _Size, const _Tp&, output_iterator_tag)): New, call __fill_n_a1. (__fill_n_a(_OI, _Size, const _Tp&, random_access_iterator_tag)): New, call __fill_a. (__equal_aux): Rename into... (__equal_aux1): ...this. (__equal_aux1(_Deque_iterator<>, _Deque_iterator<>, _OI)): New. (__equal_aux1(_Deque_iterator<>, _Deque_iterator<>, _Deque_iterator<>)): New. (__equal_aux1(_II, _II, _Deque_iterator<>)): New. (__equal_aux(_II1, _II1, _II2)): New, call __equal_aux1. (__equal_aux(const _Safe_iterator<>&, const _Safe_iterator<>&, _OI)): New. (__equal_aux(const _Safe_iterator<>&, const _Safe_iterator<>&, const _Safe_iterator<>&)): New. (__equal_aux(_II, _II, const _Safe_iterator<>&)): New. (equal(_II1, _II1, _II2)): Adapt. * include/bits/stl_deque.h (fill, copy, copy_backward, move, move_backward): Remove. * include/bits/deque.tcc: Include <bits/stl_algobase.h>. (__fill_a1): New. (__copy_move_dit): New. (__copy_move_a1): New, use latter. (__copy_move_a1(_II, _II, _Deque_iterator<>)): New. (__copy_move_backward_dit): New. (__copy_move_backward_a1): New, use latter. (__copy_move_backward_a1(_II, _II, _Deque_iterator<>)): New. (__equal_dit): New. (__equal_aux1): New, use latter. (__equal_aux1(_II, _II, _Deque_iterator<>)): New. * include/std/numeric (__is_random_access_iter): Move... * include/bits/stl_iterator_base_types.h (__is_random_access_iter): ... here. Provide pre-C++11 definition. * include/debug/debug.h (_Safe_iterator<>): New declaration. * include/debug/safe_iterator.h (_Safe_iterator<>::_M_can_advance): Add __strict parameter. * include/debug/safe_iterator.tcc: Include <bits/stl_algobase.h>. (_Safe_iterator<>::_M_can_advance): Adapt. (std::__copy_move_a, std::__copy_move_backward_a, __fill_a): New. (__fill_n_a, __equal_aux): New. * include/debug/stl_iterator.h (__niter_base): Remove. * include/debug/vector (__niter_base): Remove. * testsuite/performance/25_algorithms/copy_backward_deque_iterators.cc: Include <vector> and <list>. Add benches. * testsuite/performance/25_algorithms/copy_deque_iterators.cc: Likewise. * testsuite/performance/25_algorithms/equal_deque_iterators.cc: Likewise. * testsuite/25_algorithms/copy/debug/1_neg.cc: New. * testsuite/25_algorithms/copy/deque_iterators/2.cc: New. * testsuite/25_algorithms/copy/deque_iterators/31.cc: New. * testsuite/25_algorithms/copy/deque_iterators/32.cc: New. * testsuite/25_algorithms/copy/deque_iterators/33.cc: New. * testsuite/25_algorithms/copy/deque_iterators/41.cc: New. * testsuite/25_algorithms/copy/deque_iterators/42.cc: New. * testsuite/25_algorithms/copy/deque_iterators/43.cc: New. * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc (test02): New. * testsuite/25_algorithms/copy_backward/deque_iterators/2.cc: New. * testsuite/25_algorithms/equal/deque_iterators/1.cc: New. * testsuite/25_algorithms/fill/deque_iterators/1.cc: New. * testsuite/25_algorithms/move/deque_iterators/2.cc: New. * testsuite/25_algorithms/move_backward/deque_iterators/2.cc: New. From-SVN: r279201 |
||
---|---|---|
.. | ||
adjacent_find | ||
advance/istreambuf_iterators | ||
all_of | ||
any_of | ||
binary_search | ||
clamp | ||
copy | ||
copy_backward | ||
copy_if | ||
copy_n | ||
count | ||
count_if | ||
equal | ||
equal_range | ||
fill | ||
fill_n | ||
find | ||
find_end | ||
find_first_of | ||
find_if | ||
find_if_not | ||
for_each | ||
generate | ||
generate_n | ||
headers | ||
heap | ||
includes | ||
inplace_merge | ||
is_heap | ||
is_heap_until | ||
is_partitioned | ||
is_permutation | ||
is_sorted | ||
is_sorted_until | ||
iter_swap | ||
lexicographical_compare | ||
lexicographical_compare_three_way | ||
lower_bound | ||
make_heap | ||
max | ||
max_element | ||
merge | ||
min | ||
min_element | ||
minmax | ||
minmax_element | ||
mismatch | ||
move | ||
move_backward | ||
next_permutation | ||
none_of | ||
nth_element | ||
partial_sort | ||
partial_sort_copy | ||
partition | ||
partition_copy | ||
partition_point | ||
pop_heap | ||
prev_permutation | ||
pstl | ||
push_heap | ||
random_shuffle | ||
remove | ||
remove_copy | ||
remove_copy_if | ||
remove_if | ||
replace | ||
replace_copy | ||
replace_copy_if | ||
replace_if | ||
reverse | ||
reverse_copy | ||
rotate | ||
rotate_copy | ||
sample | ||
search | ||
search_n | ||
set_difference | ||
set_intersection | ||
set_symmetric_difference | ||
set_union | ||
shuffle | ||
sort | ||
sort_heap | ||
stable_partition | ||
stable_sort | ||
swap | ||
swap_ranges | ||
transform | ||
unique | ||
unique_copy | ||
upper_bound | ||
constexpr_macro.cc | ||
cpp_lib_constexpr.cc |