Implementation of polynomial_mul_rev<w>(rev_u) function which uses a simple loop over i: if(w>>i&1)result^=rev_u<<(32-i), which is equivalent to w * flip_at_32(rev_u), which in turn is equivalent to rev(rev(w) * rev_u),.
More...
|
template<uint32_t w> |
static uint64_t | polynomial_mul_rev (uint32_t rev_u) |
|
static uint32_t | update (uint32_t crc, unsigned char data) |
|
static uint32_t | update (uint32_t crc, uint16_t data) |
|
static uint32_t | update (uint32_t crc, uint32_t data) |
|
static uint64_t | update (uint64_t crc, uint64_t data) |
|
Implementation of polynomial_mul_rev<w>(rev_u) function which uses a simple loop over i: if(w>>i&1)result^=rev_u<<(32-i), which is equivalent to w * flip_at_32(rev_u), which in turn is equivalent to rev(rev(w) * rev_u),.
- See also
- flip_at_32 for explanation why this holds,
-
use_pclmul for explanation of what polynomial_mul_rev is computing. This implementation is to be used when hardware accelerated polynomial multiplication is not available. It tries to unroll the simple loop, so just the few xors and shifts for non-zero bits of w are emitted.
◆ polynomial_mul_rev()
template<uint32_t w>
static uint64_t hardware::use_unrolled_loop_poly_mul::polynomial_mul_rev |
( |
uint32_t |
rev_u | ) |
|
|
inlinestatic |
The documentation for this struct was generated from the following file: