Skip to content
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

5.0.1 patch #411

Merged
merged 3 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions kll/include/kll_helper_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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];
Expand Down
6 changes: 5 additions & 1 deletion sampling/include/ebpps_sample_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,11 @@ string<A> ebpps_sample<T ,A>::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();
}
Expand Down
2 changes: 1 addition & 1 deletion version.cfg.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.0
5.0.1