diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-12-14 19:35:57 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-12-14 19:38:34 +0100 |
| commit | af6e9af26e0f547b41fc85f1cce07040cb3dbc87 (patch) | |
| tree | 6cc046000a65423ff54fc9b23c402333ec19a9a3 /src/solvers/h48 | |
| parent | bcd52547af58b15868e24f3904e307548d1fd505 (diff) | |
| download | nissy-core-af6e9af26e0f547b41fc85f1cce07040cb3dbc87.tar.gz nissy-core-af6e9af26e0f547b41fc85f1cce07040cb3dbc87.zip | |
Update comments
Diffstat (limited to 'src/solvers/h48')
| -rw-r--r-- | src/solvers/h48/checkdata.h | 5 | ||||
| -rw-r--r-- | src/solvers/h48/gendata_h48.h | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/solvers/h48/checkdata.h b/src/solvers/h48/checkdata.h index 7aa18aa..948ac67 100644 --- a/src/solvers/h48/checkdata.h +++ b/src/solvers/h48/checkdata.h | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | STATIC long long checkdata_h48( | 1 | STATIC long long checkdata_h48( |
| 2 | const char *, unsigned long long, const unsigned char *); | 2 | const char *, unsigned long long, const unsigned char *); |
| 3 | 3 | ||
| 4 | /* TODO: Currently unused, re-introduce check on cocsep table */ | ||
| 5 | uint64_t expected_cocsep[21] = { | 4 | uint64_t expected_cocsep[21] = { |
| 6 | [0] = 1, | 5 | [0] = 1, |
| 7 | [1] = 6, | 6 | [1] = 6, |
| @@ -130,6 +129,10 @@ struct { | |||
| 130 | }; | 129 | }; |
| 131 | 130 | ||
| 132 | /* | 131 | /* |
| 132 | TODO: add check for cocsep table. | ||
| 133 | |||
| 134 | TODO: add check for fallback values at the end of each line. | ||
| 135 | |||
| 133 | TODO: this function can be simplified, now we support only one h48 table + | 136 | TODO: this function can be simplified, now we support only one h48 table + |
| 134 | eoesep. The loop can be just two checks. | 137 | eoesep. The loop can be just two checks. |
| 135 | */ | 138 | */ |
diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h index 68111c8..890aad8 100644 --- a/src/solvers/h48/gendata_h48.h +++ b/src/solvers/h48/gendata_h48.h | |||
| @@ -172,10 +172,9 @@ gendata_h48_maintable(gendata_h48_arg_t arg[static 1]) | |||
| 172 | * [2] = 462294676 | 172 | * [2] = 462294676 |
| 173 | * [3] = 14900555 | 173 | * [3] = 14900555 |
| 174 | * | 174 | * |
| 175 | * I ended up picking base 8 to have a much lower count of elements | 175 | * Experimentally, the table with base 8 is much faster. Intuitively, |
| 176 | * with value 0, at the cost of a less precise estimate for the higher | 176 | * this is because it has a much lower count of elements with value 0, |
| 177 | * values. But I am not 100% confident this is the optimal choice, | 177 | * at the cost of a less precise estimate for the higher values. |
| 178 | * so I'll leave it here for future considerations. | ||
| 179 | */ | 178 | */ |
| 180 | 179 | ||
| 181 | static const uint8_t base[] = { | 180 | static const uint8_t base[] = { |
