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.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/arch/portable.h b/src/arch/portable.h
index 5acccf2..26001ee 100644
--- a/src/arch/portable.h
+++ b/src/arch/portable.h
@@ -334,3 +334,25 @@ invcoord_epud(uint64_t i)
334 return STATIC_CUBE(0, 1, 2, 3, 4, 5, 6, 7, 334 return STATIC_CUBE(0, 1, 2, 3, 4, 5, 6, 7,
335 e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], 8, 9, 10, 11); 335 e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], 8, 9, 10, 11);
336} 336}
337
338STATIC_INLINE uint64_t
339coord_epe(cube_t cube)
340{
341 int i;
342
343 for (i = 8; i < 12; i++)
344 cube.edge[i] = (cube.edge[i] & PBITS) - 8;
345
346 return permtoindex(4, cube.edge+8);
347}
348
349STATIC_INLINE cube_t
350invcoord_epe(uint64_t i)
351{
352 uint8_t e[4];
353
354 indextoperm(i, 4, e);
355
356 return STATIC_CUBE(0, 1, 2, 3, 4, 5, 6, 7,
357 0, 1, 2, 3, 4, 5, 6, 7, e[0]+8, e[1]+8, e[2]+8, e[3]+8);
358}

Generated with cgit - Back to sebastiano.tronto.net