aboutsummaryrefslogtreecommitdiff
path: root/test/104_cocsep_ttrep
diff options
context:
space:
mode:
Diffstat (limited to 'test/104_cocsep_ttrep')
-rw-r--r--test/104_cocsep_ttrep/cocsep_ttrep_tests.c10
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
7uint8_t inverse_trans(uint8_t); 9uint8_t inverse_trans(uint8_t);
8cube_t transform_corners(cube_t, uint8_t); 10cube_t transform_corners(cube_t, uint8_t);
9int64_t coord_cocsep(cube_t); 11int64_t coord_cocsep(cube_t);
@@ -11,19 +13,21 @@ size_t gendata_cocsep(void *, uint64_t *, cube_t *);
11 13
12void run(void) { 14void 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);

Generated with cgit - Back to sebastiano.tronto.net