zclllyybb commented on code in PR #31583:
URL: https://github.com/apache/doris/pull/31583#discussion_r1509922550


##########
be/src/vec/functions/round.h:
##########
@@ -217,75 +230,30 @@ class BaseFloatRoundingComputation<Float64> {
     static VectorType divide(VectorType val, VectorType scale) { return 
_mm_div_pd(val, scale); }
     template <RoundingMode mode>
     static VectorType apply(VectorType val) {
-        return _mm_round_pd(val, int(mode));
+        if constexpr (mode != RoundingMode::Round) {
+            return _mm_round_pd(val, int(mode));

Review Comment:
   we could use a marco to check the SSE4.1 enable state. and use the most 
proper simd instructions with `_mm` or `_mm256`. u can see the similar usage in 
our code.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to