diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-08-18 15:31:06 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-08-18 15:31:06 +0200 |
| commit | 2d66a0ffea4b03cd27b0f4363f8c4b8b0a1242e4 (patch) | |
| tree | 03a0844aa4da4291e51971cf669b4c1dee639c9b /src/arch/neon.h | |
| parent | 18c9a8b8905304cf5f8fc15825769046a3144866 (diff) | |
| download | nissy-core-2d66a0ffea4b03cd27b0f4363f8c4b8b0a1242e4.tar.gz nissy-core-2d66a0ffea4b03cd27b0f4363f8c4b8b0a1242e4.zip | |
Removed duplication
Diffstat (limited to 'src/arch/neon.h')
| -rw-r--r-- | src/arch/neon.h | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/src/arch/neon.h b/src/arch/neon.h index a75f86d..b44664b 100644 --- a/src/arch/neon.h +++ b/src/arch/neon.h | |||
| @@ -316,33 +316,12 @@ _static_inline cube_t | |||
| 316 | invcoord_esep(int64_t esep) | 316 | invcoord_esep(int64_t esep) |
| 317 | { | 317 | { |
| 318 | cube_t ret; | 318 | cube_t ret; |
| 319 | int64_t bit1, bit2, i, j, jj, k, l, s, v, w, is1, set1, set2; | 319 | uint8_t mem[16] = {0}; |
| 320 | uint8_t slice[3] = {0}; | ||
| 321 | 320 | ||
| 322 | ret = solved; | 321 | invcoord_esep_array(esep % 70, esep / 70, mem); |
| 323 | uint8_t mem[16]; | ||
| 324 | set1 = esep % 70; | ||
| 325 | set2 = esep / 70; | ||
| 326 | |||
| 327 | for (i = 0, j = 0, k = 4, l = 4; i < 12; i++) | ||
| 328 | { | ||
| 329 | v = binomial[11 - i][k]; | ||
| 330 | jj = j < 8; | ||
| 331 | w = jj * binomial[7 - (j * jj)][l]; | ||
| 332 | bit2 = set2 >= v; | ||
| 333 | bit1 = set1 >= w; | ||
| 334 | is1 = (1 - bit2) * bit1; | ||
| 335 | |||
| 336 | set2 -= bit2 * v; | ||
| 337 | k -= bit2; | ||
| 338 | set1 -= is1 * w; | ||
| 339 | l -= is1; | ||
| 340 | j += (1 - bit2); | ||
| 341 | s = 2 * bit2 + (1 - bit2) * bit1; | ||
| 342 | |||
| 343 | mem[i] = (slice[s]++) | (uint8_t)(s << 2); | ||
| 344 | } | ||
| 345 | 322 | ||
| 323 | ret = solved; | ||
| 346 | ret.edge = vld1q_u8(mem); | 324 | ret.edge = vld1q_u8(mem); |
| 325 | |||
| 347 | return ret; | 326 | return ret; |
| 348 | } | 327 | } |
