forked from haiwan/sledge
parent
affe5fbc35
commit
3fab99424a
@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
ITERS=$3
|
||||
|
||||
# before running this benchmark,
|
||||
# copy fibonacci to fibonacci_native.out
|
||||
|
||||
testeach()
|
||||
{
|
||||
tmp_cnt=${ITERS}
|
||||
exe_relpath=$1
|
||||
|
||||
echo "${exe_relpath} ($2) for ${tmp_cnt}"
|
||||
|
||||
while [ ${tmp_cnt} -gt 0 ]; do
|
||||
bench=$(echo $2 | $exe_relpath 2>/dev/null)
|
||||
tmp_cnt=$((tmp_cnt - 1))
|
||||
echo "$bench"
|
||||
done
|
||||
|
||||
echo "Done!"
|
||||
}
|
||||
|
||||
MAXNUM=$2
|
||||
|
||||
tmp1_cnt=${MAXNUM}
|
||||
|
||||
while [ ${tmp1_cnt} -gt 0 ]; do
|
||||
testeach ./fibonacci_$1.out ${tmp1_cnt}
|
||||
tmp1_cnt=$((tmp1_cnt - 1))
|
||||
done
|
||||
|
||||
echo "All done!"
|
Loading…
Reference in new issue