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}")
|
2022-11-17 02:02:20 +00:00
|
|
|
echo -n "."
|
2022-11-17 01:59:31 +00:00
|
|
|
# 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"
|
|
|
|
}
|
|
|
|
|
2022-11-17 13:58:32 +00:00
|
|
|
for dataset in MINI_DATASET SMALL_DATASET STANDARD_DATASET LARGE_DATASET EXTRALARGE_DATASET
|
2022-11-16 16:39:09 +00:00
|
|
|
do
|
2022-11-17 13:58:32 +00:00
|
|
|
for c in $(seq 0 15)
|
|
|
|
do
|
2022-11-28 13:37:37 +00:00
|
|
|
cxxflags="-D$dataset"
|
2022-11-17 01:59:31 +00:00
|
|
|
|
2022-11-17 13:58:32 +00:00
|
|
|
if (( $c & 1 ))
|
|
|
|
then
|
2022-11-28 13:37:37 +00:00
|
|
|
cxxflags="$cxxflags -DTOGGLE_INIT_ARRAY_1"
|
2022-11-17 13:58:32 +00:00
|
|
|
fi
|
2022-11-17 01:59:31 +00:00
|
|
|
|
2022-11-17 13:58:32 +00:00
|
|
|
if (( $c & 2 ))
|
|
|
|
then
|
2022-11-28 13:37:37 +00:00
|
|
|
cxxflags="$cxxflags -DTOGGLE_INIT_ARRAY_2"
|
2022-11-17 13:58:32 +00:00
|
|
|
fi
|
2022-11-17 01:59:31 +00:00
|
|
|
|
2022-11-17 13:58:32 +00:00
|
|
|
if (( $c & 4 ))
|
|
|
|
then
|
2022-11-28 13:37:37 +00:00
|
|
|
cxxflags="$cxxflags -DTOGGLE_KERNEL_ATAX_1"
|
2022-11-17 13:58:32 +00:00
|
|
|
fi
|
2022-11-17 01:59:31 +00:00
|
|
|
|
2022-11-17 13:58:32 +00:00
|
|
|
if (( $c & 8 ))
|
|
|
|
then
|
2022-11-28 13:37:37 +00:00
|
|
|
cxxflags="$cxxflags -DTOGGLE_KERNEL_ATAX_2"
|
2022-11-17 13:58:32 +00:00
|
|
|
fi
|
2022-11-17 01:59:31 +00:00
|
|
|
|
2022-11-28 13:37:37 +00:00
|
|
|
echo "Flags: $cxxflags"
|
2022-11-28 13:46:43 +00:00
|
|
|
make --silent "EXTRA_CXXFLAGS=$cxxflags" clean all
|
2022-11-16 16:39:09 +00:00
|
|
|
|
2022-11-17 13:58:32 +00:00
|
|
|
run_benchmarks
|
|
|
|
done
|
2022-11-17 01:59:31 +00:00
|
|
|
done
|