aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/113_gen_h48short/gen_h48short.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/test/113_gen_h48short/gen_h48short.c b/test/113_gen_h48short/gen_h48short.c
index 399ef1e..92d346a 100644
--- a/test/113_gen_h48short/gen_h48short.c
+++ b/test/113_gen_h48short/gen_h48short.c
@@ -15,12 +15,19 @@ typedef struct {
15 uint64_t val; 15 uint64_t val;
16} kvpair_t; 16} kvpair_t;
17 17
18typedef struct {
19 uint8_t maxdepth;
20 const uint32_t *cocsepdata;
21 const cube_t *crep;
22 const uint64_t *selfsim;
23 h48map_t *map;
24} gendata_h48short_arg_t;
25
18void h48map_create(h48map_t *, uint64_t, uint64_t); 26void h48map_create(h48map_t *, uint64_t, uint64_t);
19void h48map_destroy(h48map_t *); 27void h48map_destroy(h48map_t *);
20kvpair_t h48map_nextkvpair(h48map_t *, uint64_t *); 28kvpair_t h48map_nextkvpair(h48map_t *, uint64_t *);
21size_t gendata_cocsep(void *, uint64_t *, cube_t *); 29size_t gendata_cocsep(void *, uint64_t *, cube_t *);
22uint64_t gen_h48short( 30uint64_t gen_h48short(gendata_h48short_arg_t *);
23 uint8_t, const uint32_t *, const cube_t *, const uint64_t *, h48map_t *);
24 31
25char str[STRLENMAX]; 32char str[STRLENMAX];
26 33
@@ -41,17 +48,22 @@ uint64_t readl(void) {
41void run(void) { 48void run(void) {
42 uint32_t cocsepdata[300000]; 49 uint32_t cocsepdata[300000];
43 h48map_t map; 50 h48map_t map;
44 uint64_t n, i, j, capacity, randomizer, selfsim[COCSEP_CLASSES]; 51 uint64_t i, j, capacity, randomizer, selfsim[COCSEP_CLASSES];
45 kvpair_t kv, b[MAXPOS]; 52 kvpair_t kv, b[MAXPOS];
53 gendata_h48short_arg_t arg;
46 cube_t crep[COCSEP_CLASSES]; 54 cube_t crep[COCSEP_CLASSES];
47 55
48 capacity = readl(); 56 capacity = readl();
49 randomizer = readl(); 57 randomizer = readl();
50 n = readl(); 58 arg.maxdepth = readl();
59 arg.cocsepdata = cocsepdata;
60 arg.crep = crep;
61 arg.selfsim = selfsim;
62 arg.map = ↦
51 63
52 h48map_create(&map, capacity, randomizer); 64 h48map_create(&map, capacity, randomizer);
53 gendata_cocsep(cocsepdata, selfsim, crep); 65 gendata_cocsep(cocsepdata, selfsim, crep);
54 gen_h48short(n, cocsepdata, crep, selfsim, &map); 66 gen_h48short(&arg);
55 67
56 i = 0; 68 i = 0;
57 for (kv = h48map_nextkvpair(&map, &i), j = 0; 69 for (kv = h48map_nextkvpair(&map, &i), j = 0;

Generated with cgit - Back to sebastiano.tronto.net