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/102_cocsep_selfsim | |
| 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/102_cocsep_selfsim')
| -rw-r--r-- | test/102_cocsep_selfsim/cocsep_selfsim_tests.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/102_cocsep_selfsim/cocsep_selfsim_tests.c b/test/102_cocsep_selfsim/cocsep_selfsim_tests.c index 7211e2e..490952a 100644 --- a/test/102_cocsep_selfsim/cocsep_selfsim_tests.c +++ b/test/102_cocsep_selfsim/cocsep_selfsim_tests.c | |||
| @@ -8,25 +8,28 @@ | |||
| 8 | #include "../test.h" | 8 | #include "../test.h" |
| 9 | 9 | ||
| 10 | #define COCSEP_CLASSES 3393 | 10 | #define COCSEP_CLASSES 3393 |
| 11 | #define INFOSIZE 512 | ||
| 11 | 12 | ||
| 12 | size_t gendata_cocsep(void *, uint64_t *, cube_t *); | 13 | size_t gendata_cocsep(void *, uint64_t *, cube_t *); |
| 13 | int64_t coord_cocsep(cube_t); | 14 | int64_t coord_cocsep(cube_t); |
| 14 | 15 | ||
| 15 | void run(void) { | 16 | void run(void) { |
| 16 | char str[STRLENMAX]; | 17 | char str[STRLENMAX]; |
| 17 | uint32_t buf[300000], data; | 18 | char buf[2000000]; |
| 19 | uint32_t *cocsepdata, data; | ||
| 18 | int64_t coord, coclass; | 20 | int64_t coord, coclass; |
| 19 | uint64_t selfsim[COCSEP_CLASSES], sim, t; | 21 | uint64_t selfsim[COCSEP_CLASSES], sim, t; |
| 20 | cube_t cube, rep[COCSEP_CLASSES]; | 22 | cube_t cube, rep[COCSEP_CLASSES]; |
| 21 | 23 | ||
| 22 | gendata_cocsep(buf, selfsim, rep); | 24 | gendata_cocsep(buf, selfsim, rep); |
| 25 | cocsepdata = (uint32_t *)((char *)buf + INFOSIZE); | ||
| 23 | 26 | ||
| 24 | /* All cases in the same test so we do not generate data many times */ | 27 | /* All cases in the same test so we do not generate data many times */ |
| 25 | 28 | ||
| 26 | while (fgets(str, STRLENMAX, stdin) != NULL) { | 29 | while (fgets(str, STRLENMAX, stdin) != NULL) { |
| 27 | cube = readcube("H48", str); | 30 | cube = readcube("H48", str); |
| 28 | coord = coord_cocsep(cube); | 31 | coord = coord_cocsep(cube); |
| 29 | data = buf[coord]; | 32 | data = cocsepdata[coord]; |
| 30 | coclass = (data & (0xFFFU << 16)) >> 16; | 33 | coclass = (data & (0xFFFU << 16)) >> 16; |
| 31 | sim = selfsim[coclass]; | 34 | sim = selfsim[coclass]; |
| 32 | for (t = 0; t < 48 && sim; t++, sim >>= 1) { | 35 | for (t = 0; t < 48 && sim; t++, sim >>= 1) { |
