aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--TODO.md6
-rwxr-xr-xnissybin321808 -> 320968 bytes
-rw-r--r--src/pruning.c15
-rw-r--r--src/shell.c6
-rw-r--r--src/steps.c25
-rw-r--r--src/symcoord.c14
6 files changed, 43 insertions, 23 deletions
diff --git a/TODO.md b/TODO.md
index ea4a94d..81c3c19 100644
--- a/TODO.md
+++ b/TODO.md
@@ -73,3 +73,9 @@ It's more of a personal reminder than anything else.
73* client/server architecture: run a server process in the background so that 73* client/server architecture: run a server process in the background so that
74 multiple client processess can send it queries and get results; this would 74 multiple client processess can send it queries and get results; this would
75 open up the door for a web-based version or graphical clients 75 open up the door for a web-based version or graphical clients
76
77### Cleanup
78* Remove khuge from everywhere
79* sort again functions alphabetically in their files
80* more stuff to load at start (or when suitable command is called) rather
81 than when called directly, to avoid nasty problems with threading
diff --git a/nissy b/nissy
index efdbd4e..afdef7d 100755
--- a/nissy
+++ b/nissy
Binary files differ
diff --git a/src/pruning.c b/src/pruning.c
index 5c74e1e..e6fd791 100644
--- a/src/pruning.c
+++ b/src/pruning.c
@@ -78,13 +78,14 @@ pd_htrfin_htr = {
78 .moveset = &moveset_htr, 78 .moveset = &moveset_htr,
79}; 79};
80 80
81/* TODO: remove */ 81/*
82PruneData 82PruneData
83pd_khuge_HTM = { 83pd_khuge_HTM = {
84 .filename = "pt_khuge_HTM", 84 .filename = "pt_khuge_HTM",
85 .coord = &coord_khuge, 85 .coord = &coord_khuge,
86 .moveset = &moveset_HTM, 86 .moveset = &moveset_HTM,
87}; 87};
88*/
88 89
89PruneData 90PruneData
90pd_nxopt31_HTM = { 91pd_nxopt31_HTM = {
@@ -399,10 +400,16 @@ ptableval_index(PruneData *pd, uint64_t ind)
399 genptable(pd, 1); /* TODO: set default or remove this case */ 400 genptable(pd, 1); /* TODO: set default or remove this case */
400 } 401 }
401 402
402 e = pd->compact ? ENTRIES_PER_GROUP_COMPACT : ENTRIES_PER_GROUP; 403 if (pd->compact) {
403 m = (entry_group_t)(pd->compact ? 3 : 15); 404 e = ENTRIES_PER_GROUP_COMPACT;
405 m = 3;
406 sh = (ind % e) * 2;
407 } else {
408 e = ENTRIES_PER_GROUP;
409 m = 15;
410 sh = (ind % e) * 4;
411 }
404 412
405 sh = (ind % e) * (pd->compact ? 2 : 4);
406 mask = m << sh; 413 mask = m << sh;
407 i = ind/e; 414 i = ind/e;
408 415
diff --git a/src/shell.c b/src/shell.c
index 6d2de94..5fb18bc 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -97,12 +97,6 @@ launch(bool batchmode)
97int 97int
98main(int argc, char *argv[]) 98main(int argc, char *argv[])
99{ 99{
100/*
101 init_movesets();
102 init_symcoord();
103 print_ptable(&pd_nxopt31_HTM);
104*/
105
106 if (argc > 1) { 100 if (argc > 1) {
107 if (!strcmp(argv[1], "-b")) { 101 if (!strcmp(argv[1], "-b")) {
108 launch(true); 102 launch(true);
diff --git a/src/steps.c b/src/steps.c
index 2517d16..ae3f9fd 100644
--- a/src/steps.c
+++ b/src/steps.c
@@ -35,7 +35,7 @@ static int estimate_dr_eofb(DfsArg *arg);
35static int estimate_drudfin_drud(DfsArg *arg); 35static int estimate_drudfin_drud(DfsArg *arg);
36static int estimate_htr_drud(DfsArg *arg); 36static int estimate_htr_drud(DfsArg *arg);
37static int estimate_htrfin_htr(DfsArg *arg); 37static int estimate_htrfin_htr(DfsArg *arg);
38static int estimate_optimal_HTM(DfsArg *arg); 38/*static int estimate_khuge_HTM(DfsArg *arg);*/
39static int estimate_nxopt31_HTM(DfsArg *arg); 39static int estimate_nxopt31_HTM(DfsArg *arg);
40static int estimate_light_HTM(DfsArg *arg); 40static int estimate_light_HTM(DfsArg *arg);
41 41
@@ -60,14 +60,17 @@ static char check_drany_msg[100] = "DR must be solved on at least one axis";
60/* Steps *********************************************************************/ 60/* Steps *********************************************************************/
61 61
62/* Optimal solvers *******************/ 62/* Optimal solvers *******************/
63
64/* This is not used anymore, I'll keep it just in case */
65/*
63Step 66Step
64optimal_HTM = { 67optimal_khuge_HTM = {
65 .shortname = "optimal", 68 .shortname = "khuge",
66 .name = "Optimal solve (in HTM)", 69 .name = "Optimal solve (in HTM) using khuge table",
67 70
68 .final = true, 71 .final = true,
69 .is_done = is_solved, 72 .is_done = is_solved,
70 .estimate = estimate_optimal_HTM, 73 .estimate = estimate_khuge_HTM,
71 .ready = check_centers, 74 .ready = check_centers,
72 .ready_msg = check_centers_msg, 75 .ready_msg = check_centers_msg,
73 .is_valid = always_valid, 76 .is_valid = always_valid,
@@ -78,11 +81,12 @@ optimal_HTM = {
78 .tables = {&pd_khuge_HTM, &pd_corners_HTM}, 81 .tables = {&pd_khuge_HTM, &pd_corners_HTM},
79 .ntables = 2, 82 .ntables = 2,
80}; 83};
84*/
81 85
82Step 86Step
83optimal_nxopt31_HTM = { 87optimal_HTM = {
84 .shortname = "nxopt31", 88 .shortname = "optimal",
85 .name = "Optimal solve (in HTM), nxopt31 table", 89 .name = "Optimal solve (in HTM)",
86 90
87 .final = true, 91 .final = true,
88 .is_done = is_solved, 92 .is_done = is_solved,
@@ -856,7 +860,6 @@ htrfin_htr = {
856 860
857Step *steps[NSTEPS] = { 861Step *steps[NSTEPS] = {
858 &optimal_HTM, /* first is default */ 862 &optimal_HTM, /* first is default */
859 &optimal_nxopt31_HTM,
860 &optimal_light_HTM, 863 &optimal_light_HTM,
861 864
862 &eoany_HTM, 865 &eoany_HTM,
@@ -1203,11 +1206,13 @@ estimate_htrfin_htr(DfsArg *arg)
1203 return ptableval(&pd_htrfin_htr, arg->cube); 1206 return ptableval(&pd_htrfin_htr, arg->cube);
1204} 1207}
1205 1208
1209/*
1206static int 1210static int
1207estimate_optimal_HTM(DfsArg *arg) 1211estimate_khuge_HTM(DfsArg *arg)
1208{ 1212{
1209 return estimate_nxoptlike(arg, &pd_khuge_HTM); 1213 return estimate_nxoptlike(arg, &pd_khuge_HTM);
1210} 1214}
1215*/
1211 1216
1212static int 1217static int
1213estimate_nxopt31_HTM(DfsArg *arg) 1218estimate_nxopt31_HTM(DfsArg *arg)
diff --git a/src/symcoord.c b/src/symcoord.c
index cb178b7..cb105a9 100644
--- a/src/symcoord.c
+++ b/src/symcoord.c
@@ -8,19 +8,19 @@ static Cube antindex_cp_sym16(uint64_t ind);
8static Cube antindex_eofbepos_sym16(uint64_t ind); 8static Cube antindex_eofbepos_sym16(uint64_t ind);
9static Cube antindex_drud_sym16(uint64_t ind); 9static Cube antindex_drud_sym16(uint64_t ind);
10static Cube antindex_drudfin_noE_sym16(uint64_t ind); 10static Cube antindex_drudfin_noE_sym16(uint64_t ind);
11static Cube antindex_khuge(uint64_t ind); 11/*static Cube antindex_khuge(uint64_t ind);*/
12static Cube antindex_nxopt31(uint64_t ind); 12static Cube antindex_nxopt31(uint64_t ind);
13 13
14static uint64_t index_cp_sym16(Cube cube); 14static uint64_t index_cp_sym16(Cube cube);
15static uint64_t index_eofbepos_sym16(Cube cube); 15static uint64_t index_eofbepos_sym16(Cube cube);
16static uint64_t index_drud_sym16(Cube cube); 16static uint64_t index_drud_sym16(Cube cube);
17static uint64_t index_drudfin_noE_sym16(Cube cube); 17static uint64_t index_drudfin_noE_sym16(Cube cube);
18static uint64_t index_khuge(Cube cube); 18/*static uint64_t index_khuge(Cube cube);*/
19static uint64_t index_nxopt31(Cube cube); 19static uint64_t index_nxopt31(Cube cube);
20 20
21static int transfinder_drud_sym16(uint64_t ind, Trans *ret); 21static int transfinder_drud_sym16(uint64_t ind, Trans *ret);
22static int transfinder_drudfin_noE_sym16(uint64_t ind, Trans *ret); 22static int transfinder_drudfin_noE_sym16(uint64_t ind, Trans *ret);
23static int transfinder_khuge(uint64_t ind, Trans *ret); 23/*static int transfinder_khuge(uint64_t ind, Trans *ret);*/
24static int transfinder_nxopt31(uint64_t ind, Trans *ret); 24static int transfinder_nxopt31(uint64_t ind, Trans *ret);
25 25
26static void gensym(SymData *sd); 26static void gensym(SymData *sd);
@@ -93,6 +93,7 @@ coord_drudfin_noE_sym16 = {
93 .trans = transfinder_drudfin_noE_sym16, 93 .trans = transfinder_drudfin_noE_sym16,
94}; 94};
95 95
96/*
96Coordinate 97Coordinate
97coord_khuge = { 98coord_khuge = {
98 .index = index_khuge, 99 .index = index_khuge,
@@ -100,6 +101,7 @@ coord_khuge = {
100 .max = POW3TO7 * FACTORIAL4 * CLASSES_EOFBEPOS_16, 101 .max = POW3TO7 * FACTORIAL4 * CLASSES_EOFBEPOS_16,
101 .trans = transfinder_khuge, 102 .trans = transfinder_khuge,
102}; 103};
104*/
103 105
104Coordinate 106Coordinate
105coord_nxopt31 = { 107coord_nxopt31 = {
@@ -148,6 +150,7 @@ antindex_drudfin_noE_sym16(uint64_t ind)
148 return c1; 150 return c1;
149} 151}
150 152
153/*
151static Cube 154static Cube
152antindex_khuge(uint64_t ind) 155antindex_khuge(uint64_t ind)
153{ 156{
@@ -159,6 +162,7 @@ antindex_khuge(uint64_t ind)
159 162
160 return c; 163 return c;
161} 164}
165*/
162 166
163static Cube 167static Cube
164antindex_nxopt31(uint64_t ind) 168antindex_nxopt31(uint64_t ind)
@@ -208,6 +212,7 @@ index_eofbepos_sym16(Cube cube)
208 return sd_eofbepos_16.class[coord_eofbepos.index(cube)]; 212 return sd_eofbepos_16.class[coord_eofbepos.index(cube)];
209} 213}
210 214
215/*
211static uint64_t 216static uint64_t
212index_khuge(Cube cube) 217index_khuge(Cube cube)
213{ 218{
@@ -221,6 +226,7 @@ index_khuge(Cube cube)
221 226
222 return a * POW3TO7 + c.coud; 227 return a * POW3TO7 + c.coud;
223} 228}
229*/
224 230
225static uint64_t 231static uint64_t
226index_nxopt31(Cube cube) 232index_nxopt31(Cube cube)
@@ -280,6 +286,7 @@ transfinder_drudfin_noE_sym16(uint64_t ind, Trans *ret)
280 return naux[trueind]; 286 return naux[trueind];
281} 287}
282 288
289/*
283static int 290static int
284transfinder_khuge(uint64_t ind, Trans *ret) 291transfinder_khuge(uint64_t ind, Trans *ret)
285{ 292{
@@ -301,6 +308,7 @@ transfinder_khuge(uint64_t ind, Trans *ret)
301 ret[j] = retaux[trueind][j]; 308 ret[j] = retaux[trueind][j];
302 return naux[trueind]; 309 return naux[trueind];
303} 310}
311*/
304 312
305static int 313static int
306transfinder_nxopt31(uint64_t ind, Trans *ret) 314transfinder_nxopt31(uint64_t ind, Trans *ret)

Generated with cgit - Back to sebastiano.tronto.net