diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-10 19:43:05 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-10 19:43:05 +0200 |
| commit | 70d3a3de3a2fdef7e47b2bd510261d69390a3a9c (patch) | |
| tree | 2c545953d0b61b37c4f281cd47981e9350b5c09b /test/104_cocsep_ttrep | |
| parent | 1f4900a3cc6ca74f94b73e224d14a09d52c4549c (diff) | |
| download | nissy-core-70d3a3de3a2fdef7e47b2bd510261d69390a3a9c.tar.gz nissy-core-70d3a3de3a2fdef7e47b2bd510261d69390a3a9c.zip | |
New tableinfo for gendata_h48, still work to do
Diffstat (limited to 'test/104_cocsep_ttrep')
| -rw-r--r-- | test/104_cocsep_ttrep/cocsep_ttrep_tests.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/104_cocsep_ttrep/cocsep_ttrep_tests.c b/test/104_cocsep_ttrep/cocsep_ttrep_tests.c index f692ca8..efe5a26 100644 --- a/test/104_cocsep_ttrep/cocsep_ttrep_tests.c +++ b/test/104_cocsep_ttrep/cocsep_ttrep_tests.c | |||
| @@ -1,9 +1,11 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | #define COCSEP_CLASSES 3393 | ||
| 4 | #define TTREP_MASK (UINT32_C(0xFF) << UINT32_C(8)) | 3 | #define TTREP_MASK (UINT32_C(0xFF) << UINT32_C(8)) |
| 5 | #define TTREP(x) (((x) & TTREP_MASK) >> UINT32_C(8)) | 4 | #define TTREP(x) (((x) & TTREP_MASK) >> UINT32_C(8)) |
| 6 | 5 | ||
| 6 | #define COCSEP_CLASSES 3393 | ||
| 7 | #define INFOSIZE 512 | ||
| 8 | |||
| 7 | uint8_t inverse_trans(uint8_t); | 9 | uint8_t inverse_trans(uint8_t); |
| 8 | cube_t transform_corners(cube_t, uint8_t); | 10 | cube_t transform_corners(cube_t, uint8_t); |
| 9 | int64_t coord_cocsep(cube_t); | 11 | int64_t coord_cocsep(cube_t); |
| @@ -11,19 +13,21 @@ size_t gendata_cocsep(void *, uint64_t *, cube_t *); | |||
| 11 | 13 | ||
| 12 | void run(void) { | 14 | void run(void) { |
| 13 | uint8_t t; | 15 | uint8_t t; |
| 14 | uint32_t buf[300000], tt; | 16 | char buf[2000000]; |
| 17 | uint32_t *cocsepdata, tt; | ||
| 15 | uint64_t selfsim[COCSEP_CLASSES]; | 18 | uint64_t selfsim[COCSEP_CLASSES]; |
| 16 | int64_t i, j, k, l; | 19 | int64_t i, j, k, l; |
| 17 | cube_t rep[COCSEP_CLASSES], c, d; | 20 | cube_t rep[COCSEP_CLASSES], c, d; |
| 18 | 21 | ||
| 19 | gendata_cocsep(buf, selfsim, rep); | 22 | gendata_cocsep(buf, selfsim, rep); |
| 23 | cocsepdata = (uint32_t *)((char *)buf + INFOSIZE); | ||
| 20 | 24 | ||
| 21 | for (i = 0; i < COCSEP_CLASSES; i++) { | 25 | for (i = 0; i < COCSEP_CLASSES; i++) { |
| 22 | c = rep[i]; | 26 | c = rep[i]; |
| 23 | for (t = 0; t < 48; t++) { | 27 | for (t = 0; t < 48; t++) { |
| 24 | d = transform_corners(c, t); | 28 | d = transform_corners(c, t); |
| 25 | j = coord_cocsep(d); | 29 | j = coord_cocsep(d); |
| 26 | tt = TTREP(buf[j]); | 30 | tt = TTREP(cocsepdata[j]); |
| 27 | d = transform_corners(d, tt); | 31 | d = transform_corners(d, tt); |
| 28 | k = coord_cocsep(d); | 32 | k = coord_cocsep(d); |
| 29 | l = coord_cocsep(c); | 33 | l = coord_cocsep(c); |
