Skip to content

Commit

Permalink
Apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuda-Chen committed Jan 17, 2024
1 parent f1a949d commit 515ba54
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions sse2neon.h
Original file line number Diff line number Diff line change
Expand Up @@ -8486,7 +8486,7 @@ FORCE_INLINE uint64_t _mm_crc32_u64(uint64_t crc, uint64_t v)
return crc;
}

const uint32_t crc32_tbl[] = {
static const uint32_t _sse2neon_crc32_tbl[] = {
0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4, 0xc79a971f, 0x35f1141c,
0x26a1e7e8, 0xd4ca64eb, 0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b,
0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24, 0x105ec76f, 0xe235446c,
Expand Down Expand Up @@ -8546,13 +8546,7 @@ FORCE_INLINE uint32_t _mm_crc32_u8(uint32_t crc, uint8_t v)
crc = __crc32cb(crc, v);
#else
crc ^= v;
crc = (crc >> 8) ^ crc32_tbl[crc & 0xFF];
/*for (int bit = 0; bit < 8; bit++) {
if (crc & 1)
crc = (crc >> 1) ^ UINT32_C(0x82f63b78);
else
crc = (crc >> 1);
}*/
crc = (crc >> 8) ^ _sse2neon_crc32_tbl[crc & 0xFF];
#endif
return crc;
}
Expand Down

0 comments on commit 515ba54

Please sign in to comment.