aboutsummaryrefslogtreecommitdiff
path: root/src/arch/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/common.h')
-rw-r--r--src/arch/common.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/arch/common.h b/src/arch/common.h
index 802790c..52e0fc7 100644
--- a/src/arch/common.h
+++ b/src/arch/common.h
@@ -1,3 +1,5 @@
1STATIC_INLINE int popcount_u32(uint32_t);
2
1STATIC void pieces(cube_t *, uint8_t [static 8], uint8_t [static 12]); 3STATIC void pieces(cube_t *, uint8_t [static 8], uint8_t [static 12]);
2STATIC_INLINE bool equal(cube_t, cube_t); 4STATIC_INLINE bool equal(cube_t, cube_t);
3STATIC_INLINE cube_t invertco(cube_t); 5STATIC_INLINE cube_t invertco(cube_t);
@@ -18,6 +20,7 @@ STATIC_INLINE void set_eo(cube_t *, int64_t);
18STATIC_INLINE cube_t invcoord_esep(int64_t); 20STATIC_INLINE cube_t invcoord_esep(int64_t);
19 21
20STATIC_INLINE void invcoord_esep_array(int64_t, int64_t, uint8_t[static 12]); 22STATIC_INLINE void invcoord_esep_array(int64_t, int64_t, uint8_t[static 12]);
23STATIC_INLINE cube_t invcoord_eoesep(int64_t);
21 24
22STATIC_INLINE void 25STATIC_INLINE void
23invcoord_esep_array(int64_t set1, int64_t set2, uint8_t mem[static 12]) 26invcoord_esep_array(int64_t set1, int64_t set2, uint8_t mem[static 12])
@@ -44,3 +47,17 @@ invcoord_esep_array(int64_t set1, int64_t set2, uint8_t mem[static 12])
44 mem[i] = (slice[s]++) | (uint8_t)(s << 2); 47 mem[i] = (slice[s]++) | (uint8_t)(s << 2);
45 } 48 }
46} 49}
50
51STATIC_INLINE cube_t
52invcoord_eoesep(int64_t i)
53{
54 cube_t c;
55 int64_t esep, eo;
56
57 esep = i >> INT64_C(11);
58 eo = i % POW_2_11;
59 c = invcoord_esep(esep);
60 set_eo(&c, eo);
61
62 return c;
63}

Generated with cgit - Back to sebastiano.tronto.net