github-actions[bot] commented on code in PR #29919: URL: https://github.com/apache/doris/pull/29919#discussion_r1452004037
########## be/src/vec/common/memcpy_small.h: ########## @@ -91,3 +94,32 @@ memcpy(lhs, rhs, sizeof(T)); } } + +template <int max_size> +inline void memcpy_small(char* lhs, const char* rhs, size_t n) { + DCHECK_NE(n, 0); + if constexpr (max_size >= 4) { + if (n >= 4) { + memcpy_fixed<uint32_t>(lhs, rhs); + lhs += 4; + rhs += 4; + n -= 4; + } + } + while (n >= 1) { + memcpy_fixed<uint8_t>(lhs, rhs); + lhs++; + rhs++; + n--; + } +} + +template <> +inline void memcpy_small<2>(char* lhs, const char* rhs, size_t n) { Review Comment: warning: pointer parameter 'lhs' can be pointer to const [readability-non-const-parameter] ```suggestion inline void memcpy_small<2>(const char* lhs, const char* rhs, size_t n) { ``` ########## be/src/vec/common/memcpy_small.h: ########## @@ -20,8 +20,11 @@ #pragma once +#include <glog/logging.h> Review Comment: warning: 'glog/logging.h' file not found [clang-diagnostic-error] ```cpp #include <glog/logging.h> ^ ``` -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org