aboutsummaryrefslogtreecommitdiff
path: root/test/111_cocsep_transform_invariant
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-07-29 12:12:43 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-07-29 12:12:43 +0200
commitea0387796a349c91032fbcb10f50c6ad8607b0f6 (patch)
treeaed484690d24c0c28c7695d4b5389f2e3c341b96 /test/111_cocsep_transform_invariant
parent52c21640508c3fc668107778ae027ff4428ebd89 (diff)
downloadnissy-core-ea0387796a349c91032fbcb10f50c6ad8607b0f6.tar.gz
nissy-core-ea0387796a349c91032fbcb10f50c6ad8607b0f6.zip
All coordinates unsigned
Diffstat (limited to 'test/111_cocsep_transform_invariant')
-rw-r--r--test/111_cocsep_transform_invariant/cocsep_transform_invariant.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/111_cocsep_transform_invariant/cocsep_transform_invariant.c b/test/111_cocsep_transform_invariant/cocsep_transform_invariant.c
index 5553fd1..5dbfbe1 100644
--- a/test/111_cocsep_transform_invariant/cocsep_transform_invariant.c
+++ b/test/111_cocsep_transform_invariant/cocsep_transform_invariant.c
@@ -2,14 +2,14 @@
2 2
3size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); 3size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *);
4cube_t transform(cube_t, uint8_t); 4cube_t transform(cube_t, uint8_t);
5int64_t coord_cocsep(cube_t); 5uint64_t coord_cocsep(cube_t);
6 6
7void run(void) { 7void run(void) {
8 uint8_t t; 8 uint8_t t;
9 unsigned char buf[2000000]; 9 unsigned char buf[2000000];
10 uint32_t *cocsepdata; 10 uint32_t *cocsepdata;
11 uint64_t selfsim[COCSEP_CLASSES]; 11 uint64_t selfsim[COCSEP_CLASSES];
12 int64_t coord, tcoord; 12 uint64_t coord, tcoord;
13 char str[STRLENMAX]; 13 char str[STRLENMAX];
14 oriented_cube_t cube; 14 oriented_cube_t cube;
15 cube_t rep[COCSEP_CLASSES], transd; 15 cube_t rep[COCSEP_CLASSES], transd;
@@ -20,12 +20,12 @@ void run(void) {
20 gendata_cocsep(buf, selfsim, rep); 20 gendata_cocsep(buf, selfsim, rep);
21 cocsepdata = (uint32_t *)((char *)buf + INFOSIZE); 21 cocsepdata = (uint32_t *)((char *)buf + INFOSIZE);
22 22
23 coord = (int64_t)COCLASS(cocsepdata[coord_cocsep(cube.cube)]); 23 coord = COCLASS(cocsepdata[coord_cocsep(cube.cube)]);
24 for (t = 0; t < 48; t++) { 24 for (t = 0; t < 48; t++) {
25 transd = transform(cube.cube, t); 25 transd = transform(cube.cube, t);
26 tcoord = (int64_t)COCLASS(cocsepdata[coord_cocsep(transd)]); 26 tcoord = COCLASS(cocsepdata[coord_cocsep(transd)]);
27 if (coord != tcoord) 27 if (coord != tcoord)
28 printf("Error: expected %" PRId64 28 printf("Error: expected %" PRIu64
29 " but got %" PRId64 "\n", coord, tcoord); 29 " but got %" PRIu64 "\n", coord, tcoord);
30 } 30 }
31} 31}

Generated with cgit - Back to sebastiano.tronto.net