From b39e41be2b743acb10f0b8b0bb491524fb17c77a Mon Sep 17 00:00:00 2001 From: AlexanderSaydakov Date: Tue, 7 Nov 2023 14:46:06 -0800 Subject: [PATCH 1/6] 5.0.0 --- version.cfg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.cfg.in b/version.cfg.in index 57751565..0062ac97 100644 --- a/version.cfg.in +++ b/version.cfg.in @@ -1 +1 @@ -4.2.@DT@.@HHMM@ +5.0.0 From 4fda055ddb59d274a4c1189f9818b6cba6de0517 Mon Sep 17 00:00:00 2001 From: Jon Malkin <786705+jmalkin@users.noreply.github.com> Date: Wed, 29 Nov 2023 23:59:50 -0800 Subject: [PATCH 2/6] Minor tweak to ebpps items to string to help the method work with non-char types --- sampling/include/ebpps_sample_impl.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sampling/include/ebpps_sample_impl.hpp b/sampling/include/ebpps_sample_impl.hpp index afa4dcac..f379841b 100644 --- a/sampling/include/ebpps_sample_impl.hpp +++ b/sampling/include/ebpps_sample_impl.hpp @@ -178,7 +178,11 @@ string ebpps_sample::to_string() const { uint32_t idx = 0; for (const T& item : data_) oss << "\t" << idx++ << ":\t" << item << std::endl; - oss << " partial: " << (bool(partial_item_) ? (*partial_item_) : "NULL") << std::endl; + oss << " partial: "; + if (bool(partial_item_)) + oss << (*partial_item_) << std::endl; + else + oss << "NULL" << std::endl; return oss.str(); } From ffbfce6686c3f9dfeb27a9f0584a67e698838b68 Mon Sep 17 00:00:00 2001 From: Jon Malkin <786705+jmalkin@users.noreply.github.com> Date: Fri, 1 Dec 2023 20:49:34 -0800 Subject: [PATCH 3/6] fix kil_helper to avoid in-place std::move calls which breack nanobind ref counting (and perhaps other similar objects) --- kll/include/kll_helper_impl.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kll/include/kll_helper_impl.hpp b/kll/include/kll_helper_impl.hpp index e763c575..bb92bdc7 100644 --- a/kll/include/kll_helper_impl.hpp +++ b/kll/include/kll_helper_impl.hpp @@ -230,7 +230,8 @@ kll_helper::compress_result kll_helper::general_compress(uint16_t k, uint8_t m, // move level over as is // make sure we are not moving data upwards if (raw_beg < out_levels[current_level]) throw std::logic_error("wrong move"); - std::move(items + raw_beg, items + raw_lim, items + out_levels[current_level]); + if (raw_beg != out_levels[current_level]) + std::move(items + raw_beg, items + raw_lim, items + out_levels[current_level]); out_levels[current_level + 1] = out_levels[current_level] + raw_pop; } else { // The sketch is too full AND this level is too full, so we compact it @@ -243,7 +244,8 @@ kll_helper::compress_result kll_helper::general_compress(uint16_t k, uint8_t m, const auto half_adj_pop = adj_pop / 2; if (odd_pop) { // move one guy over - items[out_levels[current_level]] = std::move(items[raw_beg]); + if (out_levels[current_level] != raw_beg) + items[out_levels[current_level]] = std::move(items[raw_beg]); out_levels[current_level + 1] = out_levels[current_level] + 1; } else { // even number of items out_levels[current_level + 1] = out_levels[current_level]; From 247b4c4310bd03c6ebe9468f8340f8ff8fbd5e80 Mon Sep 17 00:00:00 2001 From: Jon Malkin <786705+jmalkin@users.noreply.github.com> Date: Wed, 13 Dec 2023 23:28:25 -0800 Subject: [PATCH 4/6] cherry pick a couple bugfixes --- version.cfg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.cfg.in b/version.cfg.in index 0062ac97..6b244dcd 100644 --- a/version.cfg.in +++ b/version.cfg.in @@ -1 +1 @@ -5.0.0 +5.0.1 From a7697f4e00cc2d4abcfb8aa3b9ef270f93d6dbb8 Mon Sep 17 00:00:00 2001 From: Jon Malkin <786705+jmalkin@users.noreply.github.com> Date: Tue, 28 Nov 2023 15:27:37 -0800 Subject: [PATCH 5/6] density sketch c++17 compatibility std::random_shuffle() is removed in c++17 so this ensures strict compatibility with the standard by using a c++11-compatible method to achieve the same goal. --- density/include/density_sketch_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/density/include/density_sketch_impl.hpp b/density/include/density_sketch_impl.hpp index 1144814a..a5a5bc0f 100755 --- a/density/include/density_sketch_impl.hpp +++ b/density/include/density_sketch_impl.hpp @@ -144,7 +144,7 @@ void density_sketch::compact_level(unsigned height) { auto& level = levels_[height]; std::vector bits(level.size()); bits[0] = random_utils::random_bit(); - std::random_shuffle(level.begin(), level.end()); + std::shuffle(level.begin(), level.end(), random_utils::rand); for (unsigned i = 1; i < level.size(); ++i) { T delta = 0; for (unsigned j = 0; j < i; ++j) { From d2f7031529c2bb1444063e1dc908cc63cc9c35b8 Mon Sep 17 00:00:00 2001 From: Jon Malkin <786705+jmalkin@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:17:35 -0800 Subject: [PATCH 6/6] Version bump to 5.0.2 --- version.cfg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.cfg.in b/version.cfg.in index 6b244dcd..a1ef0cae 100644 --- a/version.cfg.in +++ b/version.cfg.in @@ -1 +1 @@ -5.0.1 +5.0.2