aboutsummaryrefslogtreecommitdiff
path: root/test/112_gendata_h48/gendata_h48_tests.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-08-26 21:42:50 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-08-26 21:42:50 +0200
commitc558c7989eaa0921f7b29ee274b325f4f6d97f8c (patch)
tree3f8393c5d8c492ed4600198501f7ecfb28fd6363 /test/112_gendata_h48/gendata_h48_tests.c
parentf2907e471b3caddc5844bc6994e1cbd249019747 (diff)
downloadnissy-core-c558c7989eaa0921f7b29ee274b325f4f6d97f8c.tar.gz
nissy-core-c558c7989eaa0921f7b29ee274b325f4f6d97f8c.zip
Gendata added for h48k2, need to verify with new tool
Diffstat (limited to 'test/112_gendata_h48/gendata_h48_tests.c')
-rw-r--r--test/112_gendata_h48/gendata_h48_tests.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/test/112_gendata_h48/gendata_h48_tests.c b/test/112_gendata_h48/gendata_h48_tests.c
deleted file mode 100644
index d6c6cb2..0000000
--- a/test/112_gendata_h48/gendata_h48_tests.c
+++ /dev/null
@@ -1,50 +0,0 @@
1#include "../test.h"
2
3#define COCSEP_CLASSES 3393
4#define COCSEPSIZE 1119792
5
6typedef struct {
7 uint8_t h;
8 uint8_t k;
9 uint8_t maxdepth;
10 void *buf;
11 uint32_t *info;
12 uint32_t *cocsepdata;
13 uint32_t *h48data;
14 uint64_t selfsim[COCSEP_CLASSES];
15 cube_t crep[COCSEP_CLASSES];
16} gendata_h48_arg_t;
17
18int64_t gendata_h48(gendata_h48_arg_t *);
19
20void run(void) {
21 char str[STRLENMAX];
22 uint8_t i;
23 gendata_h48_arg_t arg;
24 size_t result, sz;
25
26 fgets(str, STRLENMAX, stdin);
27 arg.maxdepth = atoi(str);
28 fgets(str, STRLENMAX, stdin);
29 arg.h = atoi(str);
30 arg.k = 4;
31
32 sz = gendata_h48(&arg); /* With buf = NULL returns data size */
33 arg.buf = malloc(sz);
34 result = gendata_h48(&arg);
35
36 printf("%zu\n\n", result);
37
38 printf("cocsepdata:\n");
39 printf("Classes: %" PRIu32 "\n", arg.cocsepdata[COCSEPSIZE/4-12]);
40 printf("Max value: %" PRIu32 "\n", arg.cocsepdata[COCSEPSIZE/4-11]);
41 for (i = 0; i < 10; i++)
42 printf("%" PRIu32 ": %" PRIu32 "\n",
43 i, arg.cocsepdata[COCSEPSIZE/4-10+i]);
44
45 printf("\nh48:\n");
46 for (i = 0; i < arg.maxdepth+1; i++)
47 printf("%" PRIu32 ": %" PRIu32 "\n", i, arg.info[i+1]);
48
49 free(arg.buf);
50}

Generated with cgit - Back to sebastiano.tronto.net