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/avx2.h | |
| parent | 18c9a8b8905304cf5f8fc15825769046a3144866 (diff) | |
| download | nissy-core-2d66a0ffea4b03cd27b0f4363f8c4b8b0a1242e4.tar.gz nissy-core-2d66a0ffea4b03cd27b0f4363f8c4b8b0a1242e4.zip | |
Removed duplication
Diffstat (limited to 'src/arch/avx2.h')
| -rw-r--r-- | src/arch/avx2.h | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/src/arch/avx2.h b/src/arch/avx2.h index 59a0d6c..b1a7ab7 100644 --- a/src/arch/avx2.h +++ b/src/arch/avx2.h | |||
| @@ -286,30 +286,9 @@ _static_inline cube_t | |||
| 286 | invcoord_esep(int64_t esep) | 286 | invcoord_esep(int64_t esep) |
| 287 | { | 287 | { |
| 288 | cube_t eee, ret; | 288 | cube_t eee, ret; |
| 289 | int64_t bit1, bit2, i, j, jj, k, l, s, v, w, is1, set1, set2; | 289 | uint8_t mem[32] = {0}; |
| 290 | uint8_t mem[32]; | ||
| 291 | uint8_t slice[3] = {0}; | ||
| 292 | 290 | ||
| 293 | set1 = esep % 70; | 291 | invcoord_esep_array(esep % 70, esep / 70, mem+16); |
| 294 | set2 = esep / 70; | ||
| 295 | |||
| 296 | for (i = 0, j = 0, k = 4, l = 4; i < 12; i++) { | ||
| 297 | v = binomial[11-i][k]; | ||
| 298 | jj = j < 8; | ||
| 299 | w = jj * binomial[7-(j*jj)][l]; | ||
| 300 | bit2 = set2 >= v; | ||
| 301 | bit1 = set1 >= w; | ||
| 302 | is1 = (1 - bit2) * bit1; | ||
| 303 | |||
| 304 | set2 -= bit2 * v; | ||
| 305 | k -= bit2; | ||
| 306 | set1 -= is1 * w; | ||
| 307 | l -= is1; | ||
| 308 | j += (1-bit2); | ||
| 309 | s = 2*bit2 + (1-bit2)*bit1; | ||
| 310 | |||
| 311 | mem[i+16] = (slice[s]++) | (uint8_t)(s << 2); | ||
| 312 | } | ||
| 313 | 292 | ||
| 314 | ret = solved; | 293 | ret = solved; |
| 315 | eee = _mm256_loadu_si256((__m256i_u *)&mem); | 294 | eee = _mm256_loadu_si256((__m256i_u *)&mem); |
