aboutsummaryrefslogtreecommitdiff
path: root/src/arch/common.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-07-29 12:12:43 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-07-29 12:12:43 +0200
commitea0387796a349c91032fbcb10f50c6ad8607b0f6 (patch)
treeaed484690d24c0c28c7695d4b5389f2e3c341b96 /src/arch/common.h
parent52c21640508c3fc668107778ae027ff4428ebd89 (diff)
downloadnissy-core-ea0387796a349c91032fbcb10f50c6ad8607b0f6.tar.gz
nissy-core-ea0387796a349c91032fbcb10f50c6ad8607b0f6.zip
All coordinates unsigned
Diffstat (limited to 'src/arch/common.h')
-rw-r--r--src/arch/common.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/arch/common.h b/src/arch/common.h
index 3e7867d..6c62a2e 100644
--- a/src/arch/common.h
+++ b/src/arch/common.h
@@ -22,30 +22,30 @@ STATIC_INLINE cube_t compose_corners(cube_t, cube_t);
22STATIC_INLINE cube_t compose(cube_t, cube_t); 22STATIC_INLINE cube_t compose(cube_t, cube_t);
23STATIC_INLINE cube_t inverse(cube_t); 23STATIC_INLINE cube_t inverse(cube_t);
24 24
25STATIC_INLINE int64_t coord_co(cube_t); 25STATIC_INLINE uint64_t coord_co(cube_t);
26STATIC_INLINE cube_t invcoord_co(int64_t); 26STATIC_INLINE cube_t invcoord_co(uint64_t);
27STATIC_INLINE int64_t coord_csep(cube_t); 27STATIC_INLINE uint64_t coord_csep(cube_t);
28STATIC_INLINE int64_t coord_cocsep(cube_t); 28STATIC_INLINE uint64_t coord_cocsep(cube_t);
29STATIC_INLINE int64_t coord_eo(cube_t); 29STATIC_INLINE uint64_t coord_eo(cube_t);
30STATIC_INLINE int64_t coord_esep(cube_t); 30STATIC_INLINE uint64_t coord_esep(cube_t);
31STATIC_INLINE cube_t invcoord_esep(int64_t); 31STATIC_INLINE cube_t invcoord_esep(uint64_t);
32 32
33STATIC_INLINE void copy_corners(cube_t [static 1], cube_t); 33STATIC_INLINE void copy_corners(cube_t [static 1], cube_t);
34STATIC_INLINE void copy_edges(cube_t [static 1], cube_t); 34STATIC_INLINE void copy_edges(cube_t [static 1], cube_t);
35STATIC_INLINE void set_eo(cube_t [static 1], int64_t); 35STATIC_INLINE void set_eo(cube_t [static 1], uint64_t);
36 36
37STATIC_INLINE void invcoord_esep_array(int64_t, int64_t, uint8_t[static 12]); 37STATIC_INLINE void invcoord_esep_array(uint64_t, uint64_t, uint8_t[static 12]);
38STATIC_INLINE cube_t invcoord_eoesep(int64_t); 38STATIC_INLINE cube_t invcoord_eoesep(uint64_t);
39 39
40STATIC_INLINE int64_t coord_cp(cube_t); 40STATIC_INLINE uint64_t coord_cp(cube_t);
41STATIC_INLINE cube_t invcoord_cp(int64_t); 41STATIC_INLINE cube_t invcoord_cp(uint64_t);
42STATIC_INLINE int64_t coord_epud(cube_t); 42STATIC_INLINE uint64_t coord_epud(cube_t);
43STATIC_INLINE cube_t invcoord_epud(int64_t); 43STATIC_INLINE cube_t invcoord_epud(uint64_t);
44 44
45STATIC_INLINE void 45STATIC_INLINE void
46invcoord_esep_array(int64_t set1, int64_t set2, uint8_t mem[static 12]) 46invcoord_esep_array(uint64_t set1, uint64_t set2, uint8_t mem[static 12])
47{ 47{
48 int64_t bit1, bit2, i, j, jj, k, l, s, v, w, is1; 48 uint64_t bit1, bit2, i, j, jj, k, l, s, v, w, is1;
49 uint8_t slice[3] = {0}; 49 uint8_t slice[3] = {0};
50 50
51 for (i = 0, j = 0, k = 4, l = 4; i < 12; i++) 51 for (i = 0, j = 0, k = 4, l = 4; i < 12; i++)
@@ -69,10 +69,10 @@ invcoord_esep_array(int64_t set1, int64_t set2, uint8_t mem[static 12])
69} 69}
70 70
71STATIC_INLINE cube_t 71STATIC_INLINE cube_t
72invcoord_eoesep(int64_t i) 72invcoord_eoesep(uint64_t i)
73{ 73{
74 cube_t c; 74 cube_t c;
75 int64_t esep, eo; 75 uint64_t esep, eo;
76 76
77 esep = i >> INT64_C(11); 77 esep = i >> INT64_C(11);
78 eo = i % POW_2_11; 78 eo = i % POW_2_11;

Generated with cgit - Back to sebastiano.tronto.net