aboutsummaryrefslogtreecommitdiff
path: root/bench.j2.c
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2026-02-24 01:33:45 +0100
committerPaul Oliver <contact@pauloliver.dev>2026-02-24 01:33:45 +0100
commit9f7e70904e6c0fa650323ac5e50ebf6003da333c (patch)
tree3015be498d36e8d5c960cf55667c6c825f7de493 /bench.j2.c
parent0fb1497a62332e0db45f94b4f195cb37183678cb (diff)
Removes usage of Jinja templates
Use CPP to pre-process C files instead
Diffstat (limited to 'bench.j2.c')
-rw-r--r--bench.j2.c52
1 files changed, 0 insertions, 52 deletions
diff --git a/bench.j2.c b/bench.j2.c
deleted file mode 100644
index e78861f..0000000
--- a/bench.j2.c
+++ /dev/null
@@ -1,52 +0,0 @@
-// Author: Paul Oliver <contact@pauloliver.dev>
-// Project: Salis
-
-// Simple benchmark test helps measure simulation speed.
-// Steps the simulation N times and prints part of the simulator's state.
-
-void log_impl(const char *format, ...) {
- va_list args;
- va_start(args, format);
- vprintf(format, args);
- va_end(args);
-}
-
-int main() {
- g_info = log_impl;
- g_warn = log_impl;
-
- g_info("Salis Benchmark Test\n\n");
-
- salis_init();
- salis_step({{ args.steps }});
-
- g_info("seed => %#lx\n", {{ args.seed }});
- g_info("g_steps => %#lx\n", g_steps);
- g_info("g_syncs => %#lx\n", g_syncs);
-
- for (int i = 0; i < {{ args.cores }}; ++i) {
- g_info("\n");
- g_info("core %d mall => %#lx\n", i, g_cores[i].mall);
- g_info("core %d mut0 => %#lx\n", i, g_cores[i].muta[0]);
- g_info("core %d mut1 => %#lx\n", i, g_cores[i].muta[1]);
- g_info("core %d mut2 => %#lx\n", i, g_cores[i].muta[2]);
- g_info("core %d mut3 => %#lx\n", i, g_cores[i].muta[3]);
- g_info("core %d pnum => %#lx\n", i, g_cores[i].pnum);
- g_info("core %d pcap => %#lx\n", i, g_cores[i].pcap);
- g_info("core %d pfst => %#lx\n", i, g_cores[i].pfst);
- g_info("core %d plst => %#lx\n", i, g_cores[i].plst);
- g_info("core %d pcur => %#lx\n", i, g_cores[i].pcur);
- g_info("core %d psli => %#lx\n", i, g_cores[i].psli);
- g_info("core %d cycl => %#lx\n", i, g_cores[i].cycl);
- g_info("core %d ivpt => %#lx\n", i, g_cores[i].ivpt);
- g_info("\n");
-
- for (int j = 0; j < 32; ++j) {
- g_info("%02x ", g_cores[i].mvec[j]);
- }
-
- g_info("\n");
- }
-
- salis_free();
-}