aboutsummaryrefslogtreecommitdiff
path: root/src/threader_eager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/threader_eager.c')
-rw-r--r--src/threader_eager.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/threader_eager.c b/src/threader_eager.c
index 7013518..261b995 100644
--- a/src/threader_eager.c
+++ b/src/threader_eager.c
@@ -43,7 +43,7 @@ possible_starts(DfsArg *arg, Solver *solver)
43 AlgList *ret = new_alglist(); 43 AlgList *ret = new_alglist();
44 44
45 if (solver->is_solved(solver->param, arg->cubedata)) { 45 if (solver->is_solved(solver->param, arg->cubedata)) {
46 if (arg->opts->min_moves == 0) 46 if (arg->opts->min_moves == 0 && arg->d == 0)
47 append_sol(new_alg(""), arg->threaddata); 47 append_sol(new_alg(""), arg->threaddata);
48 return ret; 48 return ret;
49 } 49 }
@@ -82,15 +82,16 @@ instance_thread(void *arg)
82 *(tid->node) = (*(tid->node))->next; 82 *(tid->node) = (*(tid->node))->next;
83 pthread_mutex_unlock(tid->start_mutex); 83 pthread_mutex_unlock(tid->start_mutex);
84 84
85/* TODO: adjust for longer (arbitrarily long?) starting sequences */
85 void *data = tid->solver->alloc_cubedata(tid->solver->param); 86 void *data = tid->solver->alloc_cubedata(tid->solver->param);
86 tid->solver->copy_cubedata( 87 tid->solver->copy_cubedata(
87 tid->solver->param, tid->arg->cubedata, data); 88 tid->solver->param, tid->arg->cubedata, data);
88 tid->solver->apply_alg(
89 tid->solver->param, data, node->alg);
90 bool inv = node->alg->inv[node->alg->len-1]; 89 bool inv = node->alg->inv[node->alg->len-1];
91 if (inv) 90 if (inv)
92 tid->solver->invert_cube( 91 tid->solver->invert_cube(
93 tid->solver->param, data); 92 tid->solver->param, data);
93 tid->solver->apply_move(
94 tid->solver->param, data, node->alg->move[0]);
94 95
95 DfsArg newarg; 96 DfsArg newarg;
96 newarg.cubedata = data; 97 newarg.cubedata = data;

Generated with cgit - Back to sebastiano.tronto.net