diff options
Diffstat (limited to 'src/solvers/distribution.h')
| -rw-r--r-- | src/solvers/distribution.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/solvers/distribution.h b/src/solvers/distribution.h index a996e3db..1ed7453 100644 --- a/src/solvers/distribution.h +++ b/src/solvers/distribution.h | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | #ifndef SOLVERS_DISTRIBUTION_H | ||
| 2 | #define SOLVERS_DISTRIBUTION_H | ||
| 3 | |||
| 1 | #define ENTRIES_PER_BYTE(k) (UINT64_C(8) / (uint64_t)(k)) | 4 | #define ENTRIES_PER_BYTE(k) (UINT64_C(8) / (uint64_t)(k)) |
| 2 | #define TABLE_SHIFT(i, k) ((uint8_t)(k) * (uint8_t)((i) % ENTRIES_PER_BYTE(k))) | 5 | #define TABLE_SHIFT(i, k) ((uint8_t)(k) * (uint8_t)((i) % ENTRIES_PER_BYTE(k))) |
| 3 | #define TABLE_MASK(i, k) ((UINT8_BIT(k) - UINT8_C(1)) << TABLE_SHIFT(i, k)) | 6 | #define TABLE_MASK(i, k) ((UINT8_BIT(k) - UINT8_C(1)) << TABLE_SHIFT(i, k)) |
| @@ -99,3 +102,5 @@ distribution_equal( | |||
| 99 | 102 | ||
| 100 | return wrong == 0; | 103 | return wrong == 0; |
| 101 | } | 104 | } |
| 105 | |||
| 106 | #endif /* SOLVERS_DISTRIBUTION_H */ | ||
