diff options
author | Derek Mauro <dmauro@google.com> | 2022-11-29 10:46:22 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-11-29 10:47:25 -0800 |
commit | ee2fc89eb87d95a5002817e2153ccaace72c7286 (patch) | |
tree | 4ac052538b64d83a4e37ff8fa469b724962ade5e /absl | |
parent | d03cced7d552ece168c6db92acb3a7c379aae0c0 (diff) |
Remove deprecated use of absl::ToCrc32c()
PiperOrigin-RevId: 491681300
Change-Id: I4ecdd3bf359cda7592b6c392a2fbb61b8394f71b
Diffstat (limited to 'absl')
-rw-r--r-- | absl/crc/internal/crc_memcpy_x86_64.cc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/absl/crc/internal/crc_memcpy_x86_64.cc b/absl/crc/internal/crc_memcpy_x86_64.cc index 0e91884e..aee7bf0a 100644 --- a/absl/crc/internal/crc_memcpy_x86_64.cc +++ b/absl/crc/internal/crc_memcpy_x86_64.cc @@ -78,7 +78,7 @@ inline crc32c_t ShortCrcCopy(char* dst, const char* src, std::size_t length, ++src; ++dst; } - return ToCrc32c(crc_uint32); + return crc32c_t{crc_uint32}; } constexpr int kIntLoadsPerVec = sizeof(__m128i) / sizeof(uint64_t); @@ -108,10 +108,10 @@ inline void LargeTailCopy(crc32c_t* crcs, char** dst, const char** src, _mm_store_si128(vdst, data[i]); // Compute the running CRC - crcs[region] = ToCrc32c(_mm_crc32_u64(static_cast<uint32_t>(crcs[region]), - _mm_extract_epi64(data[i], 0))); - crcs[region] = ToCrc32c(_mm_crc32_u64(static_cast<uint32_t>(crcs[region]), - _mm_extract_epi64(data[i], 1))); + crcs[region] = crc32c_t{static_cast<uint32_t>(_mm_crc32_u64( + static_cast<uint32_t>(crcs[region]), _mm_extract_epi64(data[i], 0)))}; + crcs[region] = crc32c_t{static_cast<uint32_t>(_mm_crc32_u64( + static_cast<uint32_t>(crcs[region]), _mm_extract_epi64(data[i], 1)))}; } #ifdef __GNUC__ @@ -131,8 +131,8 @@ inline void LargeTailCopy(crc32c_t* crcs, char** dst, const char** src, int data_index = i * kIntLoadsPerVec + j; int_data[data_index] = *(usrc + j); - crcs[region] = ToCrc32c(_mm_crc32_u64( - static_cast<uint32_t>(crcs[region]), int_data[data_index])); + crcs[region] = crc32c_t{static_cast<uint32_t>(_mm_crc32_u64( + static_cast<uint32_t>(crcs[region]), int_data[data_index]))}; *(udst + j) = int_data[data_index]; } @@ -279,12 +279,12 @@ crc32c_t AcceleratedCrcMemcpyEngine<vec_regions, int_regions>::Compute( // Load and CRC data. vec_data[j] = _mm_loadu_si128(src + i); - crcs[region] = - ToCrc32c(_mm_crc32_u64(static_cast<uint32_t>(crcs[region]), - _mm_extract_epi64(vec_data[j], 0))); - crcs[region] = - ToCrc32c(_mm_crc32_u64(static_cast<uint32_t>(crcs[region]), - _mm_extract_epi64(vec_data[j], 1))); + crcs[region] = crc32c_t{static_cast<uint32_t>( + _mm_crc32_u64(static_cast<uint32_t>(crcs[region]), + _mm_extract_epi64(vec_data[j], 0)))}; + crcs[region] = crc32c_t{static_cast<uint32_t>( + _mm_crc32_u64(static_cast<uint32_t>(crcs[region]), + _mm_extract_epi64(vec_data[j], 1)))}; // Store the data. _mm_store_si128(dst + i, vec_data[j]); @@ -313,8 +313,8 @@ crc32c_t AcceleratedCrcMemcpyEngine<vec_regions, int_regions>::Compute( // Load and CRC the data. int_data[data_index] = *(usrc + i * kIntLoadsPerVec + k); - crcs[region] = ToCrc32c(_mm_crc32_u64( - static_cast<uint32_t>(crcs[region]), int_data[data_index])); + crcs[region] = crc32c_t{static_cast<uint32_t>(_mm_crc32_u64( + static_cast<uint32_t>(crcs[region]), int_data[data_index]))}; // Store the data. *(udst + i * kIntLoadsPerVec + k) = int_data[data_index]; |