aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-03-29 10:04:16 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-03-29 10:04:16 +0100
commitb6c1ff6cfdfe0f4ce602fe83e54c3112a1c95690 (patch)
treef9d61c905194276dcf632e31e07ec485b172b131 /tools
parent0f23987edbbabdf88fbe175f695b4fdb727586fd (diff)
downloadnissy-core-b6c1ff6cfdfe0f4ce602fe83e54c3112a1c95690.tar.gz
nissy-core-b6c1ff6cfdfe0f4ce602fe83e54c3112a1c95690.zip
Optimize genptable for coordinate solve (20x speedup)
Diffstat (limited to 'tools')
-rw-r--r--tools/expected_distributions.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/expected_distributions.h b/tools/expected_distributions.h
index 039e4d4..8ddb138 100644
--- a/tools/expected_distributions.h
+++ b/tools/expected_distributions.h
@@ -136,6 +136,22 @@ uint64_t expected_eo[21] = {
136 [7] = 13, 136 [7] = 13,
137}; 137};
138 138
139uint64_t expected_dr[21] = {
140 [0] = 1,
141 [1] = 1,
142 [2] = 5,
143 [3] = 44,
144 [4] = 487,
145 [5] = 5841,
146 [6] = 68364,
147 [7] = 776568,
148 [8] = 7950748,
149 [9] = 52098876,
150 [10] = 76236234,
151 [11] = 3771112,
152 [12] = 129,
153};
154
139static bool 155static bool
140distribution_equal(const uint64_t *expected, const uint64_t *actual, int n) 156distribution_equal(const uint64_t *expected, const uint64_t *actual, int n)
141{ 157{
@@ -218,6 +234,8 @@ check_distribution(const char *solver, size_t data_size, const void *data)
218 str = info.solver + 22; /* "coordinate solver for COORD" */ 234 str = info.solver + 22; /* "coordinate solver for COORD" */
219 if (!strcmp(str, "EO")) { 235 if (!strcmp(str, "EO")) {
220 return check_table(expected_eo, &info); 236 return check_table(expected_eo, &info);
237 } else if (!strcmp(str, "DR")) {
238 return check_table(expected_dr, &info);
221 } else { 239 } else {
222 goto check_distribution_unknown; 240 goto check_distribution_unknown;
223 } 241 }

Generated with cgit - Back to sebastiano.tronto.net