aboutsummaryrefslogtreecommitdiff
path: root/src/arch/avx2.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-12-19 07:32:09 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-12-19 07:32:09 +0100
commitde04d37e8520079f5bba3b1a87d42313297543db (patch)
treedcbf454949def970c428a9b4627ae04e0e9ad1fb /src/arch/avx2.h
parentd5c60236c06e67e8da45e63843b37e5d619e9d7b (diff)
downloadnissy-core-h48-corner-estimate.tar.gz
nissy-core-h48-corner-estimate.zip
Add coordinate solvers for cornersh48-corner-estimate
Diffstat (limited to 'src/arch/avx2.h')
-rw-r--r--src/arch/avx2.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/arch/avx2.h b/src/arch/avx2.h
index 5a62213..b80b0fb 100644
--- a/src/arch/avx2.h
+++ b/src/arch/avx2.h
@@ -160,6 +160,16 @@ coord_co(cube_t c)
160 return ret; 160 return ret;
161} 161}
162 162
163STATIC_INLINE void
164copy_co(cube_t cube[static 1], cube_t co)
165{
166 cube_t coclean;
167
168 coclean = _mm256_and_si256(co, CO2_AVX2);
169 *cube = _mm256_andnot_si256(CO2_AVX2, *cube);
170 *cube = _mm256_or_si256(*cube, coclean);
171}
172
163STATIC_INLINE cube_t 173STATIC_INLINE cube_t
164invcoord_co(uint64_t coord) 174invcoord_co(uint64_t coord)
165{ 175{
@@ -174,7 +184,7 @@ invcoord_co(uint64_t coord)
174 184
175 cc = _mm256_loadu_si256((__m256i *)mem); 185 cc = _mm256_loadu_si256((__m256i *)mem);
176 cube = SOLVED_CUBE; 186 cube = SOLVED_CUBE;
177 copy_corners(&cube, cc); 187 copy_co(&cube, cc);
178 188
179 return cube; 189 return cube;
180} 190}

Generated with cgit - Back to sebastiano.tronto.net