This is an automated email from the ASF dual-hosted git repository.

jmalkin pushed a commit to branch density_custom_kernel
in repository https://gitbox.apache.org/repos/asf/datasketches-cpp.git

commit caea3fb01955a2127742795ee159f6917e36686a
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]

Reply via email to