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

changchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 40ec2cc88f [GLUTEN-7654][CH] Fix round for arm (#7794)
40ec2cc88f is described below

commit 40ec2cc88f94a68c9f0f97f147ee6b8431bc2d8e
Author: Wenzheng Liu <[email protected]>
AuthorDate: Tue Nov 5 16:13:58 2024 +0800

    [GLUTEN-7654][CH] Fix round for arm (#7794)
---
 cpp-ch/local-engine/Functions/SparkFunctionRoundHalfUp.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/cpp-ch/local-engine/Functions/SparkFunctionRoundHalfUp.h 
b/cpp-ch/local-engine/Functions/SparkFunctionRoundHalfUp.h
index 432595e091..3e219b51a6 100644
--- a/cpp-ch/local-engine/Functions/SparkFunctionRoundHalfUp.h
+++ b/cpp-ch/local-engine/Functions/SparkFunctionRoundHalfUp.h
@@ -111,7 +111,14 @@ public:
     template <RoundingMode mode>
     static VectorType apply(VectorType val)
     {
-        return roundWithMode(val, mode);
+        if constexpr (std::is_same_v<ScalarType, Float32>)
+        {
+            return std::roundf(val);
+        }
+        else
+        {
+            return std::round(val);
+        }
     }
 
     static VectorType prepare(size_t scale)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to