aboutsummaryrefslogtreecommitdiff
path: root/benchmark/00_gendata_h48
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-07-03 15:05:10 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-07-03 15:05:10 +0200
commit4a16da26dacdb37b9ef8d3d11e10ecb94b0cf396 (patch)
tree64723639df2a44c94deb26276c5793101d3b6c41 /benchmark/00_gendata_h48
parent3c9efb490ccbe1b0d7768d77fcdcac012c00e8c6 (diff)
downloadnissy-core-4a16da26dacdb37b9ef8d3d11e10ecb94b0cf396.tar.gz
nissy-core-4a16da26dacdb37b9ef8d3d11e10ecb94b0cf396.zip
renamed benchmarks to tools
Diffstat (limited to 'benchmark/00_gendata_h48')
-rw-r--r--benchmark/00_gendata_h48/gendata_h48_benchmark.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/benchmark/00_gendata_h48/gendata_h48_benchmark.c b/benchmark/00_gendata_h48/gendata_h48_benchmark.c
deleted file mode 100644
index 1dc7c57..0000000
--- a/benchmark/00_gendata_h48/gendata_h48_benchmark.c
+++ /dev/null
@@ -1,42 +0,0 @@
1#include "../benchmark.h"
2#include "../../src/cube.h"
3
4#define MAXDEPTH 10
5#define HVALUE 2
6#define OPTIONS "2;10"
7#define LONGOPTIONS "h = 2, max depth = 10"
8
9char *buf;
10
11void run(void) {
12 uint32_t *buf32;
13 int i;
14 int64_t s;
15
16 s = nissy_gendata("H48", OPTIONS, buf);
17
18 if (s == -1) {
19 printf("Error generating table\n");
20 } else {
21 printf("Succesfully generated %" PRId64 " bytes. Table:\n", s);
22 buf32 = (uint32_t *)&buf[s-sizeof(uint32_t)*(MAXDEPTH+1)];
23 for (i = 0; i <= MAXDEPTH; i++)
24 printf("%d:\t%" PRId32 "\n", i, buf32[i]);
25 }
26}
27
28int main() {
29 int64_t size;
30
31 size = nissy_datasize("H48", OPTIONS);
32 if (size == -1) {
33 printf("gendata_h48 benchmark: error in datasize\n");
34 return 1;
35 }
36
37 buf = malloc(size);
38
39 time_benchmark(run, "gendata_h48 " LONGOPTIONS);
40
41 return 0;
42}

Generated with cgit - Back to sebastiano.tronto.net