M4RI 1.0.1
|
Compute the parity of 64 words in parallel. More...
Go to the source code of this file.
Defines | |
#define | MIX32(a, b) |
Step for mixing two 64-bit words to compute their parity. | |
#define | MIX16(a, b) |
Step for mixing two 64-bit words to compute their parity. | |
#define | MIX8(a, b) |
Step for mixing two 64-bit words to compute their parity. | |
#define | MIX4(a, b) |
Step for mixing two 64-bit words to compute their parity. | |
#define | MIX2(a, b) |
Step for mixing two 64-bit words to compute their parity. | |
#define | MIX1(a, b) |
Step for mixing two 64-bit words to compute their parity. | |
Functions | |
static word | _parity64_helper (word *buf) |
See parity64. | |
static word | parity64 (word *buf) |
Computes parity of each of buf[0], buf[1], ..., buf[63]. Returns single word whose bits are the parities of buf[0], ..., buf[63]. Assumes 64-bit machine unsigned long. |
Compute the parity of 64 words in parallel.
#define MIX1 | ( | a, | |
b | |||
) |
(((((a) >> 1) ^ (a)) & 0x5555555555555555ll) + \ ((((b) << 1) ^ (b)) & 0xAAAAAAAAAAAAAAAAll));
Step for mixing two 64-bit words to compute their parity.
#define MIX16 | ( | a, | |
b | |||
) |
(((((a) >> 16) ^ (a)) & 0x0000FFFF0000FFFFll) + \ ((((b) << 16) ^ (b)) & 0xFFFF0000FFFF0000ll));
Step for mixing two 64-bit words to compute their parity.
#define MIX2 | ( | a, | |
b | |||
) |
(((((a) >> 2) ^ (a)) & 0x3333333333333333ll) + \ ((((b) << 2) ^ (b)) & 0xCCCCCCCCCCCCCCCCll));
Step for mixing two 64-bit words to compute their parity.
#define MIX32 | ( | a, | |
b | |||
) |
(((((a) << 32) ^ (a)) >> 32) + \ ((((b) >> 32) ^ (b)) << 32))
Step for mixing two 64-bit words to compute their parity.
#define MIX4 | ( | a, | |
b | |||
) |
(((((a) >> 4) ^ (a)) & 0x0F0F0F0F0F0F0F0Fll) + \ ((((b) << 4) ^ (b)) & 0xF0F0F0F0F0F0F0F0ll));
Step for mixing two 64-bit words to compute their parity.
#define MIX8 | ( | a, | |
b | |||
) |
(((((a) >> 8) ^ (a)) & 0x00FF00FF00FF00FFll) + \ ((((b) << 8) ^ (b)) & 0xFF00FF00FF00FF00ll));
Step for mixing two 64-bit words to compute their parity.