Skip to content

Commit

Permalink
Update contrib/restricted/boost/move to 1.82.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robot-piglet committed May 1, 2023
1 parent 7681365 commit d673f0b
Show file tree
Hide file tree
Showing 17 changed files with 202 additions and 131 deletions.
3 changes: 0 additions & 3 deletions contrib/restricted/boost/move/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,5 @@ target_include_directories(restricted-boost-move INTERFACE
target_link_libraries(restricted-boost-move INTERFACE
contrib-libs-linux-headers
contrib-libs-cxxsupp
restricted-boost-assert
restricted-boost-config
restricted-boost-core
restricted-boost-static_assert
)
8 changes: 4 additions & 4 deletions contrib/restricted/boost/move/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Distributed under the [Boost Software License, Version 1.0](http://www.boost.org

### Build Status

Branch | Travis | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
:-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
[`master`](https://github.com/boostorg/move/tree/master) | [![Build Status](https://travis-ci.org/boostorg/move.svg?branch=master)](https://travis-ci.org/boostorg/move) | [![Build status](https://ci.appveyor.com/api/projects/status/9ckrveolxsonxfnb/branch/master?svg=true)](https://ci.appveyor.com/project/jeking3/move-0k1xg/branch/master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/16048/badge.svg)](https://scan.coverity.com/projects/boostorg-move) | [![codecov](https://codecov.io/gh/boostorg/move/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/move/branch/master)| [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/move.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/move.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/move.html)
[`develop`](https://github.com/boostorg/move/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/move.svg?branch=develop)](https://travis-ci.org/boostorg/move) | [![Build status](https://ci.appveyor.com/api/projects/status/9ckrveolxsonxfnb/branch/develop?svg=true)](https://ci.appveyor.com/project/jeking3/move-0k1xg/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/16048/badge.svg)](https://scan.coverity.com/projects/boostorg-move) | [![codecov](https://codecov.io/gh/boostorg/move/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/move/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/move.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/move.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/move.html)
Branch | Deps | Docs | Tests |
:-------------: | ---- | ---- | ----- |
[`master`](https://github.com/boostorg/move/tree/master) | [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/move.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/move.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/move.html)
[`develop`](https://github.com/boostorg/move/tree/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/move.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/move.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/move.html)

### Directories

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include <boost/move/detail/config_begin.hpp>
#include <boost/move/algo/detail/adaptive_sort_merge.hpp>
#include <cassert>

#if defined(BOOST_CLANG) || (defined(BOOST_GCC) && (BOOST_GCC >= 40600))
#pragma GCC diagnostic push
Expand Down Expand Up @@ -53,7 +54,7 @@ inline void adaptive_merge_combine_blocks( RandIt first
if(xbuf.size() < l_block){
xbuf.initialize_until(l_block, *first);
}
BOOST_ASSERT(xbuf.size() >= l_block);
assert(xbuf.size() >= l_block);
size_type n_block_a, n_block_b, l_irreg1, l_irreg2;
combine_params( keys, comp, l_combine
, l_combine1, l_block, xbuf
Expand Down Expand Up @@ -91,7 +92,7 @@ inline void adaptive_merge_combine_blocks( RandIt first
, l_combine1, l_block, xbuf
, n_block_a, n_block_b, l_irreg1, l_irreg2, true); //Outputs
BOOST_MOVE_ADAPTIVE_SORT_PRINT_L2(" A combine: ", len);
BOOST_ASSERT(xbuf.size() >= l_block);
assert(xbuf.size() >= l_block);
op_merge_blocks_with_buf
(uint_keys, less(), first, l_block, l_irreg1, n_block_a, n_block_b, l_irreg2, comp, move_op(), xbuf.data());
xbuf.clear();
Expand Down Expand Up @@ -163,7 +164,7 @@ inline SizeType adaptive_merge_n_keys_intbuf(SizeType &rl_block, SizeType len1,

//This is the minimum number of keys to implement the ideal algorithm
size_type n_keys = adaptive_merge_n_keys_without_external_keys(l_block, len1, len2, l_intbuf);
BOOST_ASSERT(n_keys >= ((len1-l_intbuf-n_keys)/l_block + len2/l_block));
assert(n_keys >= ((len1-l_intbuf-n_keys)/l_block + len2/l_block));

if(xbuf.template supports_aligned_trailing<size_type>
( l_block
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <boost/move/detail/config_begin.hpp>

#include <boost/move/algo/detail/adaptive_sort_merge.hpp>
#include <boost/core/ignore_unused.hpp>
#include <cassert>

#if defined(BOOST_CLANG) || (defined(BOOST_GCC) && (BOOST_GCC >= 40600))
#pragma GCC diagnostic push
Expand Down Expand Up @@ -93,8 +93,8 @@ typename iter_size<RandIt>::type
, Compare comp)
{
typedef typename iter_size<RandIt>::type size_type;
BOOST_ASSERT(l_build_buf <= len);
BOOST_ASSERT(0 == ((l_build_buf / l_base)&(l_build_buf/l_base-1)));
assert(l_build_buf <= len);
assert(0 == ((l_build_buf / l_base)&(l_build_buf/l_base-1)));

//Place the start pointer after the buffer
RandIt first_block = first + l_build_buf;
Expand All @@ -105,7 +105,7 @@ typename iter_size<RandIt>::type
//////////////////////////////////
size_type l_merged = 0u;

BOOST_ASSERT(l_build_buf);
assert(l_build_buf);
//If there is no enough buffer for the insertion sort step, just avoid the external buffer
size_type kbuf = min_value<size_type>(l_build_buf, size_type(xbuf.capacity()));
kbuf = kbuf < l_base ? 0 : kbuf;
Expand Down Expand Up @@ -136,7 +136,7 @@ typename iter_size<RandIt>::type
l_merged = op_merge_left_step_multiple
(first_block-l_merged, elements_in_blocks, l_merged, l_build_buf, size_type(l_build_buf - l_merged), comp, swap_op());

BOOST_ASSERT(l_merged == l_build_buf);
assert(l_merged == l_build_buf);

//////////////////////////////////
// Start of merge to right step
Expand Down Expand Up @@ -172,7 +172,7 @@ void adaptive_sort_combine_blocks
, Compare comp
, bool merge_left)
{
boost::ignore_unused(xbuf);
boost::movelib::ignore(xbuf);
typedef typename iter_size<RandIt>::type size_type;

size_type const l_reg_combined = size_type(2u*l_prev_merged);
Expand All @@ -181,8 +181,8 @@ void adaptive_sort_combine_blocks
size_type const n_reg_combined = len/l_reg_combined;
RandIt combined_first = first;

boost::ignore_unused(l_total_combined);
BOOST_ASSERT(l_total_combined <= len);
boost::movelib::ignore(l_total_combined);
assert(l_total_combined <= len);

size_type const max_i = size_type(n_reg_combined + (l_irreg_combined != 0));

Expand Down Expand Up @@ -278,9 +278,9 @@ bool adaptive_sort_combine_all_blocks
//Otherwise, just give up and and use all keys to merge using rotations (use_internal_buf = false)
bool use_internal_buf = false;
size_type const l_block = lblock_for_combine(l_intbuf, n_keys, size_type(2*l_merged), use_internal_buf);
BOOST_ASSERT(!l_intbuf || (l_block == l_intbuf));
BOOST_ASSERT(n == 0 || (!use_internal_buf || prev_use_internal_buf) );
BOOST_ASSERT(n == 0 || (!use_internal_buf || l_prev_block == l_block) );
assert(!l_intbuf || (l_block == l_intbuf));
assert(n == 0 || (!use_internal_buf || prev_use_internal_buf) );
assert(n == 0 || (!use_internal_buf || l_prev_block == l_block) );

bool const is_merge_left = (n&1) == 0;
size_type const l_total_combined = calculate_total_combined(l_data, l_merged);
Expand Down Expand Up @@ -332,7 +332,7 @@ bool adaptive_sort_combine_all_blocks
l_prev_block = l_block;
prev_use_internal_buf = use_internal_buf;
}
BOOST_ASSERT(l_prev_total_combined == l_data);
assert(l_prev_total_combined == l_data);
bool const buffer_right = prev_use_internal_buf && prev_merge_left;

l_intbuf = prev_use_internal_buf ? l_prev_block : 0u;
Expand All @@ -359,7 +359,7 @@ void adaptive_sort_final_merge( bool buffer_right
, XBuf & xbuf
, Compare comp)
{
//BOOST_ASSERT(n_keys || xbuf.size() == l_intbuf);
//assert(n_keys || xbuf.size() == l_intbuf);
xbuf.clear();

typedef typename iter_size<RandIt>::type size_type;
Expand Down Expand Up @@ -423,7 +423,7 @@ bool adaptive_sort_build_params
--n_min_ideal_keys;
}
++n_min_ideal_keys;
BOOST_ASSERT(n_min_ideal_keys <= l_intbuf);
assert(n_min_ideal_keys <= l_intbuf);

if(xbuf.template supports_aligned_trailing<size_type>
(l_intbuf, size_type((size_type(len-l_intbuf)-1u)/l_intbuf+1u))){
Expand Down Expand Up @@ -460,7 +460,7 @@ bool adaptive_sort_build_params
//If collected keys are not enough, try to fix n_keys and l_intbuf. If no fix
//is possible (due to very low unique keys), then go to a slow sort based on rotations.
else{
BOOST_ASSERT(collected < (n_min_ideal_keys+l_intbuf));
assert(collected < (n_min_ideal_keys+l_intbuf));
if(collected < 4){ //No combination possible with less that 4 keys
return false;
}
Expand All @@ -476,7 +476,7 @@ bool adaptive_sort_build_params
l_intbuf = 0;
l_build_buf = n_keys;
}
BOOST_ASSERT((n_keys+l_intbuf) >= l_build_buf);
assert((n_keys+l_intbuf) >= l_build_buf);
}

return true;
Expand Down Expand Up @@ -557,7 +557,7 @@ void adaptive_sort_impl
}
else{
//Make sure it is at least four
BOOST_STATIC_ASSERT(AdaptiveSortInsertionSortThreshold >= 4);
BOOST_MOVE_STATIC_ASSERT(AdaptiveSortInsertionSortThreshold >= 4);

size_type l_base = 0;
size_type l_intbuf = 0;
Expand All @@ -570,12 +570,12 @@ void adaptive_sort_impl
stable_sort(first, first+len, comp, xbuf);
}
else{
BOOST_ASSERT(l_build_buf);
assert(l_build_buf);
//Otherwise, continue the adaptive_sort
BOOST_MOVE_ADAPTIVE_SORT_PRINT_L1("\n After collect_unique: ", len);
size_type const n_key_plus_buf = size_type(l_intbuf+n_keys);
//l_build_buf is always power of two if l_intbuf is zero
BOOST_ASSERT(l_intbuf || (0 == (l_build_buf & (l_build_buf-1))));
assert(l_intbuf || (0 == (l_build_buf & (l_build_buf-1))));

//Classic merge sort until internal buffer and xbuf are exhausted
size_type const l_merged = adaptive_sort_build_blocks
Expand Down
Loading

0 comments on commit d673f0b

Please sign in to comment.