diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-12-19 07:32:09 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-12-19 07:32:09 +0100 |
| commit | de04d37e8520079f5bba3b1a87d42313297543db (patch) | |
| tree | dcbf454949def970c428a9b4627ae04e0e9ad1fb /src/arch/portable.h | |
| parent | d5c60236c06e67e8da45e63843b37e5d619e9d7b (diff) | |
| download | nissy-core-de04d37e8520079f5bba3b1a87d42313297543db.tar.gz nissy-core-de04d37e8520079f5bba3b1a87d42313297543db.zip | |
Add coordinate solvers for cornersh48-corner-estimate
Diffstat (limited to '')
| -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 | { |
