MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Hash64AVX_256_Impl

Function Hash64AVX_256_Impl

tensorflow/core/lib/hash/hash.cc:231–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231inline void Hash64AVX_256_Impl(const char*& data, size_t& n, uint64& h,
232 const uint64& m, const int& r) {
233 __m256i m_pack = _mm256_set1_epi64x(m);
234 __m256i k;
235 __m256i k_tmp;
236
237 while (n >= 32) {
238 // k packs 32 chars (bytes)
239 k = _mm256_loadu_si256((const __m256i*)data);
240 if (!port::kLittleEndian) {
241 // change from BigEdian to LittleEdian
242 swap_int64_256(k);
243 }
244 data += 32;
245 n -= 32;
246
247 k = _mm256_mullo_epi64_hand(k, m_pack);
248 k_tmp = _mm256_srli_epi64(k, r);
249 k = _mm256_xor_si256(k, k_tmp);
250 k = _mm256_mullo_epi64_hand(k, m_pack);
251 // reduction
252 h ^= (uint64)_mm256_extract_epi64(k, 0);
253 h *= m;
254 h ^= (uint64)_mm256_extract_epi64(k, 1);
255 h *= m;
256 h ^= (uint64)_mm256_extract_epi64(k, 2);
257 h *= m;
258 h ^= (uint64)_mm256_extract_epi64(k, 3);
259 h *= m;
260 }
261}
262
263inline void Hash64AVX_128_Impl(const char*& data, size_t& n, uint64& h,
264 const uint64& m, const int& r) {

Callers 1

Hash64V3Function · 0.85

Calls 2

swap_int64_256Function · 0.85
_mm256_mullo_epi64_handFunction · 0.85

Tested by

no test coverage detected