You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by al...@apache.org on 2020/03/27 01:11:01 UTC
[incubator-datasketches-characterization] branch bounds updated:
fabs for gcc4 compatibility
This is an automated email from the ASF dual-hosted git repository.
alsay pushed a commit to branch bounds
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-characterization.git
The following commit(s) were added to refs/heads/bounds by this push:
new ea0e0dd fabs for gcc4 compatibility
ea0e0dd is described below
commit ea0e0ddc15f98590e18ebfb8939cfc99a92d3cb8
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Thu Mar 26 18:10:49 2020 -0700
fabs for gcc4 compatibility
---
cpp/src/kll_merge_accuracy_profile.cpp | 4 ++--
cpp/src/kll_sketch_accuracy_profile.cpp | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cpp/src/kll_merge_accuracy_profile.cpp b/cpp/src/kll_merge_accuracy_profile.cpp
index 65db044..c117264 100644
--- a/cpp/src/kll_merge_accuracy_profile.cpp
+++ b/cpp/src/kll_merge_accuracy_profile.cpp
@@ -45,13 +45,13 @@ double kll_merge_accuracy_profile::run_trial(float* values, unsigned stream_leng
}
kll_sketch<float> sketch;
- for (unsigned i = 0; i < num_sketches; i++) sketch.merge(*sketches[i]);
+ for (unsigned i = 0; i < num_sketches; i++) sketch.merge(std::move(*sketches[i]));
double max_rank_error = 0;
for (size_t i = 0; i < stream_length; i++) {
double true_rank = static_cast<double>(i) / stream_length;
double est_rank = sketch.get_rank(i);
- max_rank_error = std::max(max_rank_error, abs(true_rank - est_rank));
+ max_rank_error = std::max(max_rank_error, fabs(true_rank - est_rank));
}
return max_rank_error;
diff --git a/cpp/src/kll_sketch_accuracy_profile.cpp b/cpp/src/kll_sketch_accuracy_profile.cpp
index 2caa3e2..ece5c6b 100644
--- a/cpp/src/kll_sketch_accuracy_profile.cpp
+++ b/cpp/src/kll_sketch_accuracy_profile.cpp
@@ -38,7 +38,7 @@ double kll_sketch_accuracy_profile::run_trial(float* values, unsigned stream_len
for (size_t i = 0; i < stream_length; i++) {
double true_rank = (double) i / stream_length;
double est_rank = sketch.get_rank(i);
- max_rank_error = std::max(max_rank_error, abs(true_rank - est_rank));
+ max_rank_error = std::max(max_rank_error, fabs(true_rank - est_rank));
}
return max_rank_error;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org