aboutsummaryrefslogtreecommitdiff
path: root/src/arch/portable.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-12-19 07:38:05 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-12-19 07:38:05 +0100
commit30d976107352ecf74c57acc1032bed6032cd3da3 (patch)
tree665bb9940af179cbd955c57eeadf0d6af6dc31d6 /src/arch/portable.h
parentf283c08db86777fe77bdf00d3d70687107a376d9 (diff)
parentde04d37e8520079f5bba3b1a87d42313297543db (diff)
downloadnissy-core-30d976107352ecf74c57acc1032bed6032cd3da3.tar.gz
nissy-core-30d976107352ecf74c57acc1032bed6032cd3da3.zip
Merge branch 'h48-corner-estimate'
Diffstat (limited to 'src/arch/portable.h')
-rw-r--r--src/arch/portable.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/arch/portable.h b/src/arch/portable.h
index c7f2de0..4b66fb6 100644
--- a/src/arch/portable.h
+++ b/src/arch/portable.h
@@ -154,6 +154,19 @@ inverse(cube_t cube)
154 return ret; 154 return ret;
155} 155}
156 156
157STATIC_INLINE void
158copy_co(cube_t cube[static 1], cube_t co)
159{
160 uint8_t c;
161 size_t i;
162
163 for (i = 0; i < 8; i++) {
164 c = cube->corner[i] & COBITS;
165 cube->corner[i] ^= c;
166 cube->corner[i] |= co.corner[i] & COBITS;
167 }
168}
169
157STATIC_INLINE uint64_t 170STATIC_INLINE uint64_t
158coord_co(cube_t c) 171coord_co(cube_t c)
159{ 172{

Generated with cgit - Back to sebastiano.tronto.net