aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/h48
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/solvers/h48/gendata_cocsep.h5
-rw-r--r--src/solvers/h48/gendata_eoesep.h8
-rw-r--r--src/solvers/h48/gendata_h48.h4
-rw-r--r--src/solvers/h48/solve.h8
-rw-r--r--src/solvers/h48/utils.h2
5 files changed, 14 insertions, 13 deletions
diff --git a/src/solvers/h48/gendata_cocsep.h b/src/solvers/h48/gendata_cocsep.h
index 17568ea..f83207b 100644
--- a/src/solvers/h48/gendata_cocsep.h
+++ b/src/solvers/h48/gendata_cocsep.h
@@ -81,9 +81,8 @@ gendata_cocsep_return_size:
81STATIC uint32_t 81STATIC uint32_t
82gendata_cocsep_dfs(cocsep_dfs_arg_t arg[NON_NULL]) 82gendata_cocsep_dfs(cocsep_dfs_arg_t arg[NON_NULL])
83{ 83{
84 uint8_t m; 84 uint8_t m, t;
85 uint32_t cc, class, ttrep, depth, olddepth, tinv; 85 uint32_t cc, class, ttrep, depth, olddepth, tinv;
86 uint64_t t;
87 uint64_t i, j; 86 uint64_t i, j;
88 cube_t d; 87 cube_t d;
89 cocsep_dfs_arg_t nextarg; 88 cocsep_dfs_arg_t nextarg;
@@ -105,7 +104,7 @@ gendata_cocsep_dfs(cocsep_dfs_arg_t arg[NON_NULL])
105 d = transform_corners(arg->cube, t); 104 d = transform_corners(arg->cube, t);
106 j = coord_cocsep(d); 105 j = coord_cocsep(d);
107 if (i == j && arg->selfsim != NULL) 106 if (i == j && arg->selfsim != NULL)
108 arg->selfsim[*arg->n] |= UINT64_C(1) << t; 107 arg->selfsim[*arg->n] |= UINT64_C(1) << (uint64_t)t;
109 if (COCLASS(arg->buf32[j]) != UINT32_C(0xFFFF)) 108 if (COCLASS(arg->buf32[j]) != UINT32_C(0xFFFF))
110 continue; 109 continue;
111 gendata_cocsep_set_visited(arg->visited, j); 110 gendata_cocsep_set_visited(arg->visited, j);
diff --git a/src/solvers/h48/gendata_eoesep.h b/src/solvers/h48/gendata_eoesep.h
index 271e877..81bbd43 100644
--- a/src/solvers/h48/gendata_eoesep.h
+++ b/src/solvers/h48/gendata_eoesep.h
@@ -59,7 +59,7 @@ gendata_esep_classes(
59 esep_classes[j] = cl | ti; 59 esep_classes[j] = cl | ti;
60 visited[j] = true; 60 visited[j] = true;
61 } 61 }
62 rep[class] = i; 62 rep[class] = (uint16_t)i;
63 class++; 63 class++;
64 } 64 }
65 65
@@ -140,7 +140,8 @@ gendata_eoesep_fromdone(
140) 140)
141{ 141{
142 uint8_t pval; 142 uint8_t pval;
143 uint64_t i, esep, eo, coord, done; 143 uint32_t done;
144 uint64_t i, esep, eo, coord;
144 145
145 done = 0; 146 done = 0;
146 for (i = 0; i < ESEP_CLASSES; i++) { 147 for (i = 0; i < ESEP_CLASSES; i++) {
@@ -169,7 +170,8 @@ gendata_eoesep_fromnew(
169) 170)
170{ 171{
171 uint8_t pval; 172 uint8_t pval;
172 uint64_t i, esep, eo, coord, done; 173 uint32_t done;
174 uint64_t i, esep, eo, coord;
173 cube_t c; 175 cube_t c;
174 176
175 done = 0; 177 done = 0;
diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h
index 283c472..53b1fad 100644
--- a/src/solvers/h48/gendata_h48.h
+++ b/src/solvers/h48/gendata_h48.h
@@ -264,7 +264,7 @@ gendata_h48_maintable(gendata_h48_arg_t arg[NON_NULL])
264 velocity = count; 264 velocity = count;
265 265
266 /* We plan to log 10 times */ 266 /* We plan to log 10 times */
267 sleeptime = (100*(nshort-velocity)) / velocity; 267 sleeptime = (int)((100*(nshort-velocity)) / velocity);
268 268
269 done = count; 269 done = count;
270 while (nshort - done > (velocity * sleeptime) / 1000) { 270 while (nshort - done > (velocity * sleeptime) / 1000) {
@@ -320,7 +320,7 @@ gendata_h48_runthread(void *arg)
320 mutex = H48_LINE(coord) % CHUNKS; 320 mutex = H48_LINE(coord) % CHUNKS;
321 wrapthread_mutex_lock(dfsarg->table_mutex[mutex]); 321 wrapthread_mutex_lock(dfsarg->table_mutex[mutex]);
322 set_h48_pval(dfsarg->table, coordext, 0); 322 set_h48_pval(dfsarg->table, coordext, 0);
323 set_h48_pvalmin(dfsarg->table, coordmin, kv.val); 323 set_h48_pvalmin(dfsarg->table, coordmin, (uint8_t)kv.val);
324 wrapthread_mutex_unlock(dfsarg->table_mutex[mutex]); 324 wrapthread_mutex_unlock(dfsarg->table_mutex[mutex]);
325 } else { 325 } else {
326 dfsarg->cube = invcoord_h48(kv.key, dfsarg->crep, 11); 326 dfsarg->cube = invcoord_h48(kv.key, dfsarg->crep, 11);
diff --git a/src/solvers/h48/solve.h b/src/solvers/h48/solve.h
index 295ef88..ebc5208 100644
--- a/src/solvers/h48/solve.h
+++ b/src/solvers/h48/solve.h
@@ -111,7 +111,8 @@ STATIC long long solve_h48_dispatch(
111 if (err != NISSY_OK) 111 if (err != NISSY_OK)
112 return err; 112 return err;
113 113
114 return solve_h48(oc, minmoves, maxmoves, maxsols, optimal, threads, 114 return solve_h48(oc, (uint8_t)minmoves, (uint8_t)maxmoves,
115 (uint8_t)maxsols, (uint8_t)optimal, (uint8_t)threads,
115 data_size, data, sols_size, sols, stats, 116 data_size, data, sols_size, sols, stats,
116 poll_status, poll_status_data); 117 poll_status, poll_status_data);
117} 118}
@@ -343,7 +344,7 @@ solve_h48_dfs(dfsarg_solve_h48_t arg[NON_NULL])
343 backup_inverse = arg->inverse; 344 backup_inverse = arg->inverse;
344 345
345 ret = 0; 346 ret = 0;
346 if (popcount_u32(mm_normal) <= popcount_u32(mm_inverse)) { 347 if (popcount_u64(mm_normal) <= popcount_u64(mm_inverse)) {
347 h48_prune_pipeline(arg, prune, target, true); 348 h48_prune_pipeline(arg, prune, target, true);
348 arg->solution_moves->nmoves++; 349 arg->solution_moves->nmoves++;
349 for (m = 0; m < NMOVES; m++) { 350 for (m = 0; m < NMOVES; m++) {
@@ -456,8 +457,7 @@ solve_h48_maketasks(
456 int ntasks[NON_NULL] 457 int ntasks[NON_NULL]
457) 458)
458{ 459{
459 int r; 460 int64_t r, appret;
460 int64_t appret;
461 uint8_t m, t; 461 uint8_t m, t;
462 uint64_t mm; 462 uint64_t mm;
463 cube_t backup_cube; 463 cube_t backup_cube;
diff --git a/src/solvers/h48/utils.h b/src/solvers/h48/utils.h
index d181eab..6d91108 100644
--- a/src/solvers/h48/utils.h
+++ b/src/solvers/h48/utils.h
@@ -29,7 +29,7 @@ parse_h48h(const char *buf, uint8_t h[NON_NULL])
29 goto parse_h48h_error; 29 goto parse_h48h_error;
30 } 30 }
31 31
32 *h = atoi(buf); 32 *h = (uint8_t)atoi(buf);
33 if (*h > H48_HMAX) { 33 if (*h > H48_HMAX) {
34 LOG("[H48] Invalid value %" PRIu8 " for parameter h (must be " 34 LOG("[H48] Invalid value %" PRIu8 " for parameter h (must be "
35 "at most %" PRIu8 ")\n", *h, H48_HMAX); 35 "at most %" PRIu8 ")\n", *h, H48_HMAX);

Generated with cgit - Back to sebastiano.tronto.net