diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-08-01 16:52:44 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-08-01 16:52:44 +0200 |
| commit | 1bd4691d9cc46ec75adbe899b289a1ebc5460721 (patch) | |
| tree | ea71166e05d399e57a13d6e3d7d96d4737f8f7bd /src/arch/portable.h | |
| parent | 0844b0ecd00bd6d68a7bafaeae0ee3d420db8ff6 (diff) | |
| download | nissy-core-1bd4691d9cc46ec75adbe899b289a1ebc5460721.tar.gz nissy-core-1bd4691d9cc46ec75adbe899b289a1ebc5460721.zip | |
Added CPEPE coordinate in preparation of full DRFIN solver
Diffstat (limited to 'src/arch/portable.h')
| -rw-r--r-- | src/arch/portable.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/arch/portable.h b/src/arch/portable.h index 5acccf2..26001ee 100644 --- a/src/arch/portable.h +++ b/src/arch/portable.h | |||
| @@ -334,3 +334,25 @@ invcoord_epud(uint64_t i) | |||
| 334 | return STATIC_CUBE(0, 1, 2, 3, 4, 5, 6, 7, | 334 | return STATIC_CUBE(0, 1, 2, 3, 4, 5, 6, 7, |
| 335 | e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], 8, 9, 10, 11); | 335 | e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], 8, 9, 10, 11); |
| 336 | } | 336 | } |
| 337 | |||
| 338 | STATIC_INLINE uint64_t | ||
| 339 | coord_epe(cube_t cube) | ||
| 340 | { | ||
| 341 | int i; | ||
| 342 | |||
| 343 | for (i = 8; i < 12; i++) | ||
| 344 | cube.edge[i] = (cube.edge[i] & PBITS) - 8; | ||
| 345 | |||
| 346 | return permtoindex(4, cube.edge+8); | ||
| 347 | } | ||
| 348 | |||
| 349 | STATIC_INLINE cube_t | ||
| 350 | invcoord_epe(uint64_t i) | ||
| 351 | { | ||
| 352 | uint8_t e[4]; | ||
| 353 | |||
| 354 | indextoperm(i, 4, e); | ||
| 355 | |||
| 356 | return STATIC_CUBE(0, 1, 2, 3, 4, 5, 6, 7, | ||
| 357 | 0, 1, 2, 3, 4, 5, 6, 7, e[0]+8, e[1]+8, e[2]+8, e[3]+8); | ||
| 358 | } | ||
