diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-07-20 10:05:51 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-07-20 10:05:51 +0200 |
| commit | 5727f06c5694a4831881322876e3ba4d8ce3b743 (patch) | |
| tree | 8ec57e5862b05464b54aad3aad6f3d37653066a6 /tools/benchmark_gendata_h48 | |
| parent | e20e4f550ae373414d9bc106b1615a5c5896c9c4 (diff) | |
| download | nissy-core-5727f06c5694a4831881322876e3ba4d8ce3b743.tar.gz nissy-core-5727f06c5694a4831881322876e3ba4d8ce3b743.zip | |
Finally fixed selfsim logic
Diffstat (limited to 'tools/benchmark_gendata_h48')
| -rw-r--r-- | tools/benchmark_gendata_h48/benchmark_gendata_h48.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/tools/benchmark_gendata_h48/benchmark_gendata_h48.c b/tools/benchmark_gendata_h48/benchmark_gendata_h48.c deleted file mode 100644 index efb6f6f..0000000 --- a/tools/benchmark_gendata_h48/benchmark_gendata_h48.c +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | #include "../timerun.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 | |||
| 9 | #define COCSEPSIZE 1119792 | ||
| 10 | #define ETABLESIZE(h) (((3393 * 495 * 70) >> 1) << (size_t)(h)) | ||
| 11 | |||
| 12 | char *buf; | ||
| 13 | |||
| 14 | void run(void) { | ||
| 15 | uint32_t *h48info; | ||
| 16 | int i; | ||
| 17 | int64_t s; | ||
| 18 | |||
| 19 | s = nissy_gendata("H48", OPTIONS, buf); | ||
| 20 | |||
| 21 | if (s == -1) { | ||
| 22 | printf("Error generating table\n"); | ||
| 23 | } else { | ||
| 24 | printf("Succesfully generated %" PRId64 " bytes. Table:\n", s); | ||
| 25 | h48info = (uint32_t *)buf + (ETABLESIZE(HVALUE) + COCSEPSIZE) / 4; | ||
| 26 | for (i = 0; i < MAXDEPTH+1; i++) | ||
| 27 | printf("%d:\t%" PRIu32 "\n", i, h48info[i+1]); | ||
| 28 | } | ||
| 29 | } | ||
| 30 | |||
| 31 | int main() { | ||
| 32 | int64_t size; | ||
| 33 | |||
| 34 | size = nissy_datasize("H48", OPTIONS); | ||
| 35 | if (size == -1) { | ||
| 36 | printf("gendata_h48 benchmark: error in datasize\n"); | ||
| 37 | return 1; | ||
| 38 | } | ||
| 39 | |||
| 40 | buf = malloc(size); | ||
| 41 | |||
| 42 | timerun(run, "benchmark gendata_h48 " LONGOPTIONS); | ||
| 43 | |||
| 44 | free(buf); | ||
| 45 | |||
| 46 | return 0; | ||
| 47 | } | ||
