aboutsummaryrefslogtreecommitdiff
path: root/benchmark/benchmark.sh
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/benchmark.sh
parent3c9efb490ccbe1b0d7768d77fcdcac012c00e8c6 (diff)
downloadnissy-core-4a16da26dacdb37b9ef8d3d11e10ecb94b0cf396.tar.gz
nissy-core-4a16da26dacdb37b9ef8d3d11e10ecb94b0cf396.zip
renamed benchmarks to tools
Diffstat (limited to '')
-rwxr-xr-xtools/run_tool.sh (renamed from benchmark/benchmark.sh)18
1 files changed, 9 insertions, 9 deletions
diff --git a/benchmark/benchmark.sh b/tools/run_tool.sh
index 6de280c..21b6ce9 100755
--- a/benchmark/benchmark.sh
+++ b/tools/run_tool.sh
@@ -1,6 +1,9 @@
1#!/bin/sh 1#!/bin/sh
2 2
3re="${RUN:-$@}" 3if [ -z "$TOOL" ]; then
4 echo "No tool selected (TOOL variable must be set)"
5 exit 1
6fi
4 7
5CC="cc -std=c99 -pedantic -Wall -Wextra \ 8CC="cc -std=c99 -pedantic -Wall -Wextra \
6 -Wno-unused-parameter -Wno-unused-function -O3 -D$CUBETYPE \ 9 -Wno-unused-parameter -Wno-unused-function -O3 -D$CUBETYPE \
@@ -8,20 +11,17 @@ CC="cc -std=c99 -pedantic -Wall -Wextra \
8 11
9[ "$CUBETYPE" = "CUBE_AVX2" ] && CC="$CC -mavx2" 12[ "$CUBETYPE" = "CUBE_AVX2" ] && CC="$CC -mavx2"
10 13
11BIN="benchmark/run" 14BIN="tools/run"
12RES="benchmark/results"
13CUBEOBJ="cube.o" 15CUBEOBJ="cube.o"
14d="$(date +'%Y-%m-%d-%H-%M-%S')" 16d="$(date +'%Y-%m-%d-%H-%M-%S')"
15 17
16mkdir -p "$RES" 18for t in tools/*; do
17 19 if [ ! -d "$t" ] || [ -z "$(echo "$t" | grep "$TOOL")" ]; then
18for t in benchmark/*; do
19 if [ -n "$re" ] && [ -z "$(echo "$t" | grep "$re")" ]; then
20 continue 20 continue
21 fi 21 fi
22 if [ ! -d "$t" ] || [ "$t" = "benchmark/results" ]; then continue; fi
23 $CC -o $BIN $t/*.c $CUBEOBJ || exit 1; 22 $CC -o $BIN $t/*.c $CUBEOBJ || exit 1;
24 $BIN | tee "$RES/results-$d.txt" "$RES/results-last.txt" 23 $BIN
24 break
25done 25done
26 26
27rm -rf $BIN $CUBEOBJ 27rm -rf $BIN $CUBEOBJ

Generated with cgit - Back to sebastiano.tronto.net