Precomputed tables and constants for the CRC calculation.
More...
|
| CRCTable (uint64_t p, uint64_t initial=0xffffffffffffffff) |
| Initialize the CRC tables and constants. More...
|
|
Precomputed tables and constants for the CRC calculation.
Definition at line 464 of file crc64.cxx.
◆ CRCTable()
CxxUtils::CRCTable::CRCTable |
( |
uint64_t |
p, |
|
|
uint64_t |
initial = 0xffffffffffffffff |
|
) |
| |
Initialize the CRC tables and constants.
- Parameters
-
p | Polynomial for the CRC. A 1 in the 2^64 bit is implied. |
Definition at line 495 of file crc64.cxx.
500 for (
int i = 0;
i < 256;
i++)
503 for (
int j = 0; j < 8; j++)
514 const uint64_t k1 = bit_reflect (exp_mod (128+64,
p)) << 1;
515 const uint64_t k2 = bit_reflect (exp_mod (128,
p)) << 1;
516 const uint64_t mu = (bit_reflect (exp129_div (
p)) << 1) | 1;
517 const uint64_t prev65 = (bit_reflect (
p) << 1) | 1;
519 m_fold_constants =
reinterpret_cast<v2di
>(
a);
520 v2du
b = {
mu, prev65 };
521 m_barrett_constants =
reinterpret_cast<v2di
>(
b);
◆ m_initial
uint64_t CxxUtils::CRCTable::m_initial |
Initial CRC value.
Definition at line 475 of file crc64.cxx.
◆ m_table
uint64_t CxxUtils::CRCTable::m_table[256] |
Lookup table for bytewise CRC calculation.
Definition at line 478 of file crc64.cxx.
The documentation for this class was generated from the following file: