diff options
Diffstat (limited to 'src/solvers/h48')
| -rw-r--r-- | src/solvers/h48/distribution_h48.h | 4 | ||||
| -rw-r--r-- | src/solvers/h48/gendata_h48.h | 8 | ||||
| -rw-r--r-- | src/solvers/h48/solve.h | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/solvers/h48/distribution_h48.h b/src/solvers/h48/distribution_h48.h index 93a6933..6d50ae5 100644 --- a/src/solvers/h48/distribution_h48.h +++ b/src/solvers/h48/distribution_h48.h | |||
| @@ -58,12 +58,12 @@ getdistribution_h48( | |||
| 58 | .distr = local_distr[i], | 58 | .distr = local_distr[i], |
| 59 | .table = table, | 59 | .table = table, |
| 60 | }; | 60 | }; |
| 61 | wrapthread_create(&thread[i], NULL, | 61 | wrapthread_create(&thread[i], |
| 62 | getdistribution_h48_runthread, &targ[i]); | 62 | getdistribution_h48_runthread, &targ[i]); |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | for (i = 0; i < THREADS; i++) | 65 | for (i = 0; i < THREADS; i++) |
| 66 | wrapthread_join(thread[i], NULL); | 66 | wrapthread_join(thread[i]); |
| 67 | 67 | ||
| 68 | memset(distr, 0, INFO_DISTRIBUTION_LEN * sizeof(uint64_t)); | 68 | memset(distr, 0, INFO_DISTRIBUTION_LEN * sizeof(uint64_t)); |
| 69 | for (i = 0; i < THREADS; i++) | 69 | for (i = 0; i < THREADS; i++) |
diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h index ef8a854..a5bb331 100644 --- a/src/solvers/h48/gendata_h48.h +++ b/src/solvers/h48/gendata_h48.h | |||
| @@ -230,9 +230,9 @@ gendata_h48_maintable(gendata_h48_arg_t arg[static 1]) | |||
| 230 | 230 | ||
| 231 | inext = 0; | 231 | inext = 0; |
| 232 | count = 0; | 232 | count = 0; |
| 233 | wrapthread_mutex_init(&shortcubes_mutex, NULL); | 233 | wrapthread_mutex_init(&shortcubes_mutex); |
| 234 | for (i = 0; i < CHUNKS; i++) | 234 | for (i = 0; i < CHUNKS; i++) |
| 235 | wrapthread_mutex_init(&table_mutex[i], NULL); | 235 | wrapthread_mutex_init(&table_mutex[i]); |
| 236 | for (i = 0; i < THREADS; i++) { | 236 | for (i = 0; i < THREADS; i++) { |
| 237 | dfsarg[i] = (h48_dfs_arg_t){ | 237 | dfsarg[i] = (h48_dfs_arg_t){ |
| 238 | .h = arg->h, | 238 | .h = arg->h, |
| @@ -251,7 +251,7 @@ gendata_h48_maintable(gendata_h48_arg_t arg[static 1]) | |||
| 251 | dfsarg[i].table_mutex[ii] = &table_mutex[ii]; | 251 | dfsarg[i].table_mutex[ii] = &table_mutex[ii]; |
| 252 | 252 | ||
| 253 | wrapthread_create( | 253 | wrapthread_create( |
| 254 | &thread[i], NULL, gendata_h48_runthread, &dfsarg[i]); | 254 | &thread[i], gendata_h48_runthread, &dfsarg[i]); |
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | if (NISSY_CANSLEEP) { | 257 | if (NISSY_CANSLEEP) { |
| @@ -281,7 +281,7 @@ gendata_h48_maintable(gendata_h48_arg_t arg[static 1]) | |||
| 281 | } | 281 | } |
| 282 | 282 | ||
| 283 | for (i = 0; i < THREADS; i++) | 283 | for (i = 0; i < THREADS; i++) |
| 284 | wrapthread_join(thread[i], NULL); | 284 | wrapthread_join(thread[i]); |
| 285 | 285 | ||
| 286 | h48map_destroy(&shortcubes); | 286 | h48map_destroy(&shortcubes); |
| 287 | 287 | ||
diff --git a/src/solvers/h48/solve.h b/src/solvers/h48/solve.h index 15ac6ea..19aaf79 100644 --- a/src/solvers/h48/solve.h +++ b/src/solvers/h48/solve.h | |||
| @@ -638,7 +638,7 @@ solve_h48( | |||
| 638 | 638 | ||
| 639 | } | 639 | } |
| 640 | 640 | ||
| 641 | wrapthread_mutex_init(&solutions_mutex, NULL); | 641 | wrapthread_mutex_init(&solutions_mutex); |
| 642 | 642 | ||
| 643 | mtarg = (dfsarg_solve_h48_maketasks_t) { | 643 | mtarg = (dfsarg_solve_h48_maketasks_t) { |
| 644 | .cube = oc.cube, | 644 | .cube = oc.cube, |
| @@ -689,7 +689,7 @@ solve_h48( | |||
| 689 | arg[i].target_depth = d; | 689 | arg[i].target_depth = d; |
| 690 | arg[i].thread_done = false; | 690 | arg[i].thread_done = false; |
| 691 | wrapthread_create( | 691 | wrapthread_create( |
| 692 | &thread[i], NULL, solve_h48_runthread, &arg[i]); | 692 | &thread[i], solve_h48_runthread, &arg[i]); |
| 693 | } | 693 | } |
| 694 | 694 | ||
| 695 | /* Log solutions and handle pause / stop / resume */ | 695 | /* Log solutions and handle pause / stop / resume */ |
| @@ -718,7 +718,7 @@ solve_h48( | |||
| 718 | } | 718 | } |
| 719 | 719 | ||
| 720 | for (i = 0; i < threads; i++) | 720 | for (i = 0; i < threads; i++) |
| 721 | wrapthread_join(thread[i], NULL); | 721 | wrapthread_join(thread[i]); |
| 722 | 722 | ||
| 723 | solve_h48_log_solutions(&sollist, lastused); | 723 | solve_h48_log_solutions(&sollist, lastused); |
| 724 | lastused = sollist.used; | 724 | lastused = sollist.used; |
