From 02ce9adf6a9168ec66c322ce9e5a5cb9fe1e60a5 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 16 Jun 2024 10:58:54 +0200 Subject: Added rudimentary shell to run commands (ugly) --- tables/tables.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 tables/tables.c (limited to 'tables/tables.c') diff --git a/tables/tables.c b/tables/tables.c deleted file mode 100644 index bd37831..0000000 --- a/tables/tables.c +++ /dev/null @@ -1,34 +0,0 @@ -#define _POSIX_C_SOURCE 200809L /* Required to use clock_gettime */ - -#include -#include -#include -#include -#include - -#include "../src/cube.h" - -#define SIZE_H1 118687270 - -char buf[SIZE_H1]; - -int main(int argc, char *argv[]) { - FILE *f; - struct timespec t0, t1; - double s; - - clock_gettime(CLOCK_MONOTONIC, &t0); - gendata("H48", argc > 1 ? argv[1] : "4", buf); - clock_gettime(CLOCK_MONOTONIC, &t1); - - if ((f = fopen("tables/data/h48_test", "wb")) == NULL) { - printf("Could not open file!\n"); - return 1; - } - fwrite(buf, SIZE_H1, 1, f); - - s = t1.tv_sec - t0.tv_sec + (t1.tv_nsec - t0.tv_nsec) / 1000000000.0; - printf("Data generated in %lfs\n", s); - - return 0; -} -- cgit v1.3