You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by jm...@apache.org on 2022/04/23 07:09:52 UTC
[datasketches-cpp] branch quantiles updated: clean up a few warnings
This is an automated email from the ASF dual-hosted git repository.
jmalkin pushed a commit to branch quantiles
in repository https://gitbox.apache.org/repos/asf/datasketches-cpp.git
The following commit(s) were added to refs/heads/quantiles by this push:
new e2d2bec clean up a few warnings
e2d2bec is described below
commit e2d2becc29443881388f76e78a551ae8e14626e2
Author: Jon <jm...@apache.org>
AuthorDate: Sat Apr 23 00:09:37 2022 -0700
clean up a few warnings
---
quantiles/include/quantiles_sketch_impl.hpp | 4 ++--
quantiles/test/quantiles_sketch_test.cpp | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/quantiles/include/quantiles_sketch_impl.hpp b/quantiles/include/quantiles_sketch_impl.hpp
index 2da61f6..cf620d3 100644
--- a/quantiles/include/quantiles_sketch_impl.hpp
+++ b/quantiles/include/quantiles_sketch_impl.hpp
@@ -1112,8 +1112,8 @@ void quantiles_sketch<T, C, A>::downsampling_merge(quantiles_sketch<T,C,A>& tgt,
}
assert(!src.is_empty());
- const uint32_t downsample_factor = src.get_k() / tgt.get_k();
- const uint32_t lg_sample_factor = count_trailing_zeros_in_u32(downsample_factor);
+ const uint16_t downsample_factor = src.get_k() / tgt.get_k();
+ const uint8_t lg_sample_factor = count_trailing_zeros_in_u32(downsample_factor);
uint64_t new_n = src.get_n() + tgt.get_n();
diff --git a/quantiles/test/quantiles_sketch_test.cpp b/quantiles/test/quantiles_sketch_test.cpp
index 130f9f9..8860e4a 100644
--- a/quantiles/test/quantiles_sketch_test.cpp
+++ b/quantiles/test/quantiles_sketch_test.cpp
@@ -574,7 +574,7 @@ TEST_CASE("quantiles sketch", "[quantiles_sketch]") {
REQUIRE(sketch1.get_max_value() == n - 1);
REQUIRE(sketch1.get_quantile(0.5) == Approx(n / 2).margin(n / 2 * RANK_EPS_FOR_K_128));
- sketch2.update(0);
+ sketch2.update(static_cast<float>(0));
sketch1.merge(sketch2);
// rank error should not be affected by a merge with a sketch in exact mode with lower k
REQUIRE(sketch1.get_normalized_rank_error(true) == rank_error_before_merge);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org