aboutsummaryrefslogtreecommitdiff
path: root/test/114_cocsep_ttrep/cocsep_ttrep_tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/114_cocsep_ttrep/cocsep_ttrep_tests.c')
-rw-r--r--test/114_cocsep_ttrep/cocsep_ttrep_tests.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/114_cocsep_ttrep/cocsep_ttrep_tests.c b/test/114_cocsep_ttrep/cocsep_ttrep_tests.c
new file mode 100644
index 0000000..87975a4
--- /dev/null
+++ b/test/114_cocsep_ttrep/cocsep_ttrep_tests.c
@@ -0,0 +1,34 @@
1#include "../test.h"
2
3uint8_t inverse_trans(uint8_t);
4cube_t transform_corners(cube_t, uint8_t);
5int64_t coord_cocsep(cube_t);
6size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *);
7
8void run(void) {
9 uint8_t t;
10 unsigned char buf[2000000];
11 uint32_t *cocsepdata, tt;
12 uint64_t i, selfsim[COCSEP_CLASSES];
13 int64_t j, k, l;
14 cube_t rep[COCSEP_CLASSES], c, d;
15
16 gendata_cocsep(buf, selfsim, rep);
17 cocsepdata = (uint32_t *)((char *)buf + INFOSIZE);
18
19 for (i = 0; i < COCSEP_CLASSES; i++) {
20 c = rep[i];
21 for (t = 0; t < 48; t++) {
22 d = transform_corners(c, t);
23 j = coord_cocsep(d);
24 tt = TTREP(cocsepdata[j]);
25 d = transform_corners(d, tt);
26 k = coord_cocsep(d);
27 l = coord_cocsep(c);
28 if (k != l)
29 printf("cocsep %" PRId64 " (%" PRId64 "): "
30 "%" PRId64 " ttrep %" PRIu32
31 " -> %" PRId64 "\n", i, l, j, tt, k);
32 }
33 }
34}

Generated with cgit - Back to sebastiano.tronto.net