ATLAS Offline Software
Loading...
Searching...
No Matches
CxxUtils::CRCTable Class Reference

Precomputed tables and constants for the CRC calculation. More...

Collaboration diagram for CxxUtils::CRCTable:

Public Member Functions

 CRCTable (uint64_t p, uint64_t initial=0xffffffffffffffff)
 Initialize the CRC tables and constants.

Public Attributes

uint64_t m_initial
 Initial CRC value.
uint64_t m_table [256]
 Lookup table for bytewise CRC calculation.

Detailed Description

Precomputed tables and constants for the CRC calculation.

Definition at line 463 of file crc64.cxx.

Constructor & Destructor Documentation

◆ CRCTable()

CxxUtils::CRCTable::CRCTable ( uint64_t p,
uint64_t initial = 0xffffffffffffffff )

Initialize the CRC tables and constants.

Parameters
pPolynomial for the CRC. A 1 in the 2^64 bit is implied.

Definition at line 494 of file crc64.cxx.

495{
497
498 uint64_t prev = bit_reflect (p);
499 for (int i = 0; i < 256; i++)
500 {
501 uint64_t r = i;
502 for (int j = 0; j < 8; j++)
503 {
504 if (r & 1)
505 r = (r >> 1) ^ prev;
506 else
507 r >>= 1;
508 }
509 m_table[i] = r;
510 }
511
512#if ATH_CRC64_VEC
513 const uint64_t k1 = bit_reflect (exp_mod (128+64, p)) << 1;
514 const uint64_t k2 = bit_reflect (exp_mod (128, p)) << 1;
515 const uint64_t mu = (bit_reflect (exp129_div (p)) << 1) | 1;
516 const uint64_t prev65 = (bit_reflect (p) << 1) | 1;
517 v2du a = {k1, k2};
518 m_fold_constants = reinterpret_cast<v2di>(a);
519 v2du b = { mu, prev65 };
520 m_barrett_constants = reinterpret_cast<v2di>(b);
521#endif
522}
static Double_t a
uint64_t m_initial
Initial CRC value.
Definition crc64.cxx:474
uint64_t m_table[256]
Lookup table for bytewise CRC calculation.
Definition crc64.cxx:477
uint64_t bit_reflect(uint64_t v)
Definition crc64.cxx:384
int r
Definition globals.cxx:22
@ initial
this is just the initial step we do, nothing really happens here
Definition ManagerStep.h:45
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)

Member Data Documentation

◆ m_initial

uint64_t CxxUtils::CRCTable::m_initial

Initial CRC value.

Definition at line 474 of file crc64.cxx.

◆ m_table

uint64_t CxxUtils::CRCTable::m_table[256]

Lookup table for bytewise CRC calculation.

Definition at line 477 of file crc64.cxx.


The documentation for this class was generated from the following file: