aboutsummaryrefslogtreecommitdiff
path: root/src/arch/portable.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/portable.h')
-rw-r--r--src/arch/portable.h23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/arch/portable.h b/src/arch/portable.h
index b8330af..f6e5301 100644
--- a/src/arch/portable.h
+++ b/src/arch/portable.h
@@ -243,30 +243,9 @@ _static_inline cube_t
243invcoord_esep(int64_t esep) 243invcoord_esep(int64_t esep)
244{ 244{
245 cube_t ret; 245 cube_t ret;
246 int64_t bit1, bit2, i, j, jj, k, l, s, v, w, is1, set1, set2;
247 uint8_t slice[3] = {0};
248 246
249 ret = solved; 247 ret = solved;
250 set1 = esep % 70; 248 invcoord_esep_array(esep % 70, esep / 70, ret.edge);
251 set2 = esep / 70;
252
253 for (i = 0, j = 0, k = 4, l = 4; i < 12; i++) {
254 v = binomial[11-i][k];
255 jj = j < 8;
256 w = jj * binomial[7-(j*jj)][l];
257 bit2 = set2 >= v;
258 bit1 = set1 >= w;
259 is1 = (1 - bit2) * bit1;
260
261 set2 -= bit2 * v;
262 k -= bit2;
263 set1 -= is1 * w;
264 l -= is1;
265 j += (1-bit2);
266 s = 2*bit2 + (1-bit2)*bit1;
267
268 ret.edge[i] = (slice[s]++) | (uint8_t)(s << 2);
269 }
270 249
271 return ret; 250 return ret;
272} 251}

Generated with cgit - Back to sebastiano.tronto.net