diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-05 10:04:34 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-05 10:04:34 +0200 |
| commit | b17411249b17133f35833c202e6c2e4bf43b3298 (patch) | |
| tree | 3417a006ee5207b4ff9a2bfcc4bc971853d24577 /src/arch/neon.h | |
| parent | fd5ddb3db9f50411ca579d84f225f265ca35b56a (diff) | |
| download | nissy-core-b17411249b17133f35833c202e6c2e4bf43b3298.tar.gz nissy-core-b17411249b17133f35833c202e6c2e4bf43b3298.zip | |
More renaming
Diffstat (limited to 'src/arch/neon.h')
| -rw-r--r-- | src/arch/neon.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/arch/neon.h b/src/arch/neon.h index dee0eba..acb75c3 100644 --- a/src/arch/neon.h +++ b/src/arch/neon.h | |||
| @@ -1,21 +1,21 @@ | |||
| 1 | #define _co2_neon vdupq_n_u8(0x60) | 1 | #define CO2_NEON vdupq_n_u8(0x60) |
| 2 | #define _cocw_neon vdupq_n_u8(0x20) | 2 | #define COCW_NEON vdupq_n_u8(0x20) |
| 3 | #define _cp_neon vdupq_n_u8(0x07) | 3 | #define CP_NEON vdupq_n_u8(0x07) |
| 4 | #define _ep_neon vcombine_u8(vdupq_n_u8(0x0F), vdupq_n_u8(0x0F)) | 4 | #define EP_NEON vcombine_u8(vdupq_n_u8(0x0F), vdupq_n_u8(0x0F)) |
| 5 | #define _eo_neon vcombine_u8(vdupq_n_u8(0x10), vdupq_n_u8(0x10)) | 5 | #define EO_NEON vcombine_u8(vdupq_n_u8(0x10), vdupq_n_u8(0x10)) |
| 6 | 6 | ||
| 7 | STATIC_INLINE uint8x16_t compose_edges_slim(uint8x16_t, uint8x16_t); | 7 | STATIC_INLINE uint8x16_t compose_edges_slim(uint8x16_t, uint8x16_t); |
| 8 | STATIC_INLINE uint8x16_t compose_corners_slim(uint8x16_t, uint8x16_t); | 8 | STATIC_INLINE uint8x16_t compose_corners_slim(uint8x16_t, uint8x16_t); |
| 9 | 9 | ||
| 10 | // static cube | 10 | // static cube |
| 11 | #define static_cube(c_ufr, c_ubl, c_dfl, c_dbr, c_ufl, c_ubr, c_dfr, c_dbl, \ | 11 | #define STATIC_CUBE(c_ufr, c_ubl, c_dfl, c_dbr, c_ufl, c_ubr, c_dfr, c_dbl, \ |
| 12 | e_uf, e_ub, e_db, e_df, e_ur, e_ul, e_dl, e_dr, e_fr, e_fl, e_bl, e_br) \ | 12 | e_uf, e_ub, e_db, e_df, e_ur, e_ul, e_dl, e_dr, e_fr, e_fl, e_bl, e_br) \ |
| 13 | ((cube_t){ \ | 13 | ((cube_t){ \ |
| 14 | .corner = {c_ufr, c_ubl, c_dfl, c_dbr, c_ufl, c_ubr, c_dfr, c_dbl, 0, 0, 0, 0, 0, 0, 0, 0}, \ | 14 | .corner = {c_ufr, c_ubl, c_dfl, c_dbr, c_ufl, c_ubr, c_dfr, c_dbl, 0, 0, 0, 0, 0, 0, 0, 0}, \ |
| 15 | .edge = {e_uf, e_ub, e_db, e_df, e_ur, e_ul, e_dl, e_dr, e_fr, e_fl, e_bl, e_br, 0, 0, 0, 0}}) | 15 | .edge = {e_uf, e_ub, e_db, e_df, e_ur, e_ul, e_dl, e_dr, e_fr, e_fl, e_bl, e_br, 0, 0, 0, 0}}) |
| 16 | 16 | ||
| 17 | // zero cube | 17 | // zero cube |
| 18 | #define zero \ | 18 | #define ZERO_CUBE \ |
| 19 | (cube_t) \ | 19 | (cube_t) \ |
| 20 | { \ | 20 | { \ |
| 21 | .corner = vdupq_n_u8(0), \ | 21 | .corner = vdupq_n_u8(0), \ |
| @@ -23,7 +23,7 @@ STATIC_INLINE uint8x16_t compose_corners_slim(uint8x16_t, uint8x16_t); | |||
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | // solved cube | 25 | // solved cube |
| 26 | #define solved static_cube( \ | 26 | #define SOLVED_CUBE STATIC_CUBE( \ |
| 27 | 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) | 27 | 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) |
| 28 | 28 | ||
| 29 | STATIC void | 29 | STATIC void |
| @@ -68,11 +68,11 @@ invertco(cube_t c) | |||
| 68 | cube_t ret; | 68 | cube_t ret; |
| 69 | uint8x16_t co, shleft, shright, summed, newco, cleanco; | 69 | uint8x16_t co, shleft, shright, summed, newco, cleanco; |
| 70 | 70 | ||
| 71 | co = vandq_u8(c.corner, _co2_neon); | 71 | co = vandq_u8(c.corner, CO2_NEON); |
| 72 | shleft = vshlq_n_u8(co, 1); | 72 | shleft = vshlq_n_u8(co, 1); |
| 73 | shright = vshrq_n_u8(co, 1); | 73 | shright = vshrq_n_u8(co, 1); |
| 74 | summed = vorrq_u8(shleft, shright); | 74 | summed = vorrq_u8(shleft, shright); |
| 75 | newco = vandq_u8(summed, _co2_neon); | 75 | newco = vandq_u8(summed, CO2_NEON); |
| 76 | cleanco = veorq_u8(c.corner, co); | 76 | cleanco = veorq_u8(c.corner, co); |
| 77 | ret.corner = vorrq_u8(cleanco, newco); | 77 | ret.corner = vorrq_u8(cleanco, newco); |
| 78 | ret.edge = c.edge; | 78 | ret.edge = c.edge; |
| @@ -323,7 +323,7 @@ invcoord_esep(int64_t esep) | |||
| 323 | 323 | ||
| 324 | invcoord_esep_array(esep % 70, esep / 70, mem); | 324 | invcoord_esep_array(esep % 70, esep / 70, mem); |
| 325 | 325 | ||
| 326 | ret = solved; | 326 | ret = SOLVED_CUBE; |
| 327 | ret.edge = vld1q_u8(mem); | 327 | ret.edge = vld1q_u8(mem); |
| 328 | 328 | ||
| 329 | return ret; | 329 | return ret; |
