github-actions[bot] commented on code in PR #18456:
URL: https://github.com/apache/doris/pull/18456#discussion_r1160426006


##########
be/src/exprs/block_bloom_filter.hpp:
##########
@@ -78,6 +80,49 @@ class BlockBloomFilter {
         }
     }
 
+    // This function is only to be used if the be_exec_version may be less 
than 2. If updated, please delete it.
+    void insert_new_hash(const Slice& key) noexcept {
+        if (key.data) {
+            insert(HashUtil::crc_hash(key.data, key.size, _hash_seed));
+        }
+    }
+
+#ifdef __AVX2__
+
+    static inline ATTRIBUTE_ALWAYS_INLINE __attribute__((__target__("avx2"))) 
__m256i make_mark(
+            const uint32_t hash) {
+        const __m256i ones = _mm256_set1_epi32(1);
+        const __m256i rehash = _mm256_setr_epi32(BLOOM_HASH_CONSTANTS);
+        // Load hash into a YMM register, repeated eight times
+        __m256i hash_data = _mm256_set1_epi32(hash);
+        // Multiply-shift hashing ala Dietzfelbinger et al.: multiply 'hash' 
by eight different
+        // odd constants, then keep the 5 most significant bits from each 
product.
+        hash_data = _mm256_mullo_epi32(rehash, hash_data);
+        hash_data = _mm256_srli_epi32(hash_data, 27);
+        // Use these 5 bits to shift a single bit to a location in each 32-bit 
lane
+        return _mm256_sllv_epi32(ones, hash_data);
+    }
+#endif
+
+
+
+#ifdef __AVX2__
+
+    static inline ATTRIBUTE_ALWAYS_INLINE __attribute__((__target__("avx2"))) 
__m256i make_mark(

Review Comment:
   warning: class member cannot be redeclared [clang-diagnostic-error]
   ```cpp
       static inline ATTRIBUTE_ALWAYS_INLINE 
__attribute__((__target__("avx2"))) __m256i make_mark(
                                                                                
         ^
   ```
   **be/src/exprs/block_bloom_filter.hpp:91:** previous definition is here
   ```cpp
       static inline ATTRIBUTE_ALWAYS_INLINE 
__attribute__((__target__("avx2"))) __m256i make_mark(
                                                                                
         ^
   ```
   



##########
be/src/exprs/block_bloom_filter.hpp:
##########
@@ -113,6 +158,25 @@
         return result;
 #else
         return bucket_find(bucket_idx, hash);
+#endif
+    }
+    ALWAYS_INLINE bool find(uint32_t hash) const noexcept {

Review Comment:
   warning: class member cannot be redeclared [clang-diagnostic-error]
   ```cpp
       ALWAYS_INLINE bool find(uint32_t hash) const noexcept {
                          ^
   ```
   **be/src/exprs/block_bloom_filter.hpp:143:** previous definition is here
   ```cpp
       ALWAYS_INLINE bool find(uint32_t hash) const noexcept {
                          ^
   ```
   



##########
be/src/exprs/block_bloom_filter.hpp:
##########
@@ -78,6 +80,49 @@
         }
     }
 
+    // This function is only to be used if the be_exec_version may be less 
than 2. If updated, please delete it.
+    void insert_new_hash(const Slice& key) noexcept {
+        if (key.data) {
+            insert(HashUtil::crc_hash(key.data, key.size, _hash_seed));
+        }
+    }
+
+#ifdef __AVX2__
+
+    static inline ATTRIBUTE_ALWAYS_INLINE __attribute__((__target__("avx2"))) 
__m256i make_mark(
+            const uint32_t hash) {
+        const __m256i ones = _mm256_set1_epi32(1);
+        const __m256i rehash = _mm256_setr_epi32(BLOOM_HASH_CONSTANTS);
+        // Load hash into a YMM register, repeated eight times
+        __m256i hash_data = _mm256_set1_epi32(hash);
+        // Multiply-shift hashing ala Dietzfelbinger et al.: multiply 'hash' 
by eight different
+        // odd constants, then keep the 5 most significant bits from each 
product.
+        hash_data = _mm256_mullo_epi32(rehash, hash_data);
+        hash_data = _mm256_srli_epi32(hash_data, 27);
+        // Use these 5 bits to shift a single bit to a location in each 32-bit 
lane
+        return _mm256_sllv_epi32(ones, hash_data);
+    }
+#endif
+
+
+
+#ifdef __AVX2__
+
+    static inline ATTRIBUTE_ALWAYS_INLINE __attribute__((__target__("avx2"))) 
__m256i make_mark(
+            const uint32_t hash) {
+        const __m256i ones = _mm256_set1_epi32(1);
+        const __m256i rehash = _mm256_setr_epi32(BLOOM_HASH_CONSTANTS);
+        // Load hash into a YMM register, repeated eight times
+        __m256i hash_data = _mm256_set1_epi32(hash);
+        // Multiply-shift hashing ala Dietzfelbinger et al.: multiply 'hash' 
by eight different
+        // odd constants, then keep the 5 most significant bits from each 
product.
+        hash_data = _mm256_mullo_epi32(rehash, hash_data);
+        hash_data = _mm256_srli_epi32(hash_data, 27);
+        // Use these 5 bits to shift a single bit to a location in each 32-bit 
lane
+        return _mm256_sllv_epi32(ones, hash_data);
+    }
+#endif
+
 #ifdef __AVX2__
 
     static inline ATTRIBUTE_ALWAYS_INLINE __attribute__((__target__("avx2"))) 
__m256i make_mark(

Review Comment:
   warning: class member cannot be redeclared [clang-diagnostic-error]
   ```cpp
       static inline ATTRIBUTE_ALWAYS_INLINE 
__attribute__((__target__("avx2"))) __m256i make_mark(
                                                                                
         ^
   ```
   **be/src/exprs/block_bloom_filter.hpp:91:** previous definition is here
   ```cpp
       static inline ATTRIBUTE_ALWAYS_INLINE 
__attribute__((__target__("avx2"))) __m256i make_mark(
                                                                                
         ^
   ```
   



-- 
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