This is an automated email from the ASF dual-hosted git repository.
alsay pushed a commit to branch density_sketch
in repository https://gitbox.apache.org/repos/asf/datasketches-cpp.git
The following commit(s) were added to refs/heads/density_sketch by this push:
new cd64f79 init with floating-point 0 (affects performance for some
reason)
cd64f79 is described below
commit cd64f794014317508cd610f06c567b75a5ba14ff
Author: AlexanderSaydakov <[email protected]>
AuthorDate: Fri Jan 6 13:35:23 2023 -0800
init with floating-point 0 (affects performance for some reason)
---
density/include/density_sketch.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/density/include/density_sketch.hpp
b/density/include/density_sketch.hpp
index df3729b..8393bad 100755
--- a/density/include/density_sketch.hpp
+++ b/density/include/density_sketch.hpp
@@ -42,7 +42,7 @@ namespace datasketches {
template<typename T>
struct gaussian_kernel {
T operator()(const std::vector<T>& v1, const std::vector<T>& v2) const {
- return exp(-std::inner_product(v1.begin(), v1.end(), v2.begin(), 0,
std::plus<T>(), [](T a, T b){return (a-b)*(a-b);}));
+ return exp(-std::inner_product(v1.begin(), v1.end(), v2.begin(), 0.0,
std::plus<T>(), [](T a, T b){return (a-b)*(a-b);}));
}
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]