This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 1a2aff22209 branch-3.0: [Bug](compile) fix compile error in master
branch about GCC #42936 (#48665)
1a2aff22209 is described below
commit 1a2aff22209ff83e8bece2cfa86212a454dbe14b
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Mar 6 11:45:35 2025 +0800
branch-3.0: [Bug](compile) fix compile error in master branch about GCC
#42936 (#48665)
Cherry-picked from #42936
Co-authored-by: zhangstar333
<[email protected]>
---
be/src/vec/functions/url/find_symbols.h | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/be/src/vec/functions/url/find_symbols.h
b/be/src/vec/functions/url/find_symbols.h
index 7af95ce06bd..0fa0588e656 100644
--- a/be/src/vec/functions/url/find_symbols.h
+++ b/be/src/vec/functions/url/find_symbols.h
@@ -118,21 +118,22 @@ inline __m128i mm_is_in(__m128i bytes, const char*
symbols, size_t num_chars) {
return accumulator;
}
-inline std::array<__m128i, 16u> mm_is_in_prepare(const char* symbols, size_t
num_chars) {
- std::array<__m128i, 16u> result {};
+using AlignedArray = std::array<std::aligned_storage_t<sizeof(__m128i),
alignof(__m128i)>, 16>;
+inline AlignedArray mm_is_in_prepare(const char* symbols, size_t num_chars) {
+ AlignedArray result {};
for (size_t i = 0; i < num_chars; ++i) {
- result[i] = _mm_set1_epi8(symbols[i]);
+ reinterpret_cast<__m128i&>(result[i]) = _mm_set1_epi8(symbols[i]);
}
return result;
}
-inline __m128i mm_is_in_execute(__m128i bytes, const std::array<__m128i, 16u>&
needles) {
+inline __m128i mm_is_in_execute(__m128i bytes, const AlignedArray& needles) {
__m128i accumulator = _mm_setzero_si128();
for (const auto& needle : needles) {
- __m128i eq = _mm_cmpeq_epi8(bytes, needle);
+ __m128i eq = _mm_cmpeq_epi8(bytes, reinterpret_cast<const
__m128i&>(needle));
accumulator = _mm_or_si128(accumulator, eq);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]