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/101_cocsep_transform_invariant | |
| 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/101_cocsep_transform_invariant')
| -rw-r--r-- | test/101_cocsep_transform_invariant/cocsep_transform_invariant.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/101_cocsep_transform_invariant/cocsep_transform_invariant.c b/test/101_cocsep_transform_invariant/cocsep_transform_invariant.c index b0286e5..67f70a5 100644 --- a/test/101_cocsep_transform_invariant/cocsep_transform_invariant.c +++ b/test/101_cocsep_transform_invariant/cocsep_transform_invariant.c | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | #define COCLASS_MASK (UINT32_C(0xFFFF) << UINT32_C(16)) | 3 | #define COCLASS_MASK (UINT32_C(0xFFFF) << UINT32_C(16)) |
| 4 | #define COCLASS(x) (((x) & COCLASS_MASK) >> UINT32_C(16)) | 4 | #define COCLASS(x) (((x) & COCLASS_MASK) >> UINT32_C(16)) |
| 5 | 5 | ||
| 6 | #define INFOSIZE 512 | ||
| 6 | #define COCSEP_CLASSES 3393 | 7 | #define COCSEP_CLASSES 3393 |
| 7 | 8 | ||
| 8 | size_t gendata_cocsep(void *, uint64_t *, cube_t *); | 9 | size_t gendata_cocsep(void *, uint64_t *, cube_t *); |
| @@ -11,7 +12,8 @@ int64_t coord_cocsep(cube_t); | |||
| 11 | 12 | ||
| 12 | void run(void) { | 13 | void run(void) { |
| 13 | uint8_t t; | 14 | uint8_t t; |
| 14 | uint32_t buf[300000]; | 15 | char buf[2000000]; |
| 16 | uint32_t *cocsepdata; | ||
| 15 | uint64_t selfsim[COCSEP_CLASSES]; | 17 | uint64_t selfsim[COCSEP_CLASSES]; |
| 16 | int64_t coord, tcoord; | 18 | int64_t coord, tcoord; |
| 17 | char str[STRLENMAX]; | 19 | char str[STRLENMAX]; |
| @@ -21,11 +23,12 @@ void run(void) { | |||
| 21 | cube = readcube("H48", str); | 23 | cube = readcube("H48", str); |
| 22 | 24 | ||
| 23 | gendata_cocsep(buf, selfsim, rep); | 25 | gendata_cocsep(buf, selfsim, rep); |
| 26 | cocsepdata = (uint32_t *)((char *)buf + INFOSIZE); | ||
| 24 | 27 | ||
| 25 | coord = (int64_t)COCLASS(buf[coord_cocsep(cube)]); | 28 | coord = (int64_t)COCLASS(cocsepdata[coord_cocsep(cube)]); |
| 26 | for (t = 0; t < 48; t++) { | 29 | for (t = 0; t < 48; t++) { |
| 27 | transd = transform(cube, t); | 30 | transd = transform(cube, t); |
| 28 | tcoord = (int64_t)COCLASS(buf[coord_cocsep(transd)]); | 31 | tcoord = (int64_t)COCLASS(cocsepdata[coord_cocsep(transd)]); |
| 29 | if (coord != tcoord) | 32 | if (coord != tcoord) |
| 30 | printf("Error: expected %" PRId64 | 33 | printf("Error: expected %" PRId64 |
| 31 | " but got %" PRId64 "\n", coord, tcoord); | 34 | " but got %" PRId64 "\n", coord, tcoord); |
