You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/06/03 13:28:17 UTC

[GitHub] [incubator-doris] PragmaTwice commented on a diff in pull request #9939: [Enhancement] Refactor functions in int_exp by templates

PragmaTwice commented on code in PR #9939:
URL: https://github.com/apache/incubator-doris/pull/9939#discussion_r888944806


##########
be/src/vec/common/int_exp.h:
##########
@@ -22,6 +22,34 @@
 
 #include <cstdint>
 #include <limits>
+#include <utility>
+
+namespace exp_details {
+
+// compile-time exp(v, n) by linear recursion
+template <typename T, T v, std::size_t n>
+constexpr inline const T exp = v* exp<T, v, n - 1>;

Review Comment:
   done



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org