2022-11-16 16:39:09 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-11-17 01:59:31 +00:00
|
|
|
run_benchmarks() {
|
|
|
|
runs=25
|
|
|
|
totalt=0.0
|
2022-11-16 16:39:09 +00:00
|
|
|
|
2022-11-17 01:59:31 +00:00
|
|
|
for i in $(seq $runs)
|
|
|
|
do
|
|
|
|
exet=$(./atax_acc)
|
|
|
|
totalt=$(awk "BEGIN{print $totalt+$exet}")
|
|
|
|
# echo "Run #$i: " $(awk "BEGIN{printf(\"%.3g\", $exet)}") "seconds"
|
|
|
|
done
|
|
|
|
|
|
|
|
avgt=$(awk "BEGIN{print $totalt/$runs}")
|
|
|
|
echo " Average of $runs runs: " $(awk "BEGIN{printf(\"%.3g\", $avgt)}") "seconds"
|
|
|
|
}
|
|
|
|
|
|
|
|
for c in $(seq 0 15)
|
2022-11-16 16:39:09 +00:00
|
|
|
do
|
2022-11-17 01:59:31 +00:00
|
|
|
cflags=""
|
|
|
|
|
|
|
|
if (( $c & 1 ))
|
|
|
|
then
|
|
|
|
cflags="$cflags -DTOGGLE_INIT_ARRAY_1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if (( $c & 2 ))
|
|
|
|
then
|
|
|
|
cflags="$cflags -DTOGGLE_INIT_ARRAY_2"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if (( $c & 4 ))
|
|
|
|
then
|
|
|
|
cflags="$cflags -DTOGGLE_KERNEL_ATAX_1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if (( $c & 8 ))
|
|
|
|
then
|
|
|
|
cflags="$cflags -DTOGGLE_KERNEL_ATAX_2"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Flags: $cflags"
|
|
|
|
make "EXTRA_CFLAGS=$cflags" clean all
|
2022-11-16 16:39:09 +00:00
|
|
|
|
2022-11-17 01:59:31 +00:00
|
|
|
run_benchmarks
|
|
|
|
done
|