aboutsummaryrefslogtreecommitdiff
path: root/src/coord.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-12 19:59:18 +0100
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-12 19:59:18 +0100
commite864e23e3ec315d5969281c51f24521cde30792a (patch)
tree3b25152fc4a645b26a4c82f9b0b350b766b8b7f6 /src/coord.c
parent89268e911e51a7b1c413cfae1520b2db6e60086f (diff)
downloadnissy-e864e23e3ec315d5969281c51f24521cde30792a.tar.gz
nissy-e864e23e3ec315d5969281c51f24521cde30792a.zip
I tried to remove the dependence on antindex in order to get rid of them
once and for all. I successfully removed from the pruning table generation part by using an alternative (slower) method, but then I realized that I also use antindexes when generating symmetry data. So I reverted to the original pruning table computation method, but I left the alternative way there, commented.
Diffstat (limited to '')
-rw-r--r--src/coord.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/coord.c b/src/coord.c
index 7e691ef..059a7a2 100644
--- a/src/coord.c
+++ b/src/coord.c
@@ -171,7 +171,7 @@ antindex_eofbepos(uint64_t ind)
171 171
172 /* We need eorl for sym16 coordinate */ 172 /* We need eorl for sym16 coordinate */
173 static int initialized = false; 173 static int initialized = false;
174 static uint64_t eorl_aux[POW2TO11][BINOM12ON4]; 174 static uint64_t eorl_a[POW2TO11][BINOM12ON4];
175 static int eo_aux[12], ep_aux[12]; 175 static int eo_aux[12], ep_aux[12];
176 unsigned int i, j, k; 176 unsigned int i, j, k;
177 177
@@ -181,8 +181,10 @@ antindex_eofbepos(uint64_t ind)
181 int_to_sum_zero_array(i, 2, 12, eo_aux); 181 int_to_sum_zero_array(i, 2, 12, eo_aux);
182 index_to_subset(j, 12, 4, ep_aux); 182 index_to_subset(j, 12, 4, ep_aux);
183 for (k = 0; k < 12; k++) 183 for (k = 0; k < 12; k++)
184 if (ep_aux[k]) 184 if ((ep_aux[k] && k < FR) ||
185 (!ep_aux[k] && k >= FR))
185 eo_aux[k] = 1 - eo_aux[k]; 186 eo_aux[k] = 1 - eo_aux[k];
187 eorl_a[i][j] = digit_array_to_int(eo_aux,11,2);
186 } 188 }
187 } 189 }
188 190
@@ -191,7 +193,7 @@ antindex_eofbepos(uint64_t ind)
191 193
192 ret.eofb = ind % POW2TO11; 194 ret.eofb = ind % POW2TO11;
193 ret.epose = (ind / POW2TO11) * 24; 195 ret.epose = (ind / POW2TO11) * 24;
194 ret.eorl = eorl_aux[ret.eofb][ret.epose/24]; 196 ret.eorl = eorl_a[ret.eofb][ret.epose/24];
195 197
196 return ret; 198 return ret;
197} 199}

Generated with cgit - Back to sebastiano.tronto.net