![]() |
Bitcoin Core 31.0.0
P2P Digital Currency
|
#include <stdint.h>#include <stdlib.h>#include <limits>#include <algorithm>#include <type_traits>Go to the source code of this file.
Classes | |
| class | BitWriter |
| class | BitReader |
| class | BitsInt< I, BITS > |
| struct | LFSR< F, MOD > |
| Class which implements a stateless LFSR for generic moduli. More... | |
| struct | GFMulHelper< I, N, L, F, 0 > |
| struct | GFMulHelper< I, N, L, F, K > |
| Helper class for carryless multiplications. More... | |
Functions | |
| template<int bits> | |
| static constexpr uint64_t | Rot (uint64_t x) |
| static void | SipHashRound (uint64_t &v0, uint64_t &v1, uint64_t &v2, uint64_t &v3) |
| uint64_t | SipHash (uint64_t k0, uint64_t k1, uint64_t data) |
| template<int BITS, typename I > | |
| constexpr I | Mask () |
Return a value of type I with its bits lowest bits set (bits must be > 0). | |
| template<typename I > | |
| static int | CountBits (I val, int max) |
| Compute the smallest power of two that is larger than val. | |
| template<typename I , int N, typename L , typename F > | |
| constexpr I | GFMul (const I &a, const I &b) |
| Compute the carry-less multiplication of a and b, with N bits, using L as LFSR type. | |
| template<typename I , typename F , int BITS, uint32_t MOD> | |
| I | InvExtGCD (I x) |
| Compute the inverse of x using an extgcd algorithm. | |
| template<typename I , typename F , int BITS, I(*)(I, I) MUL, I(*)(I) SQR, I(*)(I) SQR2, I(*)(I) SQR4, I(*)(I) SQR8, I(*)(I) SQR16> | |
| I | InvLadder (I x1) |
| Compute the inverse of x1 using an exponentiation ladder. | |
Compute the smallest power of two that is larger than val.
Definition at line 146 of file int_utils.h.
|
inlineconstexpr |
Compute the carry-less multiplication of a and b, with N bits, using L as LFSR type.
Definition at line 250 of file int_utils.h.
Compute the inverse of x using an extgcd algorithm.
Definition at line 254 of file int_utils.h.
|
inline |
Compute the inverse of x1 using an exponentiation ladder.
The MUL argument is a multiplication function, SQR is a squaring function, and the SQRi arguments compute x**(2**i).
Definition at line 280 of file int_utils.h.
Return a value of type I with its bits lowest bits set (bits must be > 0).
Definition at line 142 of file int_utils.h.
Definition at line 24 of file int_utils.h.