aboutsummaryrefslogtreecommitdiff
path: root/tables
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-06-16 10:58:54 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2024-06-16 10:58:54 +0200
commit02ce9adf6a9168ec66c322ce9e5a5cb9fe1e60a5 (patch)
treed3385b1a1c915a74c373434032f0fe26e843854f /tables
parentc04a283a7ab97903683f5f7268068aef69f5bddf (diff)
downloadnissy-core-02ce9adf6a9168ec66c322ce9e5a5cb9fe1e60a5.tar.gz
nissy-core-02ce9adf6a9168ec66c322ce9e5a5cb9fe1e60a5.zip
Added rudimentary shell to run commands (ugly)
Diffstat (limited to 'tables')
-rw-r--r--tables/tables.c34
1 files changed, 0 insertions, 34 deletions
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 @@
1#define _POSIX_C_SOURCE 200809L /* Required to use clock_gettime */
2
3#include <inttypes.h>
4#include <stdbool.h>
5#include <stdio.h>
6#include <stdlib.h>
7#include <time.h>
8
9#include "../src/cube.h"
10
11#define SIZE_H1 118687270
12
13char buf[SIZE_H1];
14
15int main(int argc, char *argv[]) {
16 FILE *f;
17 struct timespec t0, t1;
18 double s;
19
20 clock_gettime(CLOCK_MONOTONIC, &t0);
21 gendata("H48", argc > 1 ? argv[1] : "4", buf);
22 clock_gettime(CLOCK_MONOTONIC, &t1);
23
24 if ((f = fopen("tables/data/h48_test", "wb")) == NULL) {
25 printf("Could not open file!\n");
26 return 1;
27 }
28 fwrite(buf, SIZE_H1, 1, f);
29
30 s = t1.tv_sec - t0.tv_sec + (t1.tv_nsec - t0.tv_nsec) / 1000000000.0;
31 printf("Data generated in %lfs\n", s);
32
33 return 0;
34}

Generated with cgit - Back to sebastiano.tronto.net