diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-12-19 07:38:05 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-12-19 07:38:05 +0100 |
| commit | 30d976107352ecf74c57acc1032bed6032cd3da3 (patch) | |
| tree | 665bb9940af179cbd955c57eeadf0d6af6dc31d6 /src/arch/portable.h | |
| parent | f283c08db86777fe77bdf00d3d70687107a376d9 (diff) | |
| parent | de04d37e8520079f5bba3b1a87d42313297543db (diff) | |
| download | nissy-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.h | 13 |
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 | ||
| 157 | STATIC_INLINE void | ||
| 158 | copy_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 | |||
| 157 | STATIC_INLINE uint64_t | 170 | STATIC_INLINE uint64_t |
| 158 | coord_co(cube_t c) | 171 | coord_co(cube_t c) |
| 159 | { | 172 | { |
